diff --git a/config.h b/config.h index 8a9213c..610038c 100644 --- a/config.h +++ b/config.h @@ -122,19 +122,19 @@ static const char *spwiki[] = { "v", TERMINAL, "-n", "spwiki", "-e", "env", "SC static const Key keys[] = { /* modifier key function argument */ { MODKEY, XK_F1, togglescratch, {.v = sphelp} }, - { MODKEY, XK_F2, spawn, {.v = (const char *[]){"togcom", NULL}} }, + { MODKEY, XK_F2, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuhandler") }, { MODKEY, XK_F3, togglescratch, {.v = spmix} }, - // { MODKEY, XK_F4, spawn, {.v = (const char *[]){NULL}} }, - { MODKEY, XK_F5, spawn, {.v = (const char *[]){"togtp", NULL}} }, + { MODKEY, XK_F4, spawn, SHCMD("$HOME/.local/libexec/dwm/togcompositor") }, + { MODKEY, XK_F5, spawn, SHCMD("$HOME/.local/libexec/dwm/togtouchpad") }, // { MODKEY, XK_F6, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY, XK_F7, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY, XK_F8, spawn, {.v = (const char *[]){NULL}} }, - { MODKEY, XK_F9, spawn, {.v = (const char *[]){"dmenumount", NULL}} }, - { MODKEY, XK_F10, spawn, {.v = (const char *[]){"dmenuumount", NULL}} }, - { MODKEY, XK_F11, spawn, {.v = (const char *[]){"displayselect", NULL}} }, - { MODKEY, XK_F12, spawn, {.v = (const char *[]){"remaps", NULL}} }, - { MODKEY, XK_grave, spawn, {.v = (const char *[]){"dmenuunicode", "--nocopy", NULL}} }, - { MODKEY | ShiftMask, XK_grave, spawn, {.v = (const char *[]){"dmenuunicode", NULL}} }, + { MODKEY, XK_F9, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenumount") }, + { MODKEY, XK_F10, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuumount") }, + { MODKEY, XK_F11, spawn, SHCMD("$HOME/.local/libexec/dwm/displayselect") }, + { MODKEY, XK_F12, spawn, SHCMD("$HOME/.local/libexec/dwm/remaps") }, + { MODKEY, XK_grave, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuunicode --nocopy") }, + { MODKEY | ShiftMask, XK_grave, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuunicode") }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) @@ -150,7 +150,7 @@ static const Key keys[] = { // { MODKEY | ShiftMask, XK_bracketleft, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY, XK_bracketright, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY | ShiftMask, XK_bracketright, spawn, {.v = (const char *[]){NULL}} }, - { MODKEY, XK_BackSpace, spawn, {.v = (const char *[]){"sysact", NULL}} }, + { MODKEY, XK_BackSpace, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuunicode") }, // { MODKEY | ShiftMask, XK_BackSpace, spawn, {.v = (const char *[]){NULL}} }, { MODKEY, XK_Tab, focusstack, {.i = PREVSEL} }, // { MODKEY | ShiftMask, XK_Tab, spawn, {.v = (const char *[]){NULL}} }, @@ -217,7 +217,7 @@ static const Key keys[] = { // { MODKEY | ShiftMask, XK_x, spawn, {.v = (const char *[]){NULL}} }, { MODKEY, XK_b, togglescratch, {.v = spnmtui} }, { MODKEY | ShiftMask, XK_b, togglebar, {0} }, - { MODKEY, XK_m, spawn, {.v = (const char *[]){"pamixer-notify", "-t", NULL}} }, + { MODKEY, XK_m, spawn, SHCMD("$HOME/.local/libexec/dwm/pamixer-notify -t") }, { MODKEY | ShiftMask, XK_m, spawn, {.v = (const char *[]){"playerctl", "-a", "stop"}} }, { MODKEY, XK_w, spawn, {.v = (const char *[]){"ferdium", NULL}} }, // { MODKEY | ShiftMask, XK_w, spawn, {.v = (const char *[]){NULL}} }, @@ -227,10 +227,10 @@ static const Key keys[] = { // { MODKEY | ShiftMask, XK_z, spawn, {.v = (const char *[]){NULL}} }, { MODKEY, XK_space, zoom, {0} }, { MODKEY | ShiftMask, XK_space, togglefloating, {0} }, - { 0, XK_Print, spawn, {.v = (const char *[]){"dmenumaim", "full", NULL}} }, - { ShiftMask, XK_Print, spawn, {.v = (const char *[]){"dmenumaim", NULL}} }, - { MODKEY, XK_Print, spawn, {.v = (const char *[]){"dmenurecord", NULL}} }, - { MODKEY | ShiftMask, XK_Print, spawn, {.v = (const char *[]){"dmenurecord", "kill", NULL}} }, + { 0, XK_Print, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenumaim full") }, + { ShiftMask, XK_Print, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenumaim") }, + { MODKEY, XK_Print, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenurecord") }, + { MODKEY | ShiftMask, XK_Print, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenurecord kill") }, // { MODKEY, XK_Scroll_Lock, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY | ShiftMask, XK_Scroll_Lock, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY, XK_Pause, spawn, {.v = (const char *[]){NULL}} }, @@ -241,7 +241,7 @@ static const Key keys[] = { // { MODKEY | ShiftMask, XK_Home, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY, XK_Page_Up, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY | ShiftMask, XK_Page_Up, spawn, {.v = (const char *[]){NULL}} }, - { MODKEY, XK_Delete, spawn, {.v = (const char *[]){"dmenurecord", "kill", NULL}} }, + // { MODKEY, XK_Delete, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY | ShiftMask, XK_Delete, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY, XK_End, spawn, {.v = (const char *[]){NULL}} }, { MODKEY | ShiftMask, XK_End, quit, {0} }, @@ -251,14 +251,14 @@ static const Key keys[] = { { MODKEY | ShiftMask, XK_Left, spawn, {.v = (const char *[]){"playerctl", "-p", PLAYERCTL, "position", "0", NULL}} }, { MODKEY, XK_Right, spawn, {.v = (const char *[]){"playerctl", "-p", PLAYERCTL, "next", NULL}} }, // { MODKEY | ShiftMask, XK_Right, spawn, {.v = (const char *[]){NULL}} }, - { MODKEY, XK_Up, spawn, {.v = (const char *[]){"pamixer-notify", "--allow-boost", "-i", "5", NULL}} }, - { MODKEY | ShiftMask, XK_Up, spawn, {.v = (const char *[]){"pamixer-notify", "--allow-boost", "-i", "20", NULL}} }, - { MODKEY, XK_Down, spawn, {.v = (const char *[]){"pamixer-notify", "--allow-boost", "-d", "5", NULL}} }, - { MODKEY | ShiftMask, XK_Down, spawn, {.v = (const char *[]){"pamixer-notify", "--allow-boost", "-d", "20", NULL}} }, + { MODKEY, XK_Up, spawn, SHCMD("$HOME/.local/libexec/pamixer-notify --allow-boost -i 5") }, + { MODKEY | ShiftMask, XK_Up, spawn, SHCMD("$HOME/.local/libexec/pamixer-notify --allow-boost -i 20") }, + { MODKEY, XK_Down, spawn, SHCMD("$HOME/.local/libexec/pamixer-notify --allow-boost -d 5") }, + { MODKEY | ShiftMask, XK_Down, spawn, SHCMD("$HOME/.local/libexec/pamixer-notify --allow-boost -d 20") }, - { 0, XF86XK_AudioMute, spawn, {.v = (const char *[]){"pamixer-notify", "-t", NULL}} }, - { 0, XF86XK_AudioRaiseVolume, spawn, {.v = (const char *[]){"pamixer-notify", "--allow-boost", "-i", "5", NULL}} }, - { 0, XF86XK_AudioLowerVolume, spawn, {.v = (const char *[]){"pamixer-notify", "--allow-boost", "-d", "5", NULL}} }, + { 0, XF86XK_AudioMute, spawn, SHCMD("$HOME/.local/libexec/pamixer-notify -t") }, + { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("$HOME/.local/libexec/pamixer-notify --allow-boost -i 5") }, + { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("$HOME/.local/libexec/pamixer-notify --allow-boost -d 5") }, { 0, XF86XK_AudioPrev, spawn, {.v = (const char *[]){"playerctl", "-p", PLAYERCTL, "previous", NULL}} }, { 0, XF86XK_AudioNext, spawn, {.v = (const char *[]){"playerctl", "-p", PLAYERCTL, "next", NULL}} }, { 0, XF86XK_AudioPause, spawn, {.v = (const char *[]){"playerctl", "-p", PLAYERCTL, "pause", NULL}} }, @@ -268,8 +268,7 @@ static const Key keys[] = { { 0, XF86XK_AudioForward, spawn, {.v = (const char *[]){"playerctl", "-p", PLAYERCTL, "position", "10+", NULL}} }, // { 0, XF86XK_AudioMedia, spawn, {.v = (const char *[]){NULL}} }, { 0, XF86XK_AudioMicMute, spawn, {.v = (const char *[]){"pactl set-source-mute @DEFAULT_SOURCE@ toggle", NULL}} }, - // { 0, XF86XK_PowerOff, spawn, {.v = (const char *[]){"sysact", NULL}} }, - { 0, XF86XK_PowerOff, spawn, {.v = (const char *[]){"alarm-troll", NULL}} }, + { 0, XF86XK_PowerOff, spawn, {.v = (const char *[]){"sysact", NULL}} }, { 0, XF86XK_Calculator, spawn, {.v = (const char *[]){TERMINAL, "-e", "bc", "-l", NULL}} }, { 0, XF86XK_Sleep, spawn, {.v = (const char *[]){"sudo", "-A", "zzz", NULL}} }, { 0, XF86XK_WWW, spawn, {.v = (const char *[]){BROWSER, BROWSER_FLAG, NULL}} }, @@ -281,19 +280,18 @@ static const Key keys[] = { { 0, XF86XK_MyComputer, spawn, {.v = (const char *[]){TERMINAL, "-e", "lfub", "/", NULL}} }, // { 0, XF86XK_Battery, spawn, {.v = (const char *[]){NULL}} }, { 0, XF86XK_Launch1, spawn, {.v = (const char *[]){"xset", "dpms", "force", "off", NULL}} }, - { 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || " "synclient TouchpadOff=1") }, - { 0, XF86XK_TouchpadOff, spawn, {.v = (const char *[]){"synclient", "TouchpadOff=1", NULL}} }, - { 0, XF86XK_TouchpadOn, spawn, {.v = (const char *[]){"synclient", "TouchpadOff=0", NULL}} }, + { 0, XF86XK_TouchpadToggle, spawn, SHCMD("$HOME/.local/libexec/dwm/togtouchpad") }, + { 0, XF86XK_TouchpadOff, spawn, SHCMD("$HOME/.local/libexec/dwm/togtouchpad -n") }, + { 0, XF86XK_TouchpadOn, spawn, SHCMD("$HOME/.local/libexec/dwm/togtouchpad -y") }, /* WARN: If you have multiple backlight controllers this will fail */ - { 0, XF86XK_MonBrightnessUp, spawn, {.v = (const char *[]){"brightness-notify", "+5", NULL}} }, - { 0, XF86XK_MonBrightnessDown, spawn, {.v = (const char *[]){"brightness-notify", "-5", NULL}} }, + { 0, XF86XK_MonBrightnessUp, spawn, SHCMD("$HOME/.local/libexec/dwm/brightness-notify +5") }, + { 0, XF86XK_MonBrightnessDown, spawn, SHCMD("$HOME/.local/libexec/dwm/brightness-notify -5") }, }; /* button definitions */ static Button buttons[] = { /* click event mask button function argument */ - // { ClkLtSymbol, 0, Button1, setlayout, {0} }, - // { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, + { ClkLtSymbol, 0, Button1, setlayout, {0} }, // { ClkWinTitle, 0, Button2, zoom, {0} }, { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} },