add XF86Keys

master
meftimes 2024-07-02 09:35:13 -04:00
parent b012bbb46b
commit 1495651f19
3 changed files with 29 additions and 28 deletions

View File

@ -104,6 +104,7 @@ ResourcePref resources[] = {
{ "mfact", FLOAT, &mfact }, { "mfact", FLOAT, &mfact },
}; };
#include <X11/XF86keysym.h>
static const Key keys[] = { static const Key keys[] = {
/* modifier key function argument */ /* modifier key function argument */
{ MODKEY, XK_grave, spawn, {.v = (const char*[]){ "dmenuunicode", NULL } } }, { MODKEY, XK_grave, spawn, {.v = (const char*[]){ "dmenuunicode", NULL } } },
@ -222,34 +223,34 @@ static const Key keys[] = {
{ MODKEY, XK_Delete, spawn, {.v = (const char*[]){ "dmenurecord", "kill", NULL } } }, { MODKEY, XK_Delete, spawn, {.v = (const char*[]){ "dmenurecord", "kill", NULL } } },
{ MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey &") }, { MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey &") },
// { 0, XF86XK_AudioMute, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") }, { 0, XF86XK_AudioMute, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
// { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%+; kill -44 $(pidof dwmblocks)") }, { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%+; kill -44 $(pidof dwmblocks)") },
// { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%-; kill -44 $(pidof dwmblocks)") }, { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%-; kill -44 $(pidof dwmblocks)") },
// { 0, XF86XK_AudioPrev, spawn, {.v = (const char*[]){ "mpc", "prev", NULL } } }, { 0, XF86XK_AudioPrev, spawn, {.v = (const char*[]){ "mpc", "prev", NULL } } },
// { 0, XF86XK_AudioNext, spawn, {.v = (const char*[]){ "mpc", "next", NULL } } }, { 0, XF86XK_AudioNext, spawn, {.v = (const char*[]){ "mpc", "next", NULL } } },
// { 0, XF86XK_AudioPause, spawn, {.v = (const char*[]){ "mpc", "pause", NULL } } }, { 0, XF86XK_AudioPause, spawn, {.v = (const char*[]){ "mpc", "pause", NULL } } },
// { 0, XF86XK_AudioPlay, spawn, {.v = (const char*[]){ "mpc", "play", NULL } } }, { 0, XF86XK_AudioPlay, spawn, {.v = (const char*[]){ "mpc", "play", NULL } } },
// { 0, XF86XK_AudioStop, spawn, {.v = (const char*[]){ "mpc", "stop", NULL } } }, { 0, XF86XK_AudioStop, spawn, {.v = (const char*[]){ "mpc", "stop", NULL } } },
// { 0, XF86XK_AudioRewind, spawn, {.v = (const char*[]){ "mpc", "seek", "-10", NULL } } }, { 0, XF86XK_AudioRewind, spawn, {.v = (const char*[]){ "mpc", "seek", "-10", NULL } } },
// { 0, XF86XK_AudioForward, spawn, {.v = (const char*[]){ "mpc", "seek", "+10", NULL } } }, { 0, XF86XK_AudioForward, spawn, {.v = (const char*[]){ "mpc", "seek", "+10", NULL } } },
// { 0, XF86XK_AudioMedia, spawn, {.v = (const char*[]){ TERMINAL, "-e", "ncmpcpp", NULL } } }, { 0, XF86XK_AudioMedia, spawn, {.v = (const char*[]){ TERMINAL, "-e", "ncmpcpp", NULL } } },
// { 0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle") }, { 0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle") },
// /* { 0, XF86XK_PowerOff, spawn, {.v = (const char*[]){ "sysact", NULL } } }, */ /* { 0, XF86XK_PowerOff, spawn, {.v = (const char*[]){ "sysact", NULL } } }, */
// { 0, XF86XK_Calculator, spawn, {.v = (const char*[]){ TERMINAL, "-e", "bc", "-l", 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_Sleep, spawn, {.v = (const char*[]){ "sudo", "-A", "zzz", NULL } } },
// { 0, XF86XK_WWW, spawn, {.v = (const char*[]){ BROWSER, NULL } } }, { 0, XF86XK_WWW, spawn, {.v = (const char*[]){ BROWSER, NULL } } },
// { 0, XF86XK_DOS, spawn, {.v = termcmd } }, { 0, XF86XK_DOS, spawn, {.v = termcmd } },
// { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") }, { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },
// { 0, XF86XK_TaskPane, spawn, {.v = (const char*[]){ TERMINAL, "-e", "htop", NULL } } }, { 0, XF86XK_TaskPane, spawn, {.v = (const char*[]){ TERMINAL, "-e", "htop", NULL } } },
// { 0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") }, { 0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") },
// { 0, XF86XK_MyComputer, spawn, {.v = (const char*[]){ TERMINAL, "-e", "lfub", "/", NULL } } }, { 0, XF86XK_MyComputer, spawn, {.v = (const char*[]){ TERMINAL, "-e", "lfub", "/", NULL } } },
// /* { 0, XF86XK_Battery, spawn, SHCMD("") }, */ /* { 0, XF86XK_Battery, spawn, SHCMD("") }, */
// { 0, XF86XK_Launch1, spawn, {.v = (const char*[]){ "xset", "dpms", "force", "off", 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_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_TouchpadOff, spawn, {.v = (const char*[]){ "synclient", "TouchpadOff=1", NULL } } },
// { 0, XF86XK_TouchpadOn, spawn, {.v = (const char*[]){ "synclient", "TouchpadOff=0", NULL } } }, { 0, XF86XK_TouchpadOn, spawn, {.v = (const char*[]){ "synclient", "TouchpadOff=0", NULL } } },
// { 0, XF86XK_MonBrightnessUp, spawn, {.v = (const char*[]){ "xbacklight", "-inc", "15", NULL } } }, { 0, XF86XK_MonBrightnessUp, spawn, {.v = (const char*[]){ "xbacklight", "-inc", "15", NULL } } },
// { 0, XF86XK_MonBrightnessDown, spawn, {.v = (const char*[]){ "xbacklight", "-dec", "15", NULL } } }, { 0, XF86XK_MonBrightnessDown, spawn, {.v = (const char*[]){ "xbacklight", "-dec", "15", NULL } } },
}; };

BIN
dwm

Binary file not shown.

BIN
dwm.o

Binary file not shown.