Changes to indentation, rename MODKEY to MODIFIER1, rename SMODKEY to

MODIFIER2, add media key toggle
This commit is contained in:
speediegq 2022-09-11 01:44:40 +02:00
parent acbdec635b
commit f5851d5426
5 changed files with 159 additions and 151 deletions

View file

@ -2,17 +2,17 @@
* *
* Example keybind: * Example keybind:
* *
* { MODKEY, -1, XK_1, spawn, SHCMD(TERMINAL "echo "Hello world!") }, * { MODIFIER1, -1, XK_1, spawn, SHCMD(TERMINAL "echo "Hello world!") },
* { MODKEY, XK_F1, XK_1, spawn, SHCMD(TERMINAL "echo "Hello world! Pressing two keys in a row is based!") }, * { MODIFIER1, XK_F1, XK_1, spawn, SHCMD(TERMINAL "echo "Hello world! Pressing two keys in a row is based!") },
* *
* Modifiers * Modifiers
* *
* MODKEY is what you defined (in options.h, default is Super) * MODIFIER1 is what you defined (in options.h, default is Super)
* SMODKEY is what you defined (in options.h, default is Alt) * MODIFIER2 is what you defined (in options.h, default is Alt)
* ShiftMask is unless changed going to be your Shift key. * ShiftMask is unless changed going to be your Shift key.
* ControlMask is unless changed going to be your Control key. * ControlMask is unless changed going to be your Control key.
* *
* It is recommended that you avoid using 'SMODKEY' (Mod1Mask) by itself because it can break software defined shortcuts. * It is recommended that you avoid using 'MODIFIER2' (Mod1Mask) by itself because it can break software defined shortcuts.
* *
* If you need help, see speedwm-help. * If you need help, see speedwm-help.
* Once you're done with your edits, run 'make clean install'. * Once you're done with your edits, run 'make clean install'.
@ -22,152 +22,154 @@ static const Key keys[] = {
/* modifier chain key key function argument */ /* modifier chain key key function argument */
/* Application keybinds */ /* Application keybinds */
{ MODKEY|ShiftMask, -1, XK_semicolon, spawn, SHCMD(RUN) }, { MODIFIER1|ShiftMask, -1, XK_semicolon, spawn, SHCMD(RUN) },
{ MODKEY|ShiftMask, -1, XK_Return, spawn, SHCMD(TERMINAL) }, { MODIFIER1|ShiftMask, -1, XK_Return, spawn, SHCMD(TERMINAL) },
{ MODKEY|ShiftMask, -1, XK_s, spawn, SHCMD(SCREENSHOT) }, { MODIFIER1|ShiftMask, -1, XK_s, spawn, SHCMD(SCREENSHOT) },
{ MODKEY|ShiftMask, -1, XK_f, spawn, SHCMD(TERMINAL FILEMANAGER) }, { MODIFIER1|ShiftMask, -1, XK_f, spawn, SHCMD(TERMINAL FILEMANAGER) },
{ MODKEY|ShiftMask, -1, XK_w, spawn, SHCMD(BROWSER) }, { MODIFIER1|ShiftMask, -1, XK_w, spawn, SHCMD(BROWSER) },
{ MODKEY|ShiftMask, -1, XK_o, spawn, SHCMD("speedwm-dfmpeg") }, { MODIFIER1|ShiftMask, -1, XK_o, spawn, SHCMD("speedwm-dfmpeg") },
{ MODKEY|ShiftMask, -1, XK_t, spawn, SHCMD(TERMINAL EDITOR) }, { MODIFIER1|ShiftMask, -1, XK_t, spawn, SHCMD(TERMINAL EDITOR) },
{ MODKEY|ShiftMask, -1, XK_a, spawn, SHCMD(TERMINAL MIXER) }, { MODIFIER1|ShiftMask, -1, XK_a, spawn, SHCMD(TERMINAL MIXER) },
{ MODKEY|ShiftMask, -1, XK_m, spawn, SHCMD(TERMINAL MUSIC) }, { MODIFIER1|ShiftMask, -1, XK_m, spawn, SHCMD(TERMINAL MUSIC) },
{ SMODKEY, -1, XK_Tab, spawn, SHCMD("speedwm-winnav") }, { MODIFIER2, -1, XK_Tab, spawn, SHCMD("speedwm-winnav") },
{ MODKEY|ShiftMask, -1, XK_x, spawn, SHCMD(TERMINAL SYSTEMSTAT) }, { MODIFIER1|ShiftMask, -1, XK_x, spawn, SHCMD(TERMINAL SYSTEMSTAT) },
{ MODKEY|ShiftMask, -1, XK_i, spawn, SHCMD(OPENPDF) }, { MODIFIER1|ShiftMask, -1, XK_i, spawn, SHCMD(OPENPDF) },
{ MODKEY|ShiftMask, -1, XK_Escape, spawn, SHCMD("speedwm-shutdown") }, { MODIFIER1|ShiftMask, -1, XK_Escape, spawn, SHCMD("speedwm-shutdown") },
{ ControlMask|MODKEY, -1, XK_Tab, spawn, SHCMD("speedwm-utils -layout") }, { MODIFIER1|ControlMask, -1, XK_Tab, spawn, SHCMD("speedwm-utils -layout") },
{ ControlMask|MODKEY, -1, XK_h, spawn, SHCMD(TERMINAL "speedwm-help -2") }, { MODIFIER1|ControlMask, -1, XK_h, spawn, SHCMD(TERMINAL "speedwm-help -2") },
{ ControlMask|MODKEY, -1, XK_s, spawn, SHCMD(SCREENSHOT_FULL) }, { MODIFIER1|ControlMask, -1, XK_s, spawn, SHCMD(SCREENSHOT_FULL) },
{ ControlMask|MODKEY, -1, XK_u, spawn, SHCMD(TERMINAL RSS) }, { MODIFIER1|ControlMask, -1, XK_u, spawn, SHCMD(TERMINAL RSS) },
{ ControlMask|MODKEY, -1, XK_m, spawn, SHCMD(KILLMUSIC) }, { MODIFIER1|ControlMask, -1, XK_m, spawn, SHCMD(KILLMUSIC) },
{ ControlMask|MODKEY, -1, XK_1, spawn, SHCMD(VOL_MUTE) }, { MODIFIER1|ControlMask, -1, XK_1, spawn, SHCMD(VOL_MUTE) },
{ ControlMask|MODKEY, -1, XK_2, spawn, SHCMD(VOL_DOWN) }, { MODIFIER1|ControlMask, -1, XK_2, spawn, SHCMD(VOL_DOWN) },
{ ControlMask|MODKEY, -1, XK_3, spawn, SHCMD(VOL_UP) }, { MODIFIER1|ControlMask, -1, XK_3, spawn, SHCMD(VOL_UP) },
{ ControlMask|MODKEY|ShiftMask, -1, XK_k, spawn, SHCMD(VOL_OUTPUT_SPEAKER) }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_k, spawn, SHCMD(VOL_OUTPUT_SPEAKER) },
{ ControlMask|MODKEY|ShiftMask, -1, XK_Escape, spawn, SHCMD("speedwm-utils") }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_Escape, spawn, SHCMD("speedwm-utils") },
{ ControlMask|MODKEY|ShiftMask, -1, XK_s, spawn, SHCMD("speedwm-swal") }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_s, spawn, SHCMD("speedwm-swal") },
{ ControlMask|MODKEY|ShiftMask, -1, XK_n, spawn, SHCMD(NETWORK) }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_n, spawn, SHCMD(NETWORK) },
{ ControlMask|MODKEY|ShiftMask, -1, XK_b, spawn, SHCMD(BLUETOOTH) }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_b, spawn, SHCMD(BLUETOOTH) },
{ MODKEY, -1, XK_s, spawn, SHCMD("speedwm-core -toggle") }, { MODIFIER1, -1, XK_s, spawn, SHCMD("speedwm-core -toggle") },
{ ControlMask|MODKEY|ShiftMask, -1, XK_m, spawn, SHCMD(TERMINAL EMAIL) }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_m, spawn, SHCMD(TERMINAL EMAIL) },
{ ControlMask|MODKEY|ShiftMask, -1, XK_e, spawn, SHCMD("speedwm_run -configure") }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_e, spawn, SHCMD("speedwm_run -configure") },
/* Layout keybinds */ /* Layout keybinds */
{ ControlMask|MODKEY|ShiftMask, -1, XK_a, cyclelayout, {.i = -1 } }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_a, cyclelayout, {.i = -1 } },
{ ControlMask|MODKEY|ShiftMask, -1, XK_d, cyclelayout, {.i = +1 } }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_d, cyclelayout, {.i = +1 } },
{ MODKEY|ControlMask, -1, XK_y, setlayout, {.v = &layouts[4]} }, { MODIFIER1|ControlMask, -1, XK_y, setlayout, {.v = &layouts[4]} },
{ MODKEY|ControlMask, -1, XK_e, setlayout, {.v = &layouts[3]} }, { MODIFIER1|ControlMask, -1, XK_e, setlayout, {.v = &layouts[3]} },
{ MODKEY|ControlMask, -1, XK_r, setlayout, {.v = &layouts[1]} }, { MODIFIER1|ControlMask, -1, XK_r, setlayout, {.v = &layouts[1]} },
{ MODKEY|ControlMask, -1, XK_t, setlayout, {.v = &layouts[0]} }, { MODIFIER1|ControlMask, -1, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, -1, XK_space, setlayout, {0} }, { MODIFIER1, -1, XK_space, setlayout, {0} },
/* Sticky keybinds */ /* Sticky keybinds */
{ SMODKEY|MODKEY, -1, XK_s, togglesticky, {0} }, { MODIFIER2|MODIFIER1, -1, XK_s, togglesticky, {0} },
/* Scratchpad keybinds */ /* Scratchpad keybinds */
{ MODKEY, -1, XK_minus, scratchpad_show, {0} }, { MODIFIER1, -1, XK_minus, scratchpad_show, {0} },
{ MODKEY|ShiftMask, -1, XK_minus, scratchpad_hide, {0} }, { MODIFIER1|ShiftMask, -1, XK_minus, scratchpad_hide, {0} },
{ MODKEY, -1, XK_equal, scratchpad_remove, {0} }, { MODIFIER1, -1, XK_equal, scratchpad_remove, {0} },
{ MODKEY|ShiftMask, -1, XK_equal, togglescratch, {.v = scratchpadcmd } }, { MODIFIER1|ShiftMask, -1, XK_equal, togglescratch, {.v = scratchpadcmd } },
/* speedwm general binds */ /* speedwm general binds */
{ MODKEY, -1, XK_f, togglefullscr, {0} }, { MODIFIER1, -1, XK_f, togglefullscr, {0} },
{ MODKEY, -1, XK_b, togglebar, {0} }, { MODIFIER1, -1, XK_b, togglebar, {0} },
{ MODKEY, -1, XK_j, focusstackvis, {.i = +1 } }, { MODIFIER1, -1, XK_j, focusstackvis, {.i = +1 } },
{ MODKEY, -1, XK_k, focusstackvis, {.i = -1 } }, { MODIFIER1, -1, XK_k, focusstackvis, {.i = -1 } },
{ MODKEY|ControlMask, -1, XK_j, focusstackhid, {.i = +1 } }, { MODIFIER1|ControlMask, -1, XK_j, focusstackhid, {.i = +1 } },
{ MODKEY|ControlMask, -1, XK_k, focusstackhid, {.i = -1 } }, { MODIFIER1|ControlMask, -1, XK_k, focusstackhid, {.i = -1 } },
{ MODKEY, -1, XK_a, setmfact, {.f = -0.05} }, { MODIFIER1, -1, XK_a, setmfact, {.f = -0.05} },
{ MODKEY, -1, XK_d, setmfact, {.f = +0.05} }, { MODIFIER1, -1, XK_d, setmfact, {.f = +0.05} },
{ SMODKEY|ControlMask, -1, XK_k, setcfact, {.f = +0.25} }, { MODIFIER2|ControlMask, -1, XK_k, setcfact, {.f = +0.25} },
{ SMODKEY|ControlMask, -1, XK_j, setcfact, {.f = -0.25} }, { MODIFIER2|ControlMask, -1, XK_j, setcfact, {.f = -0.25} },
{ SMODKEY|ControlMask, -1, XK_0, setcfact, {.f = 0.00} }, { MODIFIER2|ControlMask, -1, XK_0, setcfact, {.f = 0.00} },
{ MODKEY, -1, XK_Return, zoom, {0} }, { MODIFIER1, -1, XK_Return, zoom, {0} },
{ MODKEY|ShiftMask, -1, XK_q, killclient, {0} }, { MODIFIER1|ShiftMask, -1, XK_q, killclient, {0} },
{ MODKEY|ShiftMask, -1, XK_space, togglefloating, {0} }, { MODIFIER1|ShiftMask, -1, XK_space, togglefloating, {0} },
{ MODKEY|ControlMask, -1, XK_0, view, {.ui = ~0 } }, { MODIFIER1|ControlMask, -1, XK_0, view, {.ui = ~0 } },
{ MODKEY, -1, XK_d, focusmon, {.i = -1 } }, { MODIFIER1, -1, XK_d, focusmon, {.i = -1 } },
{ MODKEY, -1, XK_period, focusmon, {.i = +1 } }, { MODIFIER1, -1, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, -1, XK_d, tagmon, {.i = -1 } }, { MODIFIER1|ShiftMask, -1, XK_d, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, -1, XK_period, tagmon, {.i = +1 } }, { MODIFIER1|ShiftMask, -1, XK_period, tagmon, {.i = +1 } },
{ MODKEY|ShiftMask, -1, XK_Tab, livereloadxrdb, {0} }, { MODIFIER1|ShiftMask, -1, XK_Tab, livereloadxrdb, {0} },
{ MODKEY|ShiftMask, -1, XK_j, inplacerotate, {.i = +1} }, { MODIFIER1|ShiftMask, -1, XK_j, inplacerotate, {.i = +1} },
{ MODKEY|ShiftMask, -1, XK_k, inplacerotate, {.i = -1} }, { MODIFIER1|ShiftMask, -1, XK_k, inplacerotate, {.i = -1} },
{ MODKEY|ShiftMask, -1, XK_h, inplacerotate, {.i = +2} }, { MODIFIER1|ShiftMask, -1, XK_h, inplacerotate, {.i = +2} },
{ MODKEY|ShiftMask, -1, XK_l, inplacerotate, {.i = -2} }, { MODIFIER1|ShiftMask, -1, XK_l, inplacerotate, {.i = -2} },
{ MODKEY, -1, XK_n, incnmaster, {.i = -1 } }, { MODIFIER1, -1, XK_n, incnmaster, {.i = -1 } },
{ MODKEY, -1, XK_i, incnmaster, {.i = +1 } }, { MODIFIER1, -1, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, -1, XK_t, toggleopacity, {0} }, { MODIFIER1, -1, XK_t, toggleopacity, {0} },
/* Floating mode keybinds */ /* Floating mode keybinds */
{ MODKEY, -1, XK_Down, moveresize, {.v = "0x 25y 0w 0h" } }, { MODIFIER1, -1, XK_Down, moveresize, {.v = "0x 25y 0w 0h" } },
{ MODKEY, -1, XK_Up, moveresize, {.v = "0x -25y 0w 0h" } }, { MODIFIER1, -1, XK_Up, moveresize, {.v = "0x -25y 0w 0h" } },
{ MODKEY, -1, XK_Right, moveresize, {.v = "25x 0y 0w 0h" } }, { MODIFIER1, -1, XK_Right, moveresize, {.v = "25x 0y 0w 0h" } },
{ MODKEY, -1, XK_Left, moveresize, {.v = "-25x 0y 0w 0h" } }, { MODIFIER1, -1, XK_Left, moveresize, {.v = "-25x 0y 0w 0h" } },
{ MODKEY|ShiftMask, -1, XK_Down, moveresize, {.v = "0x 0y 0w 25h" } }, { MODIFIER1|ShiftMask, -1, XK_Down, moveresize, {.v = "0x 0y 0w 25h" } },
{ MODKEY|ShiftMask, -1, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } }, { MODIFIER1|ShiftMask, -1, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } },
{ MODKEY|ShiftMask, -1, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } }, { MODIFIER1|ShiftMask, -1, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } },
{ MODKEY|ShiftMask, -1, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } }, { MODIFIER1|ShiftMask, -1, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } },
{ MODKEY|ControlMask, -1, XK_Up, moveresizeedge, {.v = "t"} }, { MODIFIER1|ControlMask, -1, XK_Up, moveresizeedge, {.v = "t"} },
{ MODKEY|ControlMask, -1, XK_Down, moveresizeedge, {.v = "b"} }, { MODIFIER1|ControlMask, -1, XK_Down, moveresizeedge, {.v = "b"} },
{ MODKEY|ControlMask, -1, XK_Left, moveresizeedge, {.v = "l"} }, { MODIFIER1|ControlMask, -1, XK_Left, moveresizeedge, {.v = "l"} },
{ MODKEY|ControlMask, -1, XK_Right, moveresizeedge, {.v = "r"} }, { MODIFIER1|ControlMask, -1, XK_Right, moveresizeedge, {.v = "r"} },
{ MODKEY|ControlMask|ShiftMask, -1, XK_Up, moveresizeedge, {.v = "T"} }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_Up, moveresizeedge, {.v = "T"} },
{ MODKEY|ControlMask|ShiftMask, -1, XK_Down, moveresizeedge, {.v = "B"} }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_Down, moveresizeedge, {.v = "B"} },
{ MODKEY|ControlMask|ShiftMask, -1, XK_Left, moveresizeedge, {.v = "L"} }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_Left, moveresizeedge, {.v = "L"} },
{ MODKEY|ControlMask|ShiftMask, -1, XK_Right, moveresizeedge, {.v = "R"} }, { MODIFIER1|ControlMask|ShiftMask, -1, XK_Right, moveresizeedge, {.v = "R"} },
/* Tag keybinds */ /* Tag keybinds */
TAGKEYS( -1, XK_1, 0) TAGKEYS( -1, XK_1, 0)
TAGKEYS( -1, XK_2, 1) TAGKEYS( -1, XK_2, 1)
TAGKEYS( -1, XK_3, 2) TAGKEYS( -1, XK_3, 2)
TAGKEYS( -1, XK_4, 3) TAGKEYS( -1, XK_4, 3)
TAGKEYS( -1, XK_5, 4) TAGKEYS( -1, XK_5, 4)
TAGKEYS( -1, XK_6, 5) TAGKEYS( -1, XK_6, 5)
TAGKEYS( -1, XK_7, 6) TAGKEYS( -1, XK_7, 6)
TAGKEYS( -1, XK_8, 7) TAGKEYS( -1, XK_8, 7)
TAGKEYS( -1, XK_9, 8) TAGKEYS( -1, XK_9, 8)
{ MODKEY, -1, XK_t, reorganizetags, {0} }, { MODIFIER1, -1, XK_t, reorganizetags, {0} },
{ SMODKEY, -1, XK_a, viewtoleft, {0} }, { MODIFIER2, -1, XK_a, viewtoleft, {0} },
{ SMODKEY, -1, XK_d, viewtoright, {0} }, { MODIFIER2, -1, XK_d, viewtoright, {0} },
/* Hide/Show keybinds */ /* Hide/Show keybinds */
{ MODKEY, -1, XK_o, hide, {0} }, { MODIFIER1, -1, XK_o, hide, {0} },
{ MODKEY|ControlMask, -1, XK_o, show, {0} }, { MODIFIER1|ControlMask, -1, XK_o, show, {0} },
/* Chained keybinds */ /* Chained keybinds */
{ MODKEY, XK_c, XK_w, spawn, SHCMD(TERMINAL "speedwm-core -curl-weather") }, { MODIFIER1, XK_c, XK_w, spawn, SHCMD(TERMINAL "speedwm-core -curl-weather") },
{ MODKEY, XK_c, XK_m, spawn, SHCMD(TERMINAL "speedwm-core -curl-cheatsheet") }, { MODIFIER1, XK_c, XK_m, spawn, SHCMD(TERMINAL "speedwm-core -curl-cheatsheet") },
{ MODKEY, XK_r, XK_v, spawn, SHCMD(TERMINAL VISUALIZER) }, { MODIFIER1, XK_r, XK_v, spawn, SHCMD(TERMINAL VISUALIZER) },
{ MODKEY|ShiftMask, XK_e, XK_a, spawn, SHCMD("speedwm-virtualkeyboard") }, { MODIFIER1|ShiftMask, XK_e, XK_a, spawn, SHCMD("speedwm-virtualkeyboard") },
{ MODKEY|ShiftMask, XK_e, XK_e, spawn, SHCMD("speedwm-virtualkeyboard -e") }, { MODIFIER1|ShiftMask, XK_e, XK_e, spawn, SHCMD("speedwm-virtualkeyboard -e") },
{ MODKEY|ShiftMask, XK_e, XK_c, spawn, SHCMD("speedwm-virtualkeyboard -c") }, { MODIFIER1|ShiftMask, XK_e, XK_c, spawn, SHCMD("speedwm-virtualkeyboard -c") },
{ SMODKEY|ShiftMask, XK_q, XK_o, killunsel, {0} }, { MODIFIER2|ShiftMask, XK_q, XK_o, killunsel, {0} },
/* Gap keybinds */ /* Gap keybinds */
{ MODKEY|SMODKEY, -1, XK_j, incrgaps, {.i = +1 } }, { MODIFIER1|MODIFIER2, -1, XK_j, incrgaps, {.i = +1 } },
{ MODKEY|SMODKEY, -1, XK_k, incrgaps, {.i = -1 } }, { MODIFIER1|MODIFIER2, -1, XK_k, incrgaps, {.i = -1 } },
{ MODKEY|SMODKEY, -1, XK_d, incrgaps, {.i = +5 } }, { MODIFIER1|MODIFIER2, -1, XK_d, incrgaps, {.i = +5 } },
{ MODKEY|SMODKEY, -1, XK_u, incrgaps, {.i = -5 } }, { MODIFIER1|MODIFIER2, -1, XK_u, incrgaps, {.i = -5 } },
/* Chained gap keybinds */ /* Chained gap keybinds */
{ MODKEY, XK_g, XK_t, togglegaps, {0} }, { MODIFIER1, XK_g, XK_t, togglegaps, {0} },
{ MODKEY, XK_g, XK_0, defaultgaps, {0} }, { MODIFIER1, XK_g, XK_0, defaultgaps, {0} },
{ MODKEY, XK_g, XK_i, incrigaps, {.i = +1} }, { MODIFIER1, XK_g, XK_i, incrigaps, {.i = +1} },
{ MODKEY|ShiftMask, XK_g, XK_i, incrigaps, {.i = -1} }, { MODIFIER1|ShiftMask, XK_g, XK_i, incrigaps, {.i = -1} },
{ MODKEY, XK_g, XK_o, incrogaps, {.i = +1} }, { MODIFIER1, XK_g, XK_o, incrogaps, {.i = +1} },
{ MODKEY|ShiftMask, XK_g, XK_o, incrogaps, {.i = -1} }, { MODIFIER1|ShiftMask, XK_g, XK_o, incrogaps, {.i = -1} },
/* Media buttons */ /* Media buttons */
{ 0, -1, XF86XK_AudioMute, spawn, SHCMD(VOL_MUTE) }, #if USEMEDIA
{ 0, -1, XF86XK_AudioRaiseVolume, spawn, SHCMD(VOL_UP) }, { 0, -1, XF86XK_AudioMute, spawn, SHCMD(VOL_MUTE) },
{ 0, -1, XF86XK_AudioLowerVolume, spawn, SHCMD(VOL_DOWN) }, { 0, -1, XF86XK_AudioRaiseVolume, spawn, SHCMD(VOL_UP) },
{ 0, -1, XF86XK_AudioPrev, spawn, SHCMD(PREVMUSIC) }, { 0, -1, XF86XK_AudioLowerVolume, spawn, SHCMD(VOL_DOWN) },
{ 0, -1, XF86XK_AudioNext, spawn, SHCMD(NEXTMUSIC) }, { 0, -1, XF86XK_AudioPrev, spawn, SHCMD(PREVMUSIC) },
{ 0, -1, XF86XK_AudioStop, spawn, SHCMD(KILLMUSIC) }, { 0, -1, XF86XK_AudioNext, spawn, SHCMD(NEXTMUSIC) },
{ 0, -1, XF86XK_WWW, spawn, SHCMD(BROWSER) }, { 0, -1, XF86XK_AudioStop, spawn, SHCMD(KILLMUSIC) },
{ 0, -1, XF86XK_PowerOff, spawn, SHCMD("speedwm-shutdown") }, { 0, -1, XF86XK_WWW, spawn, SHCMD(BROWSER) },
{ 0, -1, XF86XK_Sleep, spawn, SHCMD(LOCKER) }, { 0, -1, XF86XK_PowerOff, spawn, SHCMD("speedwm-shutdown") },
{ 0, -1, XF86XK_Mail, spawn, SHCMD(TERMINAL EMAIL) }, { 0, -1, XF86XK_Sleep, spawn, SHCMD(LOCKER) },
{ 0, -1, XF86XK_TaskPane, spawn, SHCMD(TERMINAL SYSTEMSTAT) }, { 0, -1, XF86XK_Mail, spawn, SHCMD(TERMINAL EMAIL) },
{ 0, -1, XF86XK_TaskPane, spawn, SHCMD(TERMINAL SYSTEMSTAT) },
#endif
}; };

