diff options
Diffstat (limited to 'modules/desktop/sxhkd/keybindings')
| -rw-r--r-- | modules/desktop/sxhkd/keybindings/brightnessctl.nix | 20 | ||||
| -rw-r--r-- | modules/desktop/sxhkd/keybindings/bspwm.nix | 78 | ||||
| -rw-r--r-- | modules/desktop/sxhkd/keybindings/maim.nix | 20 | ||||
| -rw-r--r-- | modules/desktop/sxhkd/keybindings/pamixer.nix | 30 | ||||
| -rw-r--r-- | modules/desktop/sxhkd/keybindings/playerctl.nix | 10 |
5 files changed, 79 insertions, 79 deletions
diff --git a/modules/desktop/sxhkd/keybindings/brightnessctl.nix b/modules/desktop/sxhkd/keybindings/brightnessctl.nix index 6cdf3e7..bc508e6 100644 --- a/modules/desktop/sxhkd/keybindings/brightnessctl.nix +++ b/modules/desktop/sxhkd/keybindings/brightnessctl.nix @@ -1,15 +1,15 @@ { createKeybindingBase, pkgs, lib }: let - brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; + brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; in lib.mkMerge [ - (createKeybindingBase - "XF86MonBrightnessDown" - "Decrease brightness." - "${brightnessctl} set 5%-") - - (createKeybindingBase - "XF86MonBrightnessUp" - "Increase brightness." - "${brightnessctl} set +5%") + (createKeybindingBase + "XF86MonBrightnessDown" + "Decrease brightness." + "${brightnessctl} set 5%-") + + (createKeybindingBase + "XF86MonBrightnessUp" + "Increase brightness." + "${brightnessctl} set +5%") ] diff --git a/modules/desktop/sxhkd/keybindings/bspwm.nix b/modules/desktop/sxhkd/keybindings/bspwm.nix index ffa7d6c..cd838a3 100644 --- a/modules/desktop/sxhkd/keybindings/bspwm.nix +++ b/modules/desktop/sxhkd/keybindings/bspwm.nix @@ -1,45 +1,45 @@ { createKeybinding, pkgs, lib }: let - bspc = "${pkgs.bspwm}/bin/bspc"; + bspc = "${pkgs.bspwm}/bin/bspc"; in lib.mkMerge [ - (createKeybinding - "q" - "Kill current window." - "${bspc} node -c") - - (createKeybinding - "{1-9,0}" - "Switch workspace." - "${bspc} desktop -f {1-9,10}") - - (createKeybinding - "shift + {1-9,0}" - "Move window to workspace." - "${bspc} node -d {1-9,10} --follow") - - (createKeybinding - "{n,d,m}" - "Set current window mode (tiled, floating, fullscreen)." - "${bspc} node focused -t {tiled,floating,fullscreen}") - - (createKeybinding - "{_,shift + }{h,j,k,l}" - "Navigate between windows." - "${bspc} node --{focus,swap} {west,south,north,east}") - - # the indentation for each line is required to work with the help prompt - (createKeybinding - "ctrl + {h,j,k,l}" - "Resize current window." - '' - ${bspc} node {@parent/second -z left -20 0; \ - @parent/first -z right -20 0, \ - @parent/second -z top 0 +20; \ - @parent/first -z bottom 0 +20, \ - @parent/first -z bottom 0 -20; \ - @parent/second -z top 0 -20, \ - @parent/first -z right +20 0; \ - @parent/second -z left +20 0} + (createKeybinding + "q" + "Kill current window." + "${bspc} node -c") + + (createKeybinding + "{1-9,0}" + "Switch workspace." + "${bspc} desktop -f {1-9,10}") + + (createKeybinding + "shift + {1-9,0}" + "Move window to workspace." + "${bspc} node -d {1-9,10} --follow") + + (createKeybinding + "{n,d,m}" + "Set current window mode (tiled, floating, fullscreen)." + "${bspc} node focused -t {tiled,floating,fullscreen}") + + (createKeybinding + "{_,shift + }{h,j,k,l}" + "Navigate between windows." + "${bspc} node --{focus,swap} {west,south,north,east}") + + # the indentation for each line is required to work with the help prompt + (createKeybinding + "ctrl + {h,j,k,l}" + "Resize current window." + '' + ${bspc} node {@parent/second -z left -20 0; \ + @parent/first -z right -20 0, \ + @parent/second -z top 0 +20; \ + @parent/first -z bottom 0 +20, \ + @parent/first -z bottom 0 -20; \ + @parent/second -z top 0 -20, \ + @parent/first -z right +20 0; \ + @parent/second -z left +20 0} '') ] diff --git a/modules/desktop/sxhkd/keybindings/maim.nix b/modules/desktop/sxhkd/keybindings/maim.nix index b66ec98..2092a71 100644 --- a/modules/desktop/sxhkd/keybindings/maim.nix +++ b/modules/desktop/sxhkd/keybindings/maim.nix @@ -1,15 +1,15 @@ { createKeybinding, pkgs, lib }: let - maim = "${pkgs.maim}/bin/maim"; + maim = "${pkgs.maim}/bin/maim"; in lib.mkMerge [ - (createKeybinding - "p" - "Take screenshot of selected area and save to clipboard" - "${maim} -s | xclip -selection clipboard -t image/png") - - (createKeybinding - "shift + p" - "Take screenshot of selected area and save to ~/Pictures/Screenshots" - "mkdir -p ~/Pictures/Screenshots && ${maim} -s ~/Pictures/Screenshots/screenshot-$(date +%Y%m%d-%H%M%S).png") + (createKeybinding + "p" + "Take screenshot of selected area and save to clipboard" + "${maim} -s | xclip -selection clipboard -t image/png") + + (createKeybinding + "shift + p" + "Take screenshot of selected area and save to ~/Pictures/Screenshots" + "mkdir -p ~/Pictures/Screenshots && ${maim} -s ~/Pictures/Screenshots/screenshot-$(date +%Y%m%d-%H%M%S).png") ] diff --git a/modules/desktop/sxhkd/keybindings/pamixer.nix b/modules/desktop/sxhkd/keybindings/pamixer.nix index a45bf83..e7f056e 100644 --- a/modules/desktop/sxhkd/keybindings/pamixer.nix +++ b/modules/desktop/sxhkd/keybindings/pamixer.nix @@ -1,20 +1,20 @@ { createKeybindingBase, pkgs, lib }: let - pamixer = "${pkgs.pamixer}/bin/pamixer"; + pamixer = "${pkgs.pamixer}/bin/pamixer"; in lib.mkMerge [ - (createKeybindingBase - "XF86AudioLowerVolume" - "Decrease volume." - "${pamixer} --decrease 5") - - (createKeybindingBase - "XF86AudioRaiseVolume" - "Increase volume." - "${pamixer} --increase 5") - - (createKeybindingBase - "XF86AudioMute" - "Mute audio." - "${pamixer} --toggle-mute") + (createKeybindingBase + "XF86AudioLowerVolume" + "Decrease volume." + "${pamixer} --decrease 5") + + (createKeybindingBase + "XF86AudioRaiseVolume" + "Increase volume." + "${pamixer} --increase 5") + + (createKeybindingBase + "XF86AudioMute" + "Mute audio." + "${pamixer} --toggle-mute") ] diff --git a/modules/desktop/sxhkd/keybindings/playerctl.nix b/modules/desktop/sxhkd/keybindings/playerctl.nix index 3e5c4e0..7c3b796 100644 --- a/modules/desktop/sxhkd/keybindings/playerctl.nix +++ b/modules/desktop/sxhkd/keybindings/playerctl.nix @@ -1,10 +1,10 @@ { createKeybindingBase, pkgs, lib }: let - playerctl = "${pkgs.playerctl}/bin/playerctl"; + playerctl = "${pkgs.playerctl}/bin/playerctl"; in lib.mkMerge [ - (createKeybindingBase - "XF86AudioPlay" - "Toggle video / audio player." - "${playerctl} play-pause") + (createKeybindingBase + "XF86AudioPlay" + "Toggle video / audio player." + "${playerctl} play-pause") ] |
