add personal configs

This commit is contained in:
Jacob 2023-06-23 21:00:58 +02:00
parent 1320be4d2c
commit 370faf23f9
2 changed files with 58 additions and 7 deletions

View file

@ -35,8 +35,8 @@
* Mod4Mask | Super (Windows/command) key
* Mod1Mask | Alt key
*/
#define MODIFIER1 Mod4Mask
#define MODIFIER2 Mod1Mask
#define MODIFIER1 Mod4Mask
#define MODIFIER2 Mod1Mask
/* Tag related keybinds */
#define TAGKEYS(CHAIN,KEY,TAG) { KeyPress, MODIFIER1, CHAIN, KEY, view, {.ui = 1 << TAG } }, \
@ -47,21 +47,56 @@
/* Keybinds */
static Key keys[] = {
/* type modifier chain key key function argument */
{ KeyPress, MODIFIER1|SHIFT, -1, XK_semicolon, spawn, cmd( "spmenu_run -l 0 -p 'Run:' -na" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_Return, spawn, cmd( TERMINAL ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_w, spawn, cmd( "chromium || chromium-bin" ) },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_Tab, spawn, cmd( "speedwm-utils layout" ) },
/* Run keybinds */
{ KeyPress, MODIFIER1, -1, XK_semicolon, spawn, cmd( "spmenu_run -d -a '-p Run:'" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_semicolon, spawn, cmd( "spmenu_run -x -a '-l 0 -p Run:'" ) },
/* Application keybinds */
{ KeyPress, MODIFIER1|SHIFT, -1, XK_Return, spawn, cmd( TERMINAL ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_s, spawn, cmd( "screenshot-spmenu -s" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_p, spawn, cmd( "pass-spmenu" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_c, spawn, cmd( "clipmenu" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_f, spawn, cmd( TERMINAL "vifmrun || vifm" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_w, spawn, cmd( "chromium || chromium-bin" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_o, spawn, cmd( "dfmpeg-spmenu" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_t, spawn, cmd( TERMINAL "nvim" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_a, spawn, cmd( TERMINAL "speedwm-audioctrl -run_mixer" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_m, spawn, cmd( "musique" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_Tab, spawn, cmd( "speedwm-winnav" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_x, spawn, cmd( TERMINAL "htop" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_c, spawn, cmd( "nheko" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_Escape, spawn, cmd( "speedwm-shutdown" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_u, spawn, cmd( TERMINAL "newsboat" ) },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_r, spawn, cmd( TERMINAL "neomutt" ) },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_Tab, spawn, cmd( "speedwm-utils layout" ) },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_s, spawn, cmd( "screenshot-spmenu -f" ) },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_m, spawn, cmd( "pkill musique" ) },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_q, spawn, cmd( "speedwm-audioctrl -mute" ) },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_w, spawn, cmd( "speedwm-audioctrl -lower" ) },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_e, spawn, cmd( "speedwm-audioctrl -raise" ) },
{ KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_Escape, spawn, cmd( "speedwm-utils" ) },
{ KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_s, spawn, cmd( "wallpaper-spmenu" ) },
{ KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_n, spawn, cmd( "speedwm-netctrl" ) },
{ KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_b, spawn, cmd( "speedwm-btctrl" ) },
{ KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_r, spawn, cmd( "libspeedwm --perform core_wm_restart" ) },
/* Switcher */
{ KeyPress, MODIFIER1, -1, XK_Tab, switcherstart, {0} },
/* Systray */
{ KeyPress, MODIFIER1, -1, XK_s, togglesystray, {0} },
/* Layout keybinds */
{ KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_a, cyclelayout, {.i = -1 } },
{ KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_d, cyclelayout, {.i = +1 } },
/* Scratchpad keybinds */
{ KeyPress, MODIFIER1, -1, XK_minus, scratchpad_show, {0} },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_minus, scratchpad_hide, {0} },
{ KeyPress, MODIFIER1, -1, XK_equal, scratchpad_remove, {0} },
/* speedwm general binds */
{ KeyPress, MODIFIER1, -1, XK_f, togglefullscr, {0} },
{ KeyPress, MODIFIER1, -1, XK_b, togglebar, {0} },
{ KeyPress, MODIFIER1, -1, XK_r, resetmastercount, {0} },
@ -81,6 +116,7 @@ static Key keys[] = {
{ KeyPress, MODIFIER1|SHIFT, -1, XK_q, killclient, {0} },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_space, togglefloating, {0} },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_0, view, {.ui = ~0 } },
{ KeyPress, MODIFIER1, -1, XK_d, focusmon, {.i = -1 } },
{ KeyPress, MODIFIER1, -1, XK_slash, focusmon, {.i = +1 } },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_d, tagmon, {.i = -1 } },
{ KeyPress, MODIFIER1|SHIFT, -1, XK_slash, tagmon, {.i = +1 } },
@ -152,6 +188,7 @@ static Key keys[] = {
{ KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_p, hideall, {0} },
/* Chained keybinds */
{ KeyPress, MODIFIER1, XK_r, XK_s, spawn, cmd( "pgrep -x screenkey && pkill screenkey || screenkey" ) },
{ KeyPress, MODIFIER1, XK_t, XK_r, reorganizetags, {0} },
{ KeyPress, MODIFIER1, XK_p, XK_t, togglebarpadding, {0} },
{ KeyPress, MODIFIER1, XK_p, XK_u, setbarpadding, {.i = +5 } },
@ -191,10 +228,22 @@ static Key keys[] = {
/* Misc */
{ KeyPress, MODIFIER1|SHIFT, -1, XK_backslash, killunsel, {0} },
{ KeyPress, MODIFIER1|SHIFT, XK_e, XK_a, spawn, cmd( "speedwm-virtualkeyboard" ) },
{ KeyPress, MODIFIER1|SHIFT, XK_e, XK_e, spawn, cmd( "speedwm-virtualkeyboard -e" ) },
/* Gap keybinds */
{ KeyPress, MODIFIER1|CONTROL, -1, XK_z, incrgaps, {.i = +5 } },
{ KeyPress, MODIFIER1|CONTROL, -1, XK_x, incrgaps, {.i = -5 } },
/* Media buttons */
{ KeyPress, 0, -1, XF86XK_WWW, spawn, cmd( "chromium || chromium-bin" ) },
{ KeyPress, 0, -1, XF86XK_AudioMute, spawn, cmd( "speedwm-audioctrl -mute" ) },
{ KeyPress, 0, -1, XF86XK_AudioRaiseVolume, spawn, cmd( "speedwm-audioctrl -raise" ) },
{ KeyPress, 0, -1, XF86XK_AudioLowerVolume, spawn, cmd( "speedwm-audioctrl -lower" ) },
{ KeyPress, 0, -1, XF86XK_WWW, spawn, cmd( "qutebrowser" ) },
{ KeyPress, 0, -1, XF86XK_PowerOff, spawn, cmd( "speedwm-shutdown" ) },
{ KeyPress, 0, -1, XF86XK_Sleep, spawn, cmd( "slock" ) },
{ KeyPress, 0, -1, XF86XK_Mail, spawn, cmd( TERMINAL "neomutt" ) },
{ KeyPress, 0, -1, XF86XK_TaskPane, spawn, cmd( TERMINAL "htop" ) },
{ KeyPress, 0, -1, XF86XK_WLAN, spawn, cmd( "speedwm-netctrl disconnect" ) },
{ KeyPress, 0, -1, XF86XK_Music, spawn, cmd( "musique" ) },
};

View file

@ -36,9 +36,11 @@ static const Button buttons[] = {
{ clickstatusbar, 0, Button1, spawn, {.v = clickstatus } },
{ clickstatusbar, 0, Button2, spawn, {.v = clickstatus } },
{ clickstatusbar, 0, Button3, spawn, {.v = clickstatus } },
{ clicktitle, 0, Button3, spawn, cmd( "speedwm-utils" ) },
{ clicktitle, 0, Button1, togglewin, {0} },
{ clicktitle, 0, Button4, inplacerotate, {.i = +2} },
{ clicktitle, 0, Button5, inplacerotate, {.i = -2} },
{ clickroot, 0, Button3, spawn, cmd( "j4-dmenu-desktop --term=st --dmenu='spmenu -l 20 -p Open:'" ) },
{ clicktags, 0, Button1, view, {0} },
{ clicktags, 0, Button4, viewtoleft, {0} },
{ clicktags, 0, Button5, viewtoright, {0} },