Compare commits

...

2 Commits

Author SHA1 Message Date
tosu a29894ff94
Add keybindings back 2023-08-15 01:11:43 +02:00
tosu ed78cc2680
Add back command vectors 2023-08-15 01:11:01 +02:00
1 changed files with 46 additions and 0 deletions

View File

@ -58,9 +58,55 @@ static const Layout layouts[] = {
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "alacritty", NULL };
static const char *brightnessUp[] = { "light", "-A", "2", NULL };
static const char *brightnessDown[] = { "light", "-U", "2", NULL };
static const char *toggleKeymap[] = { "toggle-keymap", NULL };
static const char *compile[] = { "suck", NULL };
static const char *pyEvalFrac[] = { "pyeval", "frac", NULL };
static const char *pyEvalDec[] = { "pyeval", "dec", NULL };
static const char *custom[] = { "custom.sh", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("light -A 15") },
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("light -U 15") },
{ ShiftMask, XF86XK_MonBrightnessUp, spawn, SHCMD("light -A 2") },
{ ShiftMask, XF86XK_MonBrightnessDown, spawn, SHCMD("light -U 2") },
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 10 --allow-boost --set-limit 300") },
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer -d 10 --allow-boost --set-limit 300") },
{ ShiftMask, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 2 --allow-boost --set-limit 300") },
{ ShiftMask, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer -d 2 --allow-boost --set-limit 300") },
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t") },
{ MODKEY|ShiftMask, XK_k, spawn, {.v = toggleKeymap } },
{ ControlMask|ShiftMask, XK_s, spawn, SHCMD("sscrot") },
{ MODKEY, XK_q, spawn, {.v = compile} },
{ MODKEY|ControlMask, XK_d, spawn, {.v = pyEvalFrac} },
{ MODKEY|ControlMask, XK_e, spawn, {.v = pyEvalDec} },
{ MODKEY|ControlMask, XK_n, spawn, {.v = custom} },
{ MODKEY, XK_v, spawn, SHCMD("sleep 0.5; xdotool type \"$(xclip -d :0 -o -selection clipboard)\"") },
{ MODKEY|ControlMask, XK_l, spawn, SHCMD("slock") },
{ MODKEY, XK_Up, spawn, SHCMD("exec xdotool mousemove_relative -- 0 -15") },
{ MODKEY, XK_k, spawn, SHCMD("exec xdotool mousemove_relative -- 0 -15") },
{ MODKEY, XK_Down, spawn, SHCMD("exec xdotool mousemove_relative 0 15") },
{ MODKEY, XK_j, spawn, SHCMD("exec xdotool mousemove_relative 0 15") },
{ MODKEY, XK_Right, spawn, SHCMD("exec xdotool mousemove_relative 15 0") },
{ MODKEY, XK_l, spawn, SHCMD("exec xdotool mousemove_relative 15 0") },
{ MODKEY, XK_Left, spawn, SHCMD("exec xdotool mousemove_relative -- -15 0") },
{ MODKEY, XK_h, spawn, SHCMD("exec xdotool mousemove_relative -- -15 0") },
{ MODKEY|ControlMask, XK_Up, spawn, SHCMD("exec xdotool mousemove_relative -- 0 -100") },
{ MODKEY|ControlMask, XK_k, spawn, SHCMD("exec xdotool mousemove_relative -- 0 -100") },
{ MODKEY|ControlMask, XK_Down, spawn, SHCMD("exec xdotool mousemove_relative 0 100") },
{ MODKEY|ControlMask, XK_j, spawn, SHCMD("exec xdotool mousemove_relative 0 100") },
{ MODKEY|ControlMask, XK_Right, spawn, SHCMD("exec xdotool mousemove_relative 100 0") },
{ MODKEY|ControlMask, XK_l, spawn, SHCMD("exec xdotool mousemove_relative 100 0") },
{ MODKEY|ControlMask, XK_Left, spawn, SHCMD("exec xdotool mousemove_relative -- -100 0") },
{ MODKEY|ControlMask, XK_h, spawn, SHCMD("exec xdotool mousemove_relative -- -100 0") },
{ MODKEY, XK_Return, spawn, SHCMD("exec xdotool click 1") },
{ MODKEY|ShiftMask, XK_Return, spawn, SHCMD("exec xdotool click 3") },
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },