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

View file

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

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, hostName, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
mako # notification system developed by swaywm maintainer mako # notification system developed by swaywm maintainer
@ -31,22 +31,12 @@
grim grim
slurp slurp
wl-clipboard wl-clipboard
brightnessctl
pulseaudio pulseaudio
sway-contrib.grimshot sway-contrib.grimshot
kitty
kitty-themes
]; ];
}; # end sway }; # 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 = { light = {
enable = true; enable = true;
}; # end light }; # end light
@ -59,6 +49,13 @@
greetd.enableGnomeKeyring = true; greetd.enableGnomeKeyring = true;
greetd-password.enableGnomeKeyring = true; greetd-password.enableGnomeKeyring = true;
login.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 pam.services
}; # end security }; # end security
services = { services = {
@ -67,7 +64,6 @@
settings = { settings = {
default_session = { default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'sway --unsupported-gpu'"; 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"; user = "greeter";
}; # end default_session }; # end default_session
}; # end settings }; # end settings
@ -80,24 +76,7 @@
}; };
}; };
}; # end logind }; # end logind
#gnome = {
#gnome-keyring.enable = true;
#gcr-ssh-agent.enable = true;
#}; # end gnome
dbus.packages = [ pkgs.seahorse pkgs.gnome-keyring pkgs.gcr ]; dbus.packages = [ pkgs.seahorse pkgs.gnome-keyring pkgs.gcr ];
}; # end services }; # end services
users.users.alisceon.extraGroups = [ "video" "input" ]; 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" ];
# };
# };
# };
} }