diff options
Diffstat (limited to 'accounts/gkleen@sif/niri/default.nix')
-rw-r--r-- | accounts/gkleen@sif/niri/default.nix | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix index e1eca4c4..1ff149bc 100644 --- a/accounts/gkleen@sif/niri/default.nix +++ b/accounts/gkleen@sif/niri/default.nix | |||
@@ -947,22 +947,6 @@ in { | |||
947 | action = spawn swayosd-client "--brightness" "lower"; | 947 | action = spawn swayosd-client "--brightness" "lower"; |
948 | allow-when-locked = true; | 948 | allow-when-locked = true; |
949 | }; | 949 | }; |
950 | "XF86AudioRaiseVolume" = { | ||
951 | action = spawn swayosd-client "--output-volume" "raise"; | ||
952 | allow-when-locked = true; | ||
953 | }; | ||
954 | "XF86AudioLowerVolume" = { | ||
955 | action = spawn swayosd-client "--output-volume" "lower"; | ||
956 | allow-when-locked = true; | ||
957 | }; | ||
958 | "XF86AudioMute" = { | ||
959 | action = spawn swayosd-client "--output-volume" "mute-toggle"; | ||
960 | allow-when-locked = true; | ||
961 | }; | ||
962 | "XF86AudioMicMute" = { | ||
963 | action = spawn swayosd-client "--input-volume" "mute-toggle"; | ||
964 | allow-when-locked = true; | ||
965 | }; | ||
966 | 950 | ||
967 | "Mod+Semicolon".action = spawn makoctl "dismiss" "--group"; | 951 | "Mod+Semicolon".action = spawn makoctl "dismiss" "--group"; |
968 | "Mod+Shift+Semicolon".action = spawn makoctl "dismiss" "--all"; | 952 | "Mod+Shift+Semicolon".action = spawn makoctl "dismiss" "--all"; |
@@ -982,6 +966,29 @@ in { | |||
982 | "Mod+K".action = spawn (lib.getExe' pkgs.worktime "worktime-ui"); | 966 | "Mod+K".action = spawn (lib.getExe' pkgs.worktime "worktime-ui"); |
983 | "Mod+Shift+K".action = spawn (lib.getExe' pkgs.worktime "worktime-stop"); | 967 | "Mod+Shift+K".action = spawn (lib.getExe' pkgs.worktime "worktime-stop"); |
984 | })) | 968 | })) |
969 | (lib.mapAttrsToList (name: cfg: node name [(lib.removeAttrs cfg ["action"])] [cfg.action]) (let | ||
970 | shell = obj: leaf "send-unix" [ | ||
971 | { path = ''''${XDG_RUNTIME_DIR}/shell.sock''; } | ||
972 | (builtins.toJSON obj + "\n") | ||
973 | ]; | ||
974 | in { | ||
975 | "XF86AudioRaiseVolume" = { | ||
976 | allow-when-locked = true; | ||
977 | action = shell { Volume.volume = "up"; }; | ||
978 | }; | ||
979 | "XF86AudioLowerVolume" = { | ||
980 | allow-when-locked = true; | ||
981 | action = shell { Volume.volume = "down"; }; | ||
982 | }; | ||
983 | "XF86AudioMute" = { | ||
984 | allow-when-locked = true; | ||
985 | action = shell { Volume.muted = "toggle"; }; | ||
986 | }; | ||
987 | "XF86AudioMicMute" = { | ||
988 | allow-when-locked = true; | ||
989 | action = shell { Volume."mic-muted" = "toggle"; }; | ||
990 | }; | ||
991 | })) | ||
985 | (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) | 992 | (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) |
986 | (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = kdl.magic-leaf "move-column-to-workspace" name; } else null) cfg.scratchspaces) | 993 | (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = kdl.magic-leaf "move-column-to-workspace" name; } else null) cfg.scratchspaces) |
987 | ] | 994 | ] |