diff options
Diffstat (limited to 'accounts/gkleen@sif/niri/default.nix')
| -rw-r--r-- | accounts/gkleen@sif/niri/default.nix | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix index 3c29b83c..5ae372c1 100644 --- a/accounts/gkleen@sif/niri/default.nix +++ b/accounts/gkleen@sif/niri/default.nix | |||
| @@ -7,9 +7,6 @@ let | |||
| 7 | 7 | ||
| 8 | niri = cfg.package; | 8 | niri = cfg.package; |
| 9 | terminal = lib.getExe config.programs.kitty.package; | 9 | terminal = lib.getExe config.programs.kitty.package; |
| 10 | makoctl = lib.getExe' config.services.mako.package "makoctl"; | ||
| 11 | loginctl = lib.getExe' hostConfig.systemd.package "loginctl"; | ||
| 12 | systemctl = lib.getExe' hostConfig.systemd.package "systemctl"; | ||
| 13 | 10 | ||
| 14 | focus_or_spawn = pkgs.writeShellApplication { | 11 | focus_or_spawn = pkgs.writeShellApplication { |
| 15 | name = "focus-or-spawn"; | 12 | name = "focus-or-spawn"; |
| @@ -164,10 +161,6 @@ let | |||
| 164 | with-urgent-window-action = config.lib.niri.actions.spawn (lib.getExe (with_predicate_window ".is_urgent")); | 161 | with-urgent-window-action = config.lib.niri.actions.spawn (lib.getExe (with_predicate_window ".is_urgent")); |
| 165 | with-focused-window-action = config.lib.niri.actions.spawn (lib.getExe (with_predicate_window ".is_focused")); | 162 | with-focused-window-action = config.lib.niri.actions.spawn (lib.getExe (with_predicate_window ".is_focused")); |
| 166 | in { | 163 | in { |
| 167 | imports = [ | ||
| 168 | ./mako.nix | ||
| 169 | ]; | ||
| 170 | |||
| 171 | options = { | 164 | options = { |
| 172 | programs.niri.scratchspaces = lib.mkOption { | 165 | programs.niri.scratchspaces = lib.mkOption { |
| 173 | type = lib.types.listOf (lib.types.submodule ({ config, ... }: { | 166 | type = lib.types.listOf (lib.types.submodule ({ config, ... }: { |
| @@ -910,25 +903,12 @@ in { | |||
| 910 | action = power-off-monitors; | 903 | action = power-off-monitors; |
| 911 | allow-when-locked = true; | 904 | allow-when-locked = true; |
| 912 | }; | 905 | }; |
| 913 | # "Mod+Shift+L".action = spawn loginctl "lock-session"; | ||
| 914 | "Mod+Shift+E".action = quit; | 906 | "Mod+Shift+E".action = quit; |
| 915 | # "Mod+Shift+Minus" = { | 907 | |
| 916 | # action = spawn systemctl "suspend"; | 908 | # "Mod+Semicolon".action = spawn makoctl "dismiss" "--group"; |
| 917 | # allow-when-locked = true; | 909 | # "Mod+Shift+Semicolon".action = spawn makoctl "dismiss" "--all"; |
| 918 | # }; | 910 | # "Mod+Period".action = spawn makoctl "menu" "--" (lib.getExe config.programs.fuzzel.package) "--dmenu"; |
| 919 | # "Mod+Shift+Control+Minus" = { | 911 | # "Mod+Comma".action = spawn makoctl "restore"; |
| 920 | # action = spawn systemctl "hibernate"; | ||
| 921 | # allow-when-locked = true; | ||
| 922 | # }; | ||
| 923 | # "Mod+Shift+P" = { | ||
| 924 | # action = spawn (lib.getExe pkgs.playerctl) "-a" "pause"; | ||
| 925 | # allow-when-locked = true; | ||
| 926 | # }; | ||
| 927 | |||
| 928 | "Mod+Semicolon".action = spawn makoctl "dismiss" "--group"; | ||
| 929 | "Mod+Shift+Semicolon".action = spawn makoctl "dismiss" "--all"; | ||
| 930 | "Mod+Period".action = spawn makoctl "menu" "--" (lib.getExe config.programs.fuzzel.package) "--dmenu"; | ||
| 931 | "Mod+Comma".action = spawn makoctl "restore"; | ||
| 932 | 912 | ||
| 933 | "Mod+Control+W".action = with-empty-unnamed-workspace-action "{\"Action\":{\"FocusWorkspace\":{\"reference\":{\"Id\": $workspace_id}}}}"; | 913 | "Mod+Control+W".action = with-empty-unnamed-workspace-action "{\"Action\":{\"FocusWorkspace\":{\"reference\":{\"Id\": $workspace_id}}}}"; |
| 934 | "Mod+Control+Shift+W".action = with-empty-unnamed-workspace-action "{\"Action\":{\"MoveColumnToWorkspace\":{\"reference\":{\"Id\": $workspace_id}, \"focus\": true}}}"; | 914 | "Mod+Control+Shift+W".action = with-empty-unnamed-workspace-action "{\"Action\":{\"MoveColumnToWorkspace\":{\"reference\":{\"Id\": $workspace_id}, \"focus\": true}}}"; |
| @@ -986,6 +966,8 @@ in { | |||
| 986 | action = shell { Mpris = { PauseAll = {}; }; }; | 966 | action = shell { Mpris = { PauseAll = {}; }; }; |
| 987 | allow-when-locked = true; | 967 | allow-when-locked = true; |
| 988 | }; | 968 | }; |
| 969 | "Mod+Semicolon".action = shell { Notifications = { DismissGroup = {}; }; }; | ||
| 970 | "Mod+Shift+Semicolon".action = shell { Notifications = { DismissAll = {}; }; }; | ||
| 989 | })) | 971 | })) |
| 990 | (map ({ name, selector, spawn, key, ...}: if key != null && selector != null && spawn != null then bind key { action = focus-or-spawn-action selector name spawn; } else null) cfg.scratchspaces) | 972 | (map ({ name, selector, spawn, key, ...}: if key != null && selector != null && spawn != null then bind key { action = focus-or-spawn-action selector name spawn; } else null) cfg.scratchspaces) |
| 991 | (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = kdl.magic-leaf "move-column-to-workspace" name; } else null) cfg.scratchspaces) | 973 | (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = kdl.magic-leaf "move-column-to-workspace" name; } else null) cfg.scratchspaces) |
