summaryrefslogtreecommitdiff
path: root/hm/env/niri/binds.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hm/env/niri/binds.nix')
-rw-r--r--hm/env/niri/binds.nix58
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)
+))