diff options
| author | adikro <adikro@disroot.org> | 2026-01-08 17:15:02 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-01-08 17:15:02 +0100 |
| commit | 6fc5210d51c630dd944d3050328a784b4ece81ba (patch) | |
| tree | 0c0759cccefe64fd7d1a00a95919a4e315934b73 /hm/env/niri/binds.nix | |
| parent | df6d72246bfe33f6f04617c201d45e2f92689560 (diff) | |
changed pc to stable drivers, updated amdgpu drivers and reverted to older kernel version, added swaylock and swayidle, revamped screenshots and niri keybinds
Diffstat (limited to 'hm/env/niri/binds.nix')
| -rw-r--r-- | hm/env/niri/binds.nix | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix index 3cfce88..df5e34d 100644 --- a/hm/env/niri/binds.nix +++ b/hm/env/niri/binds.nix @@ -2,6 +2,7 @@ with config.lib.niri.actions; let playerctl = spawn "${pkgs.playerctl}/bin/playerctl"; + ss = "/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; in { "Mod+O" = { @@ -11,20 +12,18 @@ in "Mod+Slash".action = show-hotkey-overlay; # Audio - XF86AudioRaiseVolume.action = playerctl "volume" "0.02+"; - XF86AudioLowerVolume.action = playerctl "volume" "0.02-"; + XF86AudioRaiseVolume.action = playerctl "volume" "0.03+"; + XF86AudioLowerVolume.action = playerctl "volume" "0.03-"; # microphone - XF86AudioMute.action = spawn "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; - # headphones - "Mod+XF86AudioMute".action = spawn "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - - "Super+Shift+L" = { - allow-when-locked = true; + 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 ''; - }; + + "Super+Shift+L".action = spawn "swaylock" "-f"; # Media keys XF86AudioPlay.action = playerctl "play-pause"; XF86AudioPrev.action = playerctl "previous"; @@ -43,20 +42,19 @@ in "Mod+Shift+P".action = power-off-monitors; "Mod+W".action = toggle-column-tabbed-display; - "Mod+S".action = spawn "sh" "-c" - '' - filename="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S).png" - grim -g "$(slurp)" - | tee "$filename" | wl-copy - ''; - - "Mod+Shift+S".action = spawn "sh" "-c" - '' - filename="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S).png" - grim -g "$(slurp)" "$filename" - - edited="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)-edited.png" - satty --filename "$filename" --output-filename "$edited" - ''; + "Mod+S" = { + action = spawn "sh" "-c" '' + 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" + ''; + repeat = false; + }; "Mod+Shift+D".action = spawn "sh" "-c" '' @@ -69,7 +67,17 @@ in "Mod+C".action = spawn "qalculate-gtk"; "Mod+BracketLeft".action = consume-or-expel-window-left; "Mod+BracketRight".action = consume-or-expel-window-right; - "Super+L".action = spawn "swaylock"; + + "XF86Tools" = { + action = spawn "sh" "-c" '' + pkill -9 firefox || true + swaylock -f + wpctl set-mute @DEFAULT_AUDIO_SINK@ 1 + wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1 + niri msg action power-off-monitors + ''; + repeat = false; + }; "Mod+R".action = switch-preset-column-width; "Mod+Shift+R".action = reset-window-height; |