30
mouse.h
View file

@ -9,21 +9,21 @@
/* Actions when the mouse clicks a part of the screen */ /* Actions when the mouse clicks a part of the screen */
static const Button buttons[] = { static const Button buttons[] = {
/* click event mask button function argument */ /* click event mask button function argument */
{ ClkLtSymbol, 0, Button3, layoutmenu, {0} }, { ClkLtSymbol, 0, Button3, layoutmenu, {0} },
{ ClkLtSymbol, 0, Button1, cyclelayout, {.i = +1 } }, { ClkLtSymbol, 0, Button1, cyclelayout, {.i = +1 } },
{ ClkLtSymbol, 0, Button2, cyclelayout, {.i = -1 } }, { ClkLtSymbol, 0, Button2, cyclelayout, {.i = -1 } },
{ ClkWinTitle, 0, Button2, zoom, {0} }, { ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkClientWin, MODKEY|ControlMask, Button3, dragcfact, {0} }, { ClkClientWin, MODIFIER1|ControlMask, Button3, dragcfact, {0} },
{ ClkClientWin, MODKEY, Button1, moveorplace, {.i = 1} }, { ClkClientWin, MODIFIER1, Button1, moveorplace, {.i = 1} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODIFIER1, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkClientWin, MODIFIER1, Button3, resizemouse, {0} },
{ ClkStatusText, 0, Button1, spawn, {.v = statuscmd } }, { ClkStatusText, 0, Button1, spawn, {.v = statuscmd } },
{ ClkStatusText, 0, Button2, spawn, {.v = statuscmd } }, { ClkStatusText, 0, Button2, spawn, {.v = statuscmd } },
{ ClkStatusText, 0, Button3, spawn, {.v = statuscmd } }, { ClkStatusText, 0, Button3, spawn, {.v = statuscmd } },
{ ClkWinTitle, 0, Button1, togglewin, {0} }, { ClkWinTitle, 0, Button1, togglewin, {0} },
{ ClkWinTitle, 0, Button3, spawn, SHCMD("speedwm-utils") }, { ClkWinTitle, 0, Button3, spawn, SHCMD("speedwm-utils") },
{ ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button1, view, {0} },
}; };
/* Commands that will run when a part of the status bar is pressed /* Commands that will run when a part of the status bar is pressed

View file

@ -78,8 +78,8 @@
* Mod4Mask | Super (Windows/command) key * Mod4Mask | Super (Windows/command) key
* Mod1Mask | Alt key * Mod1Mask | Alt key
*/ */
#define MODKEY Mod4Mask #define MODIFIER1 Mod4Mask
#define SMODKEY Mod1Mask #define MODIFIER2 Mod1Mask
/* Managers */ /* Managers */
#define CLIPBOARD "xclip" /* Clipboard to use */ #define CLIPBOARD "xclip" /* Clipboard to use */
@ -93,8 +93,8 @@
/* Misc */ /* Misc */
#define SHCMD(cmd) { .v = (const char*[]){ shell, "-c", cmd, NULL } } #define SHCMD(cmd) { .v = (const char*[]){ shell, "-c", cmd, NULL } }
#define TAGKEYS(CHAIN,KEY,TAG) { MODKEY, CHAIN, KEY, view, {.ui = 1 << TAG} }, \ #define TAGKEYS(CHAIN,KEY,TAG) { MODIFIER1, CHAIN, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, CHAIN, KEY, previewtag, {.ui = TAG} }, \ { MODIFIER1|ShiftMask, CHAIN, KEY, previewtag, {.ui = TAG} }, \
/* Options /* Options
* *

View file

@ -600,8 +600,13 @@ static xcb_connection_t *xcon;
#include "toggle/ipc.c" #include "toggle/ipc.c"
#endif #endif
/* configuration, allows nested code to access above variables */
/* Media controls */
#if USEMEDIA
#include <X11/XF86keysym.h> /* Enable multimedia button support */ #include <X11/XF86keysym.h> /* Enable multimedia button support */
#endif
/* Configuration */
#include "options.h" /* Include options */ #include "options.h" /* Include options */
#include "layouts.c" /* Enable patched layouts */ #include "layouts.c" /* Enable patched layouts */
#include "autostart.h" /* Add autostart support */ #include "autostart.h" /* Add autostart support */

View file

@ -13,6 +13,7 @@
*/ */
#define USEALPHA 1 /* Whether or not to use transparency for the bar */ #define USEALPHA 1 /* Whether or not to use transparency for the bar */
#define USEFADE 1 /* Whether or not to use fading windows */ #define USEFADE 1 /* Whether or not to use fading windows */
#define USEMEDIA 1 /* Whether or not to use media keys */
#define USEMOUSE 1 /* Whether or not to use mouse binds */ #define USEMOUSE 1 /* Whether or not to use mouse binds */
/* Image related patches /* Image related patches