diff options
| author | adikro <adikro@disroot.org> | 2026-01-19 11:43:42 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-01-19 11:43:42 +0100 |
| commit | d2571482b4eb5660fd92727efb4e5254df06e45e (patch) | |
| tree | b94282d6f250a82587c25689cba8a1dc1a2f2d96 /hm/env/niri | |
| parent | 760a0edc2937fab375898bbd2f2a3011eb8c9756 (diff) | |
a lot of changes
Diffstat (limited to 'hm/env/niri')
| -rw-r--r-- | hm/env/niri/binds.nix | 58 |
1 files changed, 36 insertions, 22 deletions
diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix index cfa15e8..3c3c00e 100644 --- a/hm/env/niri/binds.nix +++ b/hm/env/niri/binds.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with config.lib.niri.actions; let playerctl = spawn "${pkgs.playerctl}/bin/playerctl"; @@ -17,11 +22,10 @@ in # microphone XF86AudioMute.action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; # # headphones - "Mod+XF86AudioMute". - action = spawn "sh" "-c" '' - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ - wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - ''; + "Mod+XF86AudioMute".action = spawn "sh" "-c" '' + wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ + wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + ''; "Super+Shift+L".action = spawn "swaylock" "-f"; # Media keys @@ -44,20 +48,19 @@ in "Mod+S" = { action = spawn "sh" "-c" '' - grim -g "$(slurp)" - | tee ${ss}.png | wl-copy - ''; + grim -g "$(slurp)" - | tee ${ss}.png | wl-copy + ''; repeat = false; }; "Mod+Shift+S" = { action = spawn "sh" "-c" '' - grim -g "$(slurp)" ${ss}.png - satty --filename "${ss}.png" --output-filename "${ss}-edited.png" - ''; + grim -g "$(slurp)" ${ss}.png + satty --filename "${ss}.png" --output-filename "${ss}-edited.png" + ''; repeat = false; }; - "Mod+Shift+D".action = spawn "sh" "-c" - '' + "Mod+Shift+D".action = spawn "sh" "-c" '' cliphist list | fuzzel --dmenu | cliphist decode | wl-copy ''; @@ -106,12 +109,23 @@ in "Super+Return".action = spawn "obs-cmd" "replay" "save"; -} // ( - builtins.listToAttrs (builtins.concatMap (keyNum: let - key = toString keyNum; - targetWS = keyNum + 1; - in [ - { name = "Mod+${key}"; value.action = focus-workspace targetWS; } - { name = "Mod+Shift+${key}"; value.action.move-column-to-workspace = [ targetWS ]; } - ]) (lib.range 1 9)) -) +} +// (builtins.listToAttrs ( + builtins.concatMap ( + keyNum: + let + key = toString keyNum; + targetWS = keyNum + 1; + in + [ + { + name = "Mod+${key}"; + value.action = focus-workspace targetWS; + } + { + name = "Mod+Shift+${key}"; + value.action.move-column-to-workspace = [ targetWS ]; + } + ] + ) (lib.range 1 9) +)) |
