From a3fcdae83d1c76adbe921658ce7462dbe00c370d Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 29 Jan 2023 20:30:17 +0100 Subject: [PATCH] add some makefile jank --- Makefile | 16 +++++++++++++ bar.h | 0 keybinds.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++------ mouse.h | 2 ++ options.h | 0 5 files changed, 80 insertions(+), 7 deletions(-) mode change 100644 => 100755 bar.h mode change 100644 => 100755 keybinds.h mode change 100644 => 100755 mouse.h mode change 100644 => 100755 options.h diff --git a/Makefile b/Makefile index 8be774a..9782088 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,23 @@ options: @echo .c.o: + cp bar.h bar.def.h + cp options.h options.def.h + cp keybinds.h keybinds.def.h + cp mouse.h mouse.def.h + [ -f "bar.rl.h" ] && cp bar.rl.h bar.h || : + [ -f "options.rl.h" ] && cp options.rl.h options.h || : + [ -f "keybinds.rl.h" ] && cp keybinds.rl.h keybinds.h || : + [ -f "mouse.rl.h" ] && cp mouse.rl.h mouse.h || : ${CC} -c ${CFLAGS} -g $< + mv bar.def.h bar.h + mv options.def.h options.h + mv keybinds.def.h keybinds.h + mv mouse.def.h mouse.h + chmod 0777 bar.h + chmod 0777 options.h + chmod 0777 keybinds.h + chmod 0777 mouse.h ${OBJ}: options.mk diff --git a/bar.h b/bar.h old mode 100644 new mode 100755 diff --git a/keybinds.h b/keybinds.h old mode 100644 new mode 100755 index 7392403..e82c1bc --- a/keybinds.h +++ b/keybinds.h @@ -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,57 @@ /* 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( "j4-dmenu-desktop --term=st --dmenu='spmenu -l 20 -p Open:'" ) }, + { KeyPress, MODIFIER1|SHIFT, -1, XK_semicolon, spawn, cmd( "spmenu_run -l 0 -p 'Run:' -na" ) }, + + /* Application keybinds */ + { KeyPress, MODIFIER1|SHIFT, -1, XK_Return, spawn, cmd( TERMINAL ) }, + { KeyPress, MODIFIER1|SHIFT, -1, XK_s, spawn, cmd( "speedwm-screenshotutil -s" ) }, + { KeyPress, MODIFIER1|SHIFT, -1, XK_f, spawn, cmd( TERMINAL "lfrun || lf" ) }, + { KeyPress, MODIFIER1|SHIFT, -1, XK_w, spawn, cmd( "chromium || chromium-bin" ) }, + { KeyPress, MODIFIER1|SHIFT, -1, XK_o, spawn, cmd( "speedwm-dfmpeg" ) }, + { KeyPress, MODIFIER1|SHIFT, -1, XK_t, spawn, cmd( TERMINAL "nvim" ) }, + { KeyPress, MODIFIER1|SHIFT, -1, XK_a, spawn, cmd( TERMINAL "speedwm-audioctrl -runmixer" ) }, + { KeyPress, MODIFIER1|SHIFT, -1, XK_m, spawn, cmd( TERMINAL "tmux new-session -A -D -s cmus $(which --skip-alias cmus)" ) }, + { 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( TERMINAL "tmux new-session -A -D -s weechat $(which --skip-alias weechat)" ) }, + { 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( "speedwm-screenshotutil -f" ) }, + { KeyPress, MODIFIER1|CONTROL, -1, XK_m, spawn, cmd( "pkill cmus" ) }, + { 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_q, spawn, cmd( "cmus-remote --pause" ) }, + { KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_w, spawn, cmd( "cmus-remote --volume -3000" ) }, + { KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_e, spawn, cmd( "cmus-remote --volume +3000" ) }, + { KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_Escape, spawn, cmd( "speedwm-utils" ) }, + { KeyPress, MODIFIER1|CONTROL|SHIFT, -1, XK_s, spawn, cmd( "speedwm-swal" ) }, + { 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} }, @@ -153,6 +189,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 } }, @@ -192,10 +229,28 @@ static Key keys[] = { /* Misc */ { KeyPress, MODIFIER1|SHIFT, -1, XK_backslash, killunsel, {0} }, + { KeyPress, MODIFIER1|SHIFT, XK_e, XK_p, spawn, cmd( "speedwm-swal --previous" ) }, + { KeyPress, MODIFIER1|SHIFT, XK_e, XK_r, spawn, cmd( "speedwm-swal --randomize" ) }, + { 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_AudioPrev, spawn, cmd( "cmus-remote --prev" ) }, + { KeyPress, 0, -1, XF86XK_AudioNext, spawn, cmd( "cmus-remote --next" ) }, + { KeyPress, 0, -1, XF86XK_AudioStop, spawn, cmd( "pkill cmus" ) }, + { KeyPress, 0, -1, XF86XK_AudioPause, spawn, cmd( "cmus-remote --pause" ) }, + { 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( TERMINAL "tmux new-session -A -D -s cmus $(which --skip-alias cmus)" ) }, }; diff --git a/mouse.h b/mouse.h old mode 100644 new mode 100755 index ee715cc..c651e32 --- a/mouse.h +++ b/mouse.h @@ -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} }, diff --git a/options.h b/options.h old mode 100644 new mode 100755