flakes/modules/user/sxhkd.nix

66 lines
2.1 KiB
Nix
Raw Normal View History

2021-05-30 21:37:07 +07:00
{ config, pkgs, ... }:
let
super = "Mod4";
alt = "Mod1";
2021-07-15 13:46:11 +07:00
in {
2021-05-30 21:37:07 +07:00
services.sxhkd = {
enable = true;
keybindings = {
2021-11-15 20:35:31 +07:00
# Dunst (Notification daemon)
"super + grave" = "dunstctl history-pop";
"super + shift + period" = "dunstctl context";
"super + shift + space" = "dunstctl close-all";
2021-11-15 20:35:31 +07:00
2021-05-30 21:37:07 +07:00
# Rofi (App launcher)
"super + Return" = "rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans 8'";
# Printscreen
2021-05-31 09:31:42 +07:00
"Print" = "maim -us | tee ~/Pictures/Screenshots/$(date +%s)c.png | xclip -selection clipboard -t image/png";
"shift + Print" = "maim -u | tee ~/Pictures/Screenshots/$(date +%s).png | xclip -selection clipboard -t image/png";
2021-05-30 21:37:07 +07:00
# Quick-kill picom
"super + p" = "systemctl --user stop picom";
"super + shift + p" = "systemctl --user restart picom";
# Volume
"XF86Audio{RaiseVolume,LowerVolume,Mute}" = "pamixer -{i 5,d 5,t}";
2021-05-30 21:37:07 +07:00
# Brightness
"XF86MonBrightness{Up,Down}" = "light -{A,U} 10";
"shift + XF86MonBrightness{Up,Down}" = "light -{A,U} 1";
# Gamma
"ctrl + XF86MonBrightness{Up,Down}" = "xgamma -gamma {1.3,1}";
2022-04-13 21:42:30 +07:00
"Super_L" = "eww open mainbar";
"@Super_L" = "eww close mainbar";
2021-05-30 21:37:07 +07:00
# Kill focused window
"super + {_,shift + }c" = "bspc node -{c,k}";
# Change focus
"super + {h,j,k,l}" = "bspc node -f {west,south,north,east}";
"super + {Left,Down,Up,Right}" = "bspc node -f {west,south,north,east}";
2021-07-12 11:22:28 +07:00
# Switch windows
"super + shift + {h,j,k,l}" = "bspc node -s {west,south,north,east}";
"super + shift + {Left,Down,Up,Right}" = "bspc node -s {west,south,north,east}";
2021-05-30 21:37:07 +07:00
# Move focused window
"super + shift + {1-9,0}" = "bspc node -d ^{1-9,10}";
# Toggle tiled/fullscreen/floating
"super + {t,f,space}" = "bspc node -t '~{tiled,fullscreen,floating}'";
# Exit / Restart bspwm
"super + shift + {q,r}" = "bspc {quit,wm -r}";
# Restart sxhkd
"super + shift + s" = "pkill -USR1 -x sxhkd";
# Workspace switching
"super + {1-9,0}" = "bspc desktop -f ^{1-9,10}";
};
};
}