diff --git a/modules/features/niri.nix b/modules/features/niri.nix index d7e7ee0..b4bb680 100644 --- a/modules/features/niri.nix +++ b/modules/features/niri.nix @@ -2,13 +2,12 @@ perSystem = { pkgs, ... }: { packages.niri = inputs.wrapper-modules.wrappers.niri.wrap { inherit pkgs; - settings = { - prefer-no-csd = true; + prefer-no-csd = {}; - spawn-at-startup = [ - { command = [ "sh" "-c" "noctalia-shell" ]; } - { command = [ "sh" "-c" "ckb-next -b" ]; } + spawn-sh-at-startup = [ + "noctalia-shell" + "ckb-next -b" ]; screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"; @@ -17,12 +16,6 @@ gaps = 5; center-focused-column = "never"; - preset-column-widths = [ - 0.33333 - 0.5 - 0.66667 - ]; - default-column-width = { proportion = 0.5; }; @@ -34,7 +27,7 @@ }; border = { - off = true; + off = {}; width = 4; active-color = "#ffc87f"; inactive-color = "#505050"; @@ -42,48 +35,52 @@ }; }; - output = { + outputs = { "HDMI-A-1" = { mode = "1920x1080@60.00"; - position = { - x = 0; - y = 180; - }; + position = _: { + props = { + x = 0; + y = 180; + }; + }; }; "DP-2" = { mode = "2560x1440@144.00"; - position = { - x = 1920; - y = 0; - }; - variable-refresh-rate = true; + position = _: { + props = { + x = 1920; + y = 0; + }; + }; + variable-refresh-rate = {}; }; "DP-1" = { mode = "1680x1050@60.00"; - position = { - x = 4480; - y = 195; - }; + position = _: { + props = { + x = 4480; + y = 195; + }; + }; }; }; input = { keyboard = { - numlock = true; + numlock = {}; repeat-rate = 35; repeat-delay = 500; }; touchpad = { - tap = true; - natural-scroll = true; + tap = {}; + natural-scroll = {}; }; - focus-follows-mouse = { - max-scroll-amount = "0%"; - }; + focus-follows-mouse = {}; }; window-rules = [ @@ -99,9 +96,7 @@ block-out-from = "screen-capture"; } { - geometry-corner-radius = { - radius = 12; - }; + geometry-corner-radius = 12; clip-to-geometry = true; } { @@ -119,222 +114,164 @@ ]; binds = { - "Mod+Shift+Slash".action.show-hotkey-overlay = true; + "Mod+Shift+Slash".show-hotkey-overlay = {}; - "Mod+T" = { - hotkey-overlay-title = "Open a Terminal: alacritty"; - action.spawn = config.terminal; # Uses your custom option - }; - "Mod+D" = { - hotkey-overlay-title = "Run an Application: fuzzel"; - action.spawn = "fuzzel"; - }; - "Super+Ctrl+L" = { - hotkey-overlay-title = "Lock the Screen: swaylock"; - action.spawn = "swaylock"; - }; - "Super+Alt+S" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "pkill orca || exec orca" ]; - }; + "Mod+T".spawn = "alacritty"; + "Mod+D".spawn = "fuzzel"; + "Super+Ctrl+L".spawn = "swaylock"; + "Super+Alt+S".spawn = [ "sh" "-c" "pkill orca || exec orca" ]; # Media & Volume Controls - "XF86AudioRaiseVolume" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0" ]; - }; - "XF86AudioLowerVolume" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-" ]; - }; - "XF86AudioMute" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ]; - }; - "XF86AudioMicMute" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" ]; - }; - "XF86AudioPlay" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "playerctl play-pause" ]; - }; - "XF86AudioStop" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "playerctl stop" ]; - }; - "XF86AudioPrev" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "playerctl previous" ]; - }; - "XF86AudioNext" = { - allow-when-locked = true; - action.spawn = [ "sh" "-c" "playerctl next" ]; - }; + "XF86AudioRaiseVolume".spawn = [ "sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0" ]; + "XF86AudioLowerVolume".spawn = [ "sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-" ]; + "XF86AudioMute".spawn = [ "sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ]; + "XF86AudioMicMute".spawn = [ "sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" ]; + "XF86AudioPlay".spawn = [ "sh" "-c" "playerctl play-pause" ]; + "XF86AudioStop".spawn = [ "sh" "-c" "playerctl stop" ]; + "XF86AudioPrev".spawn = [ "sh" "-c" "playerctl previous" ]; + "XF86AudioNext".spawn = [ "sh" "-c" "playerctl next" ]; # Brightness Controls - "XF86MonBrightnessUp" = { - allow-when-locked = true; - action.spawn = [ "brightnessctl" "--class=backlight" "set" "+10%" ]; - }; - "XF86MonBrightnessDown" = { - allow-when-locked = true; - action.spawn = [ "brightnessctl" "--class=backlight" "set" "10%-" ]; - }; + "XF86MonBrightnessUp".spawn = [ "brightnessctl" "--class=backlight" "set" "+10%" ]; + "XF86MonBrightnessDown".spawn = [ "brightnessctl" "--class=backlight" "set" "10%-" ]; # Window & Layout Navigation - "Mod+O" = { - repeat = false; - action.toggle-overview = true; - }; - "Mod+Q" = { - repeat = false; - action.close-window = true; - }; - "Mod+Left".action.focus-column-left = true; - "Mod+Down".action.focus-window-down = true; - "Mod+Up".action.focus-window-up = true; - "Mod+Right".action.focus-column-right = true; - "Mod+H".action.focus-column-left = true; - "Mod+J".action.focus-window-down = true; - "Mod+K".action.focus-window-up = true; - "Mod+L".action.focus-column-right = true; + "Mod+O".toggle-overview = {}; + "Mod+Q".close-window = {}; + + "Mod+Left".focus-column-left = {}; + "Mod+Down".focus-window-down = {}; + "Mod+Up".focus-window-up = {}; + "Mod+Right".focus-column-right = {}; + + "Mod+H".focus-column-left = {}; + "Mod+J".focus-window-down = {}; + "Mod+K".focus-window-up = {}; + "Mod+L".focus-column-right = {}; - "Mod+Ctrl+Left".action.move-column-left = true; - "Mod+Ctrl+Down".action.move-window-down = true; - "Mod+Ctrl+Up".action.move-window-up = true; - "Mod+Ctrl+Right".action.move-column-right = true; - "Mod+Ctrl+H".action.move-column-left = true; - "Mod+Ctrl+J".action.move-window-down = true; - "Mod+Ctrl+K".action.move-window-up = true; - "Mod+Ctrl+L".action.move-column-right = true; + "Mod+Ctrl+Left".move-column-left = {}; + "Mod+Ctrl+Down".move-window-down = {}; + "Mod+Ctrl+Up".move-window-up = {}; + "Mod+Ctrl+Right".move-column-right = {}; + + "Mod+Ctrl+H".move-column-left = {}; + "Mod+Ctrl+J".move-window-down = {}; + "Mod+Ctrl+K".move-window-up = {}; + "Mod+Ctrl+L".move-column-right = {}; - "Mod+Home".action.focus-column-first = true; - "Mod+End".action.focus-column-last = true; - "Mod+Ctrl+Home".action.move-column-to-first = true; - "Mod+Ctrl+End".action.move-column-to-last = true; + "Mod+Home".focus-column-first = {}; + "Mod+End".focus-column-last = {}; + "Mod+Ctrl+Home".move-column-to-first = {}; + "Mod+Ctrl+End".move-column-to-last = {}; # Monitor Navigation - "Mod+Shift+Left".action.focus-monitor-left = true; - "Mod+Shift+Down".action.focus-monitor-down = true; - "Mod+Shift+Up".action.focus-monitor-up = true; - "Mod+Shift+Right".action.focus-monitor-right = true; - "Mod+Shift+H".action.focus-monitor-left = true; - "Mod+Shift+J".action.focus-monitor-down = true; - "Mod+Shift+K".action.focus-monitor-up = true; - "Mod+Shift+L".action.focus-monitor-right = true; + "Mod+Shift+Left".focus-monitor-left = {}; + "Mod+Shift+Down".focus-monitor-down = {}; + "Mod+Shift+Up".focus-monitor-up = {}; + "Mod+Shift+Right".focus-monitor-right = {}; + + "Mod+Shift+H".focus-monitor-left = {}; + "Mod+Shift+J".focus-monitor-down = {}; + "Mod+Shift+K".focus-monitor-up = {}; + "Mod+Shift+L".focus-monitor-right = {}; - "Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = true; - "Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = true; - "Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = true; - "Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = true; - "Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = true; - "Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = true; - "Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = true; - "Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = true; + "Mod+Shift+Ctrl+Left".move-column-to-monitor-left = {}; + "Mod+Shift+Ctrl+Down".move-column-to-monitor-down = {}; + "Mod+Shift+Ctrl+Up".move-column-to-monitor-up = {}; + "Mod+Shift+Ctrl+Right".move-column-to-monitor-right = {}; + + "Mod+Shift+Ctrl+H".move-column-to-monitor-left = {}; + "Mod+Shift+Ctrl+J".move-column-to-monitor-down = {}; + "Mod+Shift+Ctrl+K".move-column-to-monitor-up = {}; + "Mod+Shift+Ctrl+L".move-column-to-monitor-right = {}; # Workspace Navigation - "Mod+Page_Down".action.focus-workspace-down = true; - "Mod+Page_Up".action.focus-workspace-up = true; - "Mod+U".action.focus-workspace-down = true; - "Mod+I".action.focus-workspace-up = true; + "Mod+Page_Down".focus-workspace-down = {}; + "Mod+Page_Up".focus-workspace-up = {}; + "Mod+U".focus-workspace-down = {}; + "Mod+I".focus-workspace-up = {}; - "Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = true; - "Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = true; - "Mod+Ctrl+U".action.move-column-to-workspace-down = true; - "Mod+Ctrl+I".action.move-column-to-workspace-up = true; + "Mod+Ctrl+Page_Down".move-column-to-workspace-down = {}; + "Mod+Ctrl+Page_Up".move-column-to-workspace-up = {}; + "Mod+Ctrl+U".move-column-to-workspace-down = {}; + "Mod+Ctrl+I".move-column-to-workspace-up = {}; - "Mod+Shift+Page_Down".action.move-workspace-down = true; - "Mod+Shift+Page_Up".action.move-workspace-up = true; - "Mod+Shift+U".action.move-workspace-down = true; - "Mod+Shift+I".action.move-workspace-up = true; + "Mod+Shift+Page_Down".move-workspace-down = {}; + "Mod+Shift+Page_Up".move-workspace-up = {}; + "Mod+Shift+U".move-workspace-down = {}; + "Mod+Shift+I".move-workspace-up = {}; # Scrolling / Mouse Wheel - "Mod+WheelScrollDown" = { - cooldown-ms = 150; - action.focus-workspace-down = true; - }; - "Mod+WheelScrollUp" = { - cooldown-ms = 150; - action.focus-workspace-up = true; - }; - "Mod+Ctrl+WheelScrollDown" = { - cooldown-ms = 150; - action.move-column-to-workspace-down = true; - }; - "Mod+Ctrl+WheelScrollUp" = { - cooldown-ms = 150; - action.move-column-to-workspace-up = true; - }; + "Mod+WheelScrollDown".focus-workspace-down = {}; + "Mod+WheelScrollUp".focus-workspace-up = {}; + "Mod+Ctrl+WheelScrollDown".move-column-to-workspace-down = {}; + "Mod+Ctrl+WheelScrollUp".move-column-to-workspace-up = {}; - "Mod+WheelScrollRight".action.focus-column-right = true; - "Mod+WheelScrollLeft".action.focus-column-left = true; - "Mod+Ctrl+WheelScrollRight".action.move-column-right = true; - "Mod+Ctrl+WheelScrollLeft".action.move-column-left = true; + "Mod+WheelScrollRight".focus-column-right = {}; + "Mod+WheelScrollLeft".focus-column-left = {}; + "Mod+Ctrl+WheelScrollRight".move-column-right = {}; + "Mod+Ctrl+WheelScrollLeft".move-column-left = {}; - "Mod+Shift+WheelScrollDown".action.focus-column-right = true; - "Mod+Shift+WheelScrollUp".action.focus-column-left = true; - "Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = true; - "Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = true; + "Mod+Shift+WheelScrollDown".focus-column-right = {}; + "Mod+Shift+WheelScrollUp".focus-column-left = {}; + "Mod+Ctrl+Shift+WheelScrollDown".move-column-right = {}; + "Mod+Ctrl+Shift+WheelScrollUp".move-column-left = {}; # Numbered Workspaces - "Mod+1".action.focus-workspace = 1; - "Mod+2".action.focus-workspace = 2; - "Mod+3".action.focus-workspace = 3; - "Mod+4".action.focus-workspace = 4; - "Mod+5".action.focus-workspace = 5; - "Mod+6".action.focus-workspace = 6; - "Mod+7".action.focus-workspace = 7; - "Mod+8".action.focus-workspace = 8; - "Mod+9".action.focus-workspace = 9; + "Mod+1".focus-workspace = 1; + "Mod+2".focus-workspace = 2; + "Mod+3".focus-workspace = 3; + "Mod+4".focus-workspace = 4; + "Mod+5".focus-workspace = 5; + "Mod+6".focus-workspace = 6; + "Mod+7".focus-workspace = 7; + "Mod+8".focus-workspace = 8; + "Mod+9".focus-workspace = 9; - "Mod+Ctrl+1".action.move-column-to-workspace = 1; - "Mod+Ctrl+2".action.move-column-to-workspace = 2; - "Mod+Ctrl+3".action.move-column-to-workspace = 3; - "Mod+Ctrl+4".action.move-column-to-workspace = 4; - "Mod+Ctrl+5".action.move-column-to-workspace = 5; - "Mod+Ctrl+6".action.move-column-to-workspace = 6; - "Mod+Ctrl+7".action.move-column-to-workspace = 7; - "Mod+Ctrl+8".action.move-column-to-workspace = 8; - "Mod+Ctrl+9".action.move-column-to-workspace = 9; + "Mod+Ctrl+1".move-column-to-workspace = 1; + "Mod+Ctrl+2".move-column-to-workspace = 2; + "Mod+Ctrl+3".move-column-to-workspace = 3; + "Mod+Ctrl+4".move-column-to-workspace = 4; + "Mod+Ctrl+5".move-column-to-workspace = 5; + "Mod+Ctrl+6".move-column-to-workspace = 6; + "Mod+Ctrl+7".move-column-to-workspace = 7; + "Mod+Ctrl+8".move-column-to-workspace = 8; + "Mod+Ctrl+9".move-column-to-workspace = 9; # Window Layout Adjustments - "Mod+BracketLeft".action.consume-or-expel-window-left = true; - "Mod+BracketRight".action.consume-or-expel-window-right = true; - "Mod+Comma".action.consume-window-into-column = true; - "Mod+Period".action.expel-window-from-column = true; + "Mod+BracketLeft".consume-or-expel-window-left = {}; + "Mod+BracketRight".consume-or-expel-window-right = {}; + "Mod+Comma".consume-window-into-column = {}; + "Mod+Period".expel-window-from-column = {}; - "Mod+R".action.switch-preset-column-width = true; - "Mod+Shift+R".action.switch-preset-window-height = true; - "Mod+Ctrl+R".action.reset-window-height = true; - "Mod+F".action.maximize-column = true; - "Mod+Shift+F".action.fullscreen-window = true; - "Mod+Ctrl+F".action.expand-column-to-available-width = true; - "Mod+C".action.center-column = true; - "Mod+Ctrl+C".action.center-visible-columns = true; + "Mod+R".switch-preset-column-width = {}; + "Mod+Shift+R".switch-preset-window-height = {}; + "Mod+Ctrl+R".reset-window-height = {}; + "Mod+F".maximize-column = {}; + "Mod+Shift+F".fullscreen-window = {}; + "Mod+Ctrl+F".expand-column-to-available-width = {}; + "Mod+C".center-column = {}; + "Mod+Ctrl+C".center-visible-columns = {}; - "Mod+Minus".action.set-column-width = "-10%"; - "Mod+Equal".action.set-column-width = "+10%"; - "Mod+Shift+Minus".action.set-window-height = "-10%"; - "Mod+Shift+Equal".action.set-window-height = "+10%"; + "Mod+Minus".set-column-width = "-10%"; + "Mod+Equal".set-column-width = "+10%"; + "Mod+Shift+Minus".set-window-height = "-10%"; + "Mod+Shift+Equal".set-window-height = "+10%"; - "Mod+V".action.toggle-window-floating = true; - "Mod+Shift+V".action.switch-focus-between-floating-and-tiling = true; - "Mod+W".action.toggle-column-tabbed-display = true; + "Mod+V".toggle-window-floating = {}; + "Mod+Shift+V".switch-focus-between-floating-and-tiling = {}; + "Mod+W".toggle-column-tabbed-display = {}; # Screenshots - "Print".action.screenshot = true; - "Ctrl+Print".action.screenshot-screen = true; - "Alt+Print".action.screenshot-window = true; + "Print".screenshot = {}; + "Ctrl+Print".screenshot-screen = {}; + "Alt+Print".screenshot-window = {}; # System Controls - "Mod+Escape" = { - allow-inhibiting = false; - action.toggle-keyboard-shortcuts-inhibit = true; - }; - "Mod+Shift+E".action.quit = true; - "Ctrl+Alt+Delete".action.quit = true; - "Mod+Shift+P".action.power-off-monitors = true; + "Mod+Escape".toggle-keyboard-shortcuts-inhibit = {}; + "Mod+Shift+E".quit = {}; + "Ctrl+Alt+Delete".quit = {}; + "Mod+Shift+P".power-off-monitors = {}; }; }; };