refactoring and kanata layers

This commit is contained in:
Matt Nish-Lapidus 2025-05-19 23:05:24 -04:00
parent 1ca4236a0c
commit 9072e16503
5 changed files with 59 additions and 77 deletions

12
flake.lock generated
View file

@ -88,11 +88,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1747687152, "lastModified": 1747704379,
"narHash": "sha256-8I9ZZBiYL+nAzPB7wb9lz5GgS8D8c0Pf0+VhJcME23I=", "narHash": "sha256-xHMa+RG5efiEgSXjjlKp2JwiZMVoxriiahIGBaK3drU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "4549e0cb468aa26b77dfa3d0f242dbf4d3730b13", "rev": "f66e9712f1b4f61d59f079e2ca46a68547c9d4c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1658,11 +1658,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747679302, "lastModified": 1747696712,
"narHash": "sha256-CWemB2lOiAXOGELidw27AbY9qUkTXX3cUnjrXOt7niM=", "narHash": "sha256-4osrkMiOfqB/SQxni7mtuuRcYMs5HDhowROYNRQhLeM=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "c0f8daf4311bb56a817ae2caeabacc3ae915a7bb", "rev": "f08eb325d74fa664595110e70cd7a2baa1bee7db",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -335,16 +335,23 @@
]; ];
}; };
security.sudo = { security = {
enable = true; polkit.enable = true;
wheelNeedsPassword = false; rtkit.enable = true;
};
security.polkit.enable = true; sudo = {
security.rtkit.enable = true; enable = true;
security.pam.services.swaylock = { }; wheelNeedsPassword = false;
security.pam.services.hyprlock = { }; };
security.pam.services.greetd.enableGnomeKeyring = true;
pam = {
services = {
swaylock = { };
hyprlock = { };
greetd.enableGnomeKeyring = true;
};
};
};
services.xserver.videoDrivers = [ services.xserver.videoDrivers = [
"nvidia" "nvidia"

View file

@ -267,6 +267,8 @@ in
wez = spawn "/home/emenel/.local/bin/wezapp"; wez = spawn "/home/emenel/.local/bin/wezapp";
wezlaunch = spawn "/home/emenel/.local/bin/wezlauncher"; wezlaunch = spawn "/home/emenel/.local/bin/wezlauncher";
wezappfloat = spawn "/home/emenel/.local/bin/wezappfloat"; wezappfloat = spawn "/home/emenel/.local/bin/wezappfloat";
app-prefix = "Mod+Ctrl";
in in
{ {
# shows a list of important hotkeys. # shows a list of important hotkeys.
@ -282,43 +284,43 @@ in
action = wezlaunch "sway-launcher-desktop"; action = wezlaunch "sway-launcher-desktop";
}; };
"Mod+Ctrl+T" = { "${app-prefix}+T" = {
hotkey-overlay.title = "Wezterm"; hotkey-overlay.title = "Wezterm";
action = spawn "wezterm"; action = spawn "wezterm";
}; };
"Mod+Ctrl+E" = { "${app-prefix}+E" = {
hotkey-overlay.title = "Emacs (client)"; hotkey-overlay.title = "Emacs (client)";
action = spawn "emacsclient" "-r" "-n"; action = spawn "emacsclient" "-r" "-n";
}; };
"Mod+Ctrl+B" = { "${app-prefix}+B" = {
hotkey-overlay.title = "Zen Browser"; hotkey-overlay.title = "Zen Browser";
action = spawn "zen"; action = spawn "zen";
}; };
"Mod+Ctrl+F" = { "${app-prefix}+F" = {
hotkey-overlay.title = "Yazi"; hotkey-overlay.title = "Yazi";
action = wez "yazi"; action = wez "yazi";
}; };
"Mod+Ctrl+N" = { "${app-prefix}+N" = {
hotkey-overlay.title = "Notifications"; hotkey-overlay.title = "Notifications";
action = spawn "swaync-client" "-t"; action = spawn "swaync-client" "-t";
}; };
"Mod+Ctrl+O" = { "${app-prefix}+O" = {
hotkey-overlay.title = "Obsidian"; hotkey-overlay.title = "Obsidian";
action = spawn "obsidian"; action = spawn "obsidian";
}; };
"Mod+Ctrl+S" = { "${app-prefix}+S" = {
hotkey-overlay.title = "Signal"; hotkey-overlay.title = "Signal";
action = spawn "signal-desktop"; action = spawn "signal-desktop";
}; };
"Mod+Ctrl+C" = { "${app-prefix}+C" = {
hotkey-overlay.title = "Calendar"; hotkey-overlay.title = "Calendar";
action = spawn "gnome-calendar"; action = spawn "gnome-calendar";
}; };
"Mod+Ctrl+A" = { "${app-prefix}+A" = {
hotkey-overlay.title = "btop++"; hotkey-overlay.title = "btop++";
action = wez "btop"; action = wez "btop";
}; };
"Mod+Ctrl+M" = { "${app-prefix}+M" = {
hotkey-overlay.title = "plexamp"; hotkey-overlay.title = "plexamp";
action = spawn "plexamp"; action = spawn "plexamp";
}; };
@ -437,7 +439,6 @@ in
"Mod+Ctrl+Page_Up".action = move-column-to-workspace-up; "Mod+Ctrl+Page_Up".action = move-column-to-workspace-up;
"Mod+Ctrl+U".action = move-column-to-workspace-down; "Mod+Ctrl+U".action = move-column-to-workspace-down;
"Mod+Ctrl+I".action = move-column-to-workspace-up; "Mod+Ctrl+I".action = move-column-to-workspace-up;
"Mod+Shift+Page_Down".action = move-workspace-down; "Mod+Shift+Page_Down".action = move-workspace-down;
"Mod+Shift+Page_Up".action = move-workspace-up; "Mod+Shift+Page_Up".action = move-workspace-up;
"Mod+Shift+U".action = move-workspace-down; "Mod+Shift+U".action = move-workspace-down;
@ -495,6 +496,7 @@ in
"Mod+Print".action = screenshot; "Mod+Print".action = screenshot;
"Mod+Shift+Print".action = spawn "/home/emenel/.local/bin/niri-screenshot-window"; "Mod+Shift+Print".action = spawn "/home/emenel/.local/bin/niri-screenshot-window";
# The quit action will show a confirmation dialog to avoid accidental exits. # The quit action will show a confirmation dialog to avoid accidental exits.
"Mod+Shift+E".action = quit; "Mod+Shift+E".action = quit;

View file

@ -4,6 +4,8 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
inputs.isd.packages.x86_64-linux.default inputs.isd.packages.x86_64-linux.default
razer-cli
cmake cmake
cmake-format cmake-format

View file

@ -6,6 +6,13 @@ let
tap-timeout 150 tap-timeout 150
hold-timeout 150) hold-timeout 150)
''; '';
shared-alias = ''
(defalias
spcnav (tap-hold-press $tap-timeout $hold-timeout spc (layer-while-held navigation))
supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet)
sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft)
sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft))
'';
in in
{ {
@ -47,12 +54,10 @@ allow-hardware-repeat false
${k-vars} ${k-vars}
${shared-alias}
(defalias (defalias
supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet) controls (layer-while-held media-controls))
sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft)
sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft)
controls (layer-while-held media-controls)
nav (tap-hold-press $tap-timeout $hold-timeout a (layer-while-held navigation)))
(deflayer qwerty (deflayer qwerty
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc
@ -60,7 +65,7 @@ ${k-vars}
tab q w e r t y u i o p [ ] bspc end tab q w e r t y u i o p [ ] bspc end
@supesc a s d f g h j k l ; ' ret pgup @supesc a s d f g h j k l ; ' ret pgup
@sp-lsft z x c v b n m , . / @sp-rsft up pgdn @sp-lsft z x c v b n m , . / @sp-rsft up pgdn
lmet @controls lalt lctrl spc rctrl ralt rmet left down right) lmet @controls lalt lctrl @spcnav rctrl ralt rmet left down right)
(deflayer navigation (deflayer navigation
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc
@ -68,7 +73,7 @@ ${k-vars}
tab q w e r t y u i o p [ ] bspc end tab q w e r t y u i o p [ ] bspc end
@supesc a s d f g left down up right ; ' ret pgup @supesc a s d f g left down up right ; ' ret pgup
@sp-lsft z x c v b n m , . / @sp-rsft up pgdn @sp-lsft z x c v b n m , . / @sp-rsft up pgdn
lmet @controls lalt lctrl spc rctrl ralt rmet left down right) lmet @controls lalt lctrl _ rctrl ralt rmet left down right)
(deflayer media-controls (deflayer media-controls
esc VolumeMute VolumeDown VolumeUp f4 MediaTrackPrevious MediaPlayPause MediaTrackNext f8 f9 f10 f11 f12 prtsc esc VolumeMute VolumeDown VolumeUp f4 MediaTrackPrevious MediaPlayPause MediaTrackNext f8 f9 f10 f11 f12 prtsc
@ -76,52 +81,10 @@ ${k-vars}
tab q w e r t y u i o MediaPlayPause [ ] bspc end tab q w e r t y u i o MediaPlayPause [ ] bspc end
@supesc a s d f g MediaTrackNext VolumeDown VolumeUp MediaTrackPrevious ; ' ret pgup @supesc a s d f g MediaTrackNext VolumeDown VolumeUp MediaTrackPrevious ; ' ret pgup
@sp-lsft z x c v b n VolumeMute , . / @sp-rsft pgup _ @sp-lsft z x c v b n VolumeMute , . / @sp-rsft pgup _
lmet lmet lalt lctrl spc rctrl ralt rmet home pgdn end) lmet lmet lalt lctrl _ rctrl ralt rmet home pgdn end)
''; '';
}; };
# quefrency = {
# devices = [ "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-kbd"
# "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-if02"
# "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-if02-event-joystick" ];
# extraDefCfg = ''
# process-unmapped-keys yes
# concurrent-tap-hold yes
# '';
# config = ''
# (defsrc
# grv 1 2 3 4 5 6 7 8 9 0 - = \ del home
# tab q w e r t y u i o p [ ] bspc end
# caps a s d f g h j k l ; ' ret pgup
# lsft z x c v b n m , . / rsft up pgdn
# lctl slck lmet lalt spc ralt rmet rctrl left down right)
# ${k-vars}
# (defalias
# supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet)
# sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft)
# sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft)
# controls (layer-while-held controls))
# (deflayer qwerty
# grv 1 2 3 4 5 6 7 8 9 0 - = \ del home
# tab q w e r t y u i o p [ ] bspc end
# @supesc a s d f g h j k l ; ' ret pgup
# @sp-lsft z x c v b n m , . / @sp-rsft up pgdn
# lmet @controls lalt lctrl spc rctrl ralt rmet left down right)
# (deflayer controls
# grv 1 2 3 4 5 6 7 8 9 0 - = \ del home
# tab q w e r t y u i o MediaPlayPause [ ] bspc end
# @supesc a s d f g MediaTrackNext VolumeDown VolumeUp MediaTrackPrevious l ; ' ret pgup
# @sp-lsft z x c v b n VolumeMute , . / @sp-rsft pgup _
# lmet lmet lalt lctrl spc rctrl ralt rmet home pgdn end)
# '';
# }
razer = { razer = {
devices = [ "/dev/input/by-id/usb-Razer_Razer_Blade-event-kbd" devices = [ "/dev/input/by-id/usb-Razer_Razer_Blade-event-kbd"
"/dev/input/by-id/usb-Razer_Razer_Blade-if01-event-kbd" ]; "/dev/input/by-id/usb-Razer_Razer_Blade-if01-event-kbd" ];
@ -141,6 +104,7 @@ allow-hardware-repeat false
${k-vars} ${k-vars}
(defalias (defalias
spcnav (tap-hold-press $tap-timeout $hold-timeout spc (layer-while-held navigation))
supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet) supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet)
sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft) sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft)
sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft)) sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft))
@ -150,7 +114,14 @@ ${k-vars}
tab q w e r t y u i o p [ ] \ tab q w e r t y u i o p [ ] \
@supesc a s d f g h j k l ; ' ret @supesc a s d f g h j k l ; ' ret
@sp-lsft z x c v b n m , . / @sp-rsft @sp-lsft z x c v b n m , . / @sp-rsft
lmet lalt lctrl spc rctrl ralt) lmet lalt lctrl @spcnav rctrl ralt)
(deflayer navigation
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
@supesc a s d f g left down up right ; ' ret
@sp-lsft z x c v b n m , . / @sp-rsft
lmet lalt lctrl _ rctrl ralt)
''; '';
}; };
}; };