From 37e3b9fd3444f023f889c3a30a19bf88650f0a8e Mon Sep 17 00:00:00 2001 From: Andreev Gregory <1@example.com> Date: Thu, 6 Mar 2025 13:13:23 +0300 Subject: [PATCH] Added a lot of cool keybindings --- config.def.h | 62 +++++++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/config.def.h b/config.def.h index 25f29c3..6bcc877 100644 --- a/config.def.h +++ b/config.def.h @@ -43,7 +43,7 @@ static const Rule rules[] = { */ /* class instance title tags mask isfloating monitor */ { "Gimp", NULL, NULL, 0, 1, -1 }, - { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, + //{ "Firefox", NULL, NULL, 1 << 8, 0, -1 }, }; /* layout(s) */ @@ -77,35 +77,44 @@ static const char *termcmd[] = { "st", NULL }; static const char *flexcmd[]= {"st", "-g", "115x29", "-e", "sh", "-c", "neofetch; sleep 100", NULL}; static const char *dmenucmd[] = {"dmenu_run.sh", NULL}; static const char* termtmuxzshcmd[] = {"st", "-e", "tmux", "new-session", "zsh", NULL}; +static const char* flameshotcmd[] = {"flameshot", "gui", NULL}; +static const char* pa_mute[] = {"pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL}; +static const char* pa_lower[] = {"pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL}; +static const char* pa_raise[] = {"pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL}; static const Key keys[] = { /* modifier key function argument */ - { MODKEY, XK_space, toggle_keyboard_layout, {0} }, - { MODKEY, XK_r, spawn, {.v = dmenucmd } }, - { MODKEY|ControlMask, XK_s, spawn, {.v = termcmd } }, - { MODKEY, XK_s, spawn, {.v = termtmuxzshcmd } }, - { MODKEY|ControlMask, XK_n, spawn, {.v = flexcmd } }, - { MODKEY, XK_b, togglebar, {0} }, - { MODKEY, XK_k, focusstack, {.i = +1 } }, - { MODKEY, XK_l, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, - { MODKEY, XK_d, incnmaster, {.i = -1 } }, - { MODKEY, XK_j, setmfact, {.f = -0.05} }, - { MODKEY, XK_semicolon , setmfact, {.f = +0.05} }, - { MODKEY, XK_Return, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY|Mod1Mask , XK_c, killclient, {0} }, - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, + { 0, XK_Print, spawn, {.v = flameshotcmd } }, + { 0, XF86XK_AudioMute, spawn, {.v = pa_mute } }, + { 0, XF86XK_AudioLowerVolume, spawn, {.v = pa_lower } }, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = pa_raise } }, + { MODKEY, XK_space, toggle_keyboard_layout, {0} }, + { MODKEY, XK_r, spawn, {.v = dmenucmd } }, + { MODKEY|ControlMask, XK_s, spawn, {.v = termcmd } }, + { MODKEY, XK_s, spawn, {.v = termtmuxzshcmd } }, + { MODKEY|ControlMask, XK_n, spawn, {.v = flexcmd } }, + { MODKEY, XK_b, togglebar, {0} }, + { MODKEY, XK_k, focusstack, {.i = +1 } }, + { MODKEY, XK_l, focusstack, {.i = -1 } }, + { MODKEY, XK_i, incnmaster, {.i = +1 } }, + { MODKEY, XK_d, incnmaster, {.i = -1 } }, + { MODKEY, XK_j, setmfact, {.f = -0.05} }, + { MODKEY, XK_semicolon, setmfact, {.f = +0.05} }, + { MODKEY, XK_Return, zoom, {0} }, + { MODKEY, XK_Tab, view, {0} }, + { MODKEY|Mod1Mask , XK_F4, killclient, {0} }, + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, //{ MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ControlMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_0, view, {.ui = ~0 } }, - { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, - { MODKEY, XK_comma, focusmon, {.i = -1 } }, - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, + { MODKEY|ControlMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, + { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, + { MODKEY, XK_j, focusmon, {.i = -1 } }, + { MODKEY, XK_semicolon, focusmon, {.i = +1 } }, + { MODKEY|ControlMask, XK_j, tagmon, {.i = -1 } }, + { MODKEY|ControlMask, XK_semicolon, tagmon, {.i = +1 } }, + { MODKEY|ShiftMask, XK_q, quit, {0} }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) @@ -115,7 +124,6 @@ static const Key keys[] = { TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_q, quit, {0} }, }; /* button definitions */