add kitty

This commit is contained in:
alisceon 2025-12-02 21:38:59 +01:00
parent a2b0dbe4ad
commit 78c1bdeab5
3 changed files with 43 additions and 58 deletions

12
flake.lock generated
View file

@ -121,11 +121,11 @@
]
},
"locked": {
"lastModified": 1764683664,
"narHash": "sha256-Mr5HKf/bjAJ8H7/H0qJSk2BEV/OILkDIFKrGK0dUVUk=",
"lastModified": 1764703879,
"narHash": "sha256-JyCREoghKjAMPGpUdtiN5ISKBlGO+QqoJKhAbQTGqDQ=",
"owner": "nix-community",
"repo": "NUR",
"rev": "b8b40e258cf4c959b06b7322648c87674633629b",
"rev": "f3a83106de56c232c51a99a5f498cdbb7509db53",
"type": "github"
},
"original": {
@ -142,11 +142,11 @@
]
},
"locked": {
"lastModified": 1764683664,
"narHash": "sha256-Mr5HKf/bjAJ8H7/H0qJSk2BEV/OILkDIFKrGK0dUVUk=",
"lastModified": 1764703879,
"narHash": "sha256-JyCREoghKjAMPGpUdtiN5ISKBlGO+QqoJKhAbQTGqDQ=",
"owner": "nix-community",
"repo": "NUR",
"rev": "b8b40e258cf4c959b06b7322648c87674633629b",
"rev": "f3a83106de56c232c51a99a5f498cdbb7509db53",
"type": "github"
},
"original": {

View file

@ -1,9 +1,11 @@
{ pkgs, config, hostName, lib, ... }:
let
# execs
swaymsg = "${pkgs.sway}/bin/swaymsg";
lock = "${pkgs.swaylock}/bin/swaylock --daemonize";
term = "${pkgs.foot}/bin/foot";
term = "${pkgs.kitty}/bin/kitty";
dmenu = "${pkgs.rofi}/bin/rofi -show drun";
notify = "${pkgs.libnotify}/bin/notify-send";
# keybinds
key_mod = "Mod4";
@ -71,7 +73,7 @@
color_inv_text = color_dark_5;
# other
display = status: "swaymsg 'output * power ${status}'";
display = status: "${swaymsg} 'output * power ${status}'";
hostnameOutput =
if hostName == "tower" then {
# Left monitor
@ -115,7 +117,7 @@
timeouts = [
{
timeout = 120;
command = "${pkgs.libnotify}/bin/notify-send 'Locking in 5 seconds' -t 5000";
command = "${notify} 'Locking in 5 seconds' -t 5000";
}
{
timeout = 125;
@ -134,7 +136,7 @@
events = [
{
event = "before-sleep";
command = "display off; systemctl --user stop libinput-gestures" + lock;
command = "display off; systemctl --user stop libinput-gestures; ${lock}";
}
{
event = "after-resume";
@ -311,7 +313,8 @@
"1" = [{app_id = "firefox";}];
"2" = [{class = "Code";}];
"3" = [{class = "discord";}];
"5" = [{app_id = "obsidian";}];
"6" = [{app_id = "signal";}];
};
output = {} // hostnameOutput;
workspaceOutputAssign = hostnameWorkspaceAssign;
@ -653,17 +656,20 @@
indicator-thickness = 10;
}; # end settings
}; # end swaylock
foot = {
kitty = {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-256color";
font = "${style_font}:size=${style_font_sz}";
dpi-aware = "no";
};
font = {
name = style_font;
size = lib.toInt style_font_sz;
};
};
settings = {
confirm_os_window_close = 0;
enable_audio_bell = false;
window_padding_width = 2;
foreground = color_f_text;
background = color_uf_bg;
};
}; # end kitty
}; # end programs
dconf = {
enable = true;
@ -675,13 +681,13 @@
};
};
xdg.configFile."libinput-gestures.conf".text = ''
gesture swipe left 3 swaymsg workspace prev
gesture swipe right 3 swaymsg workspace next
gesture swipe down 3 swaymsg move container to scratchpad
gesture swipe up 3 swaymsg fullscreen
gesture pinch in 3 swaymsg floating enable
gesture pinch out 3 swaymsg floating disable
gesture pinch in 4 swaymsg kill
gesture swipe left 3 ${swaymsg} workspace prev
gesture swipe right 3 ${swaymsg} workspace next
gesture swipe down 3 ${swaymsg} move container to scratchpad
gesture swipe up 3 ${swaymsg} fullscreen
gesture pinch in 3 ${swaymsg} floating enable
gesture pinch out 3 ${swaymsg} floating disable
gesture pinch in 4 ${swaymsg} kill
gesture swipe up 4 ${lock}
'';
} # end file

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, hostName, ... }:
{
environment.systemPackages = with pkgs; [
mako # notification system developed by swaywm maintainer
@ -31,22 +31,12 @@
grim
slurp
wl-clipboard
brightnessctl
pulseaudio
sway-contrib.grimshot
kitty
kitty-themes
];
}; # end sway
# uwsm = {
# enable = true;
# waylandCompositors = {
# sway = {
# prettyName = "Sway";
# comment = "Sway compositor managed by UWSM";
# binPath = "${pkgs.sway}/bin/sway";
# extraArgs = [ "--unsupported-gpu" ];
# };
# };
# }; # end uwsm
light = {
enable = true;
}; # end light
@ -59,6 +49,13 @@
greetd.enableGnomeKeyring = true;
greetd-password.enableGnomeKeyring = true;
login.enableGnomeKeyring = true;
swaylock = {
text = ''
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth sufficient pam_fprintd.so
auth include login
'';
}; # end swaylock
}; # end pam.services
}; # end security
services = {
@ -67,7 +64,6 @@
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'sway --unsupported-gpu'";
#command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'uwsm start -- sway-uwsm.desktop'";
user = "greeter";
}; # end default_session
}; # end settings
@ -80,24 +76,7 @@
};
};
}; # end logind
#gnome = {
#gnome-keyring.enable = true;
#gcr-ssh-agent.enable = true;
#}; # end gnome
dbus.packages = [ pkgs.seahorse pkgs.gnome-keyring pkgs.gcr ];
}; # end services
users.users.alisceon.extraGroups = [ "video" "input" ];
# xdg.portal = {
# enable = true;
# wlr.enable = true;
# extraPortals = [
# pkgs.xdg-desktop-portal-gtk
# ];
# config = {
# common = {
# default = [ "gtk" ];
# "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
# };
# };
# };
}