summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/niri/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/niri/default.nix')
-rw-r--r--accounts/gkleen@sif/niri/default.nix55
1 files changed, 28 insertions, 27 deletions
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix
index 10b85169..3c29b83c 100644
--- a/accounts/gkleen@sif/niri/default.nix
+++ b/accounts/gkleen@sif/niri/default.nix
@@ -165,7 +165,6 @@ let
165 with-focused-window-action = config.lib.niri.actions.spawn (lib.getExe (with_predicate_window ".is_focused")); 165 with-focused-window-action = config.lib.niri.actions.spawn (lib.getExe (with_predicate_window ".is_focused"));
166in { 166in {
167 imports = [ 167 imports = [
168 ./waybar.nix
169 ./mako.nix 168 ./mako.nix
170 ]; 169 ];
171 170
@@ -231,17 +230,6 @@ in {
231 config = { 230 config = {
232 home.packages = [ pkgs.xwayland-satellite-unstable ]; 231 home.packages = [ pkgs.xwayland-satellite-unstable ];
233 232
234 services.swayidle = {
235 events = [
236 { event = "after-resume"; command = "${lib.getExe niri} msg action power-on-monitors"; }
237 ];
238 timeouts = [
239 { timeout = 540;
240 command = "${lib.getExe niri} msg action power-off-monitors";
241 }
242 ];
243 };
244
245 systemd.user.sockets.niri-workspace-history = { 233 systemd.user.sockets.niri-workspace-history = {
246 Socket = { 234 Socket = {
247 ListenStream = "%t/niri-workspace-history.sock"; 235 ListenStream = "%t/niri-workspace-history.sock";
@@ -727,7 +715,7 @@ in {
727 715
728 (plain "layer-rule" [ 716 (plain "layer-rule" [
729 (sleaf "match" { namespace = "^notifications$"; }) 717 (sleaf "match" { namespace = "^notifications$"; })
730 (sleaf "match" { namespace = "^waybar$"; }) 718 (sleaf "match" { namespace = "^bar$"; })
731 (sleaf "match" { namespace = "^launcher$"; }) 719 (sleaf "match" { namespace = "^launcher$"; })
732 (sleaf "block-out-from" "screencast") 720 (sleaf "block-out-from" "screencast")
733 ]) 721 ])
@@ -919,23 +907,23 @@ in {
919 "Mod+Right".action = set-column-width "+10%"; 907 "Mod+Right".action = set-column-width "+10%";
920 908
921 "Mod+Shift+Z" = { 909 "Mod+Shift+Z" = {
922 action = spawn (lib.getExe niri) "msg" "action" "power-off-monitors"; 910 action = power-off-monitors;
923 allow-when-locked = true; 911 allow-when-locked = true;
924 }; 912 };
925 "Mod+Shift+L".action = spawn loginctl "lock-session"; 913 # "Mod+Shift+L".action = spawn loginctl "lock-session";
926 "Mod+Shift+E".action = quit; 914 "Mod+Shift+E".action = quit;
927 "Mod+Shift+Minus" = { 915 # "Mod+Shift+Minus" = {
928 action = spawn systemctl "suspend"; 916 # action = spawn systemctl "suspend";
929 allow-when-locked = true; 917 # allow-when-locked = true;
930 }; 918 # };
931 "Mod+Shift+Control+Minus" = { 919 # "Mod+Shift+Control+Minus" = {
932 action = spawn systemctl "hibernate"; 920 # action = spawn systemctl "hibernate";
933 allow-when-locked = true; 921 # allow-when-locked = true;
934 }; 922 # };
935 "Mod+Shift+P" = { 923 # "Mod+Shift+P" = {
936 action = spawn (lib.getExe pkgs.playerctl) "-a" "pause"; 924 # action = spawn (lib.getExe pkgs.playerctl) "-a" "pause";
937 allow-when-locked = true; 925 # allow-when-locked = true;
938 }; 926 # };
939 927
940 "Mod+Semicolon".action = spawn makoctl "dismiss" "--group"; 928 "Mod+Semicolon".action = spawn makoctl "dismiss" "--group";
941 "Mod+Shift+Semicolon".action = spawn makoctl "dismiss" "--all"; 929 "Mod+Shift+Semicolon".action = spawn makoctl "dismiss" "--all";
@@ -985,6 +973,19 @@ in {
985 action = shell { Brightness = "down"; }; 973 action = shell { Brightness = "down"; };
986 allow-when-locked = true; 974 allow-when-locked = true;
987 }; 975 };
976 "Mod+Shift+L".action = shell { LockSession = {}; };
977 "Mod+Shift+Minus" = {
978 action = shell { Suspend = {}; };
979 allow-when-locked = true;
980 };
981 "Mod+Shift+Control+Minus" = {
982 action = shell { Hibernate = {}; };
983 allow-when-locked = true;
984 };
985 "Mod+Shift+P" = {
986 action = shell { Mpris = { PauseAll = {}; }; };
987 allow-when-locked = true;
988 };
988 })) 989 }))
989 (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) 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)
990 (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = kdl.magic-leaf "move-column-to-workspace" name; } 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)