summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'config.h')
-rw-r--r--config.h130
1 files changed, 21 insertions, 109 deletions
diff --git a/config.h b/config.h
index 863b55d..0200a80 100644
--- a/config.h
+++ b/config.h
@@ -87,29 +87,13 @@ static const char *termcmd[] = { "st", NULL };
static const char scratchpadname[] = "scratchpad";
static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL };
-/* PulseAudio commands. Require pulsemixer. */
-static const char *volup[] = { "pulsemixer", "--change-volume", "+5", NULL };
-static const char *bigvolup[] = { "pulsemixer", "--change-volume", "+15", NULL };
-static const char *voldown[] = { "pulsemixer", "--change-volume", "-5", NULL };
-static const char *bigvoldown[] = { "pulsemixer", "--change-volume", "-15", NULL };
-static const char *voltoggle[] = { "pulsemixer", "--toggle-mute", NULL };
-static const char *audiocontrol[] = { "st", "-e", "pulsemixer", NULL };
-
-/* ALSA commands. Requires amixer in alsa-utils. */
-/* static const char *volup[] = { "amixer", "sset", "Master", "5%+", NULL }; */
-/* static const char *bigvolup[] = { "amixer", "sset", "Master", "15%+", NULL }; */
-/* static const char *voldown[] = { "amixer", "sset", "Master", "5%-", NULL }; */
-/* static const char *bigvoldown[] = { "amixer", "sset", "Master", "15%-", NULL }; */
-/* static const char *voltoggle[] = { "amixer", "sset", "Master", "toggle" NULL }; */
-/* static const char *audiocontrol[] = { "st", "-e", "alsamixer", NULL }; */
-
#include <X11/XF86keysym.h>
#include "shiftview.c"
static Key keys[] = {
/* modifier key function argument */
STACKKEYS(MODKEY, focus)
STACKKEYS(MODKEY|ShiftMask, push)
- { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Close dwm?\")\" = Yes ] && kill -TERM $(pidof dwm)") },
+ /* { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("") }, */
{ MODKEY, XK_grave, spawn, SHCMD("dmenuunicode") },
/* { MODKEY|ShiftMask, XK_grave, togglescratch, SHCMD("") }, */
TAGKEYS( XK_1, 0)
@@ -123,12 +107,12 @@ static Key keys[] = {
TAGKEYS( XK_9, 8)
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
- { MODKEY, XK_minus, spawn, {.v = voldown } },
- { MODKEY|ShiftMask, XK_minus, spawn, {.v = bigvoldown } },
- { MODKEY, XK_equal, spawn, {.v = volup } },
- { MODKEY|ShiftMask, XK_equal, spawn, {.v = bigvolup } },
- /* { MODKEY, XK_BackSpace, spawn, SHCMD("") }, */
- { MODKEY|ShiftMask, XK_BackSpace, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Reboot computer?\")\" = Yes ] && sudo -A reboot") },
+ { MODKEY, XK_minus, spawn, SHCMD("pamixer --allow-boost -d 5; kill -44 $(pidof dwmblocks)") },
+ { MODKEY|ShiftMask, XK_minus, spawn, SHCMD("pamixer --allow-boost -d 15; kill -44 $(pidof dwmblocks)") },
+ { MODKEY, XK_equal, spawn, SHCMD("pamixer --allow-boost -i 5; kill -44 $(pidof dwmblocks)") },
+ { MODKEY|ShiftMask, XK_equal, spawn, SHCMD("pamixer --allow-boost -i 15; kill -44 $(pidof dwmblocks)") },
+ { MODKEY, XK_BackSpace, spawn, SHCMD("sysact") },
+ /* { MODKEY|ShiftMask, XK_BackSpace, spawn, SHCMD("") }, */
{ MODKEY, XK_Tab, view, {0} },
/* { MODKEY|ShiftMask, XK_Tab, spawn, SHCMD("") }, */
@@ -139,7 +123,7 @@ static Key keys[] = {
{ MODKEY, XK_e, spawn, SHCMD("st -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook") },
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("tutorialvids") },
{ MODKEY, XK_r, spawn, SHCMD("st -e lf") },
- { MODKEY|ShiftMask, XK_r, quit, {1} },
+ /* { MODKEY|ShiftMask, XK_r, quit, {1} }, */
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_y, setlayout, {.v = &layouts[2]} },
@@ -159,7 +143,7 @@ static Key keys[] = {
{ MODKEY, XK_backslash, view, {0} },
/* { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("") }, */
- { MODKEY, XK_a, spawn, {.v = audiocontrol } },
+ { MODKEY, XK_a, spawn, SHCMD("st -e pulsemixer; kill -44 $(pidof dwmblocks)") },
/* { MODKEY|ShiftMask, XK_a, spawn, SHCMD("") }, */
{ MODKEY, XK_s, togglesticky, {0} },
/* { MODKEY|ShiftMask, XK_s, spawn, SHCMD("") }, */
@@ -181,26 +165,26 @@ static Key keys[] = {
{ MODKEY, XK_z, incrgaps, {.i = +1 } },
{ MODKEY|ShiftMask, XK_z, incrgaps, {.i = -1 } },
- { MODKEY, XK_x, spawn, SHCMD("slock & xset dpms force off; mpc pause ; pauseallmpv") },
- { MODKEY|ShiftMask, XK_x, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Shutdown computer?\")\" = Yes ] && sudo -A shutdown -h now") },
+ /* { MODKEY, XK_x, spawn, SHCMD("") }, */
+ /* { MODKEY|ShiftMask, XK_x, spawn, SHCMD("") }, */
{ MODKEY, XK_c, spawn, SHCMD("st -e bc -l") },
{ MODKEY|ShiftMask, XK_c, spawn, SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") },
{ MODKEY, XK_v, spawn, SHCMD("st -e $EDITOR -c \"VimwikiIndex\"") },
{ MODKEY|ShiftMask, XK_v, spawn, SHCMD("{ killall xcompmgr || setsid xcompmgr & } ; xwallpaper --zoom ~/.config/wall.png") },
{ MODKEY, XK_b, togglebar, {0} },
- { MODKEY|ShiftMask, XK_b, spawn, SHCMD("hover left") },
+ /* { MODKEY|ShiftMask, XK_b, spawn, SHCMD("") }, */
{ MODKEY, XK_n, spawn, SHCMD("st -e newsboat; pkill -RTMIN+6 dwmblocks") },
- { MODKEY|ShiftMask, XK_n, spawn, SHCMD("hover right") },
+ /* { MODKEY|ShiftMask, XK_n, spawn, SHCMD("") }, */
{ MODKEY, XK_m, spawn, SHCMD("st -e ncmpcpp") },
- { MODKEY|ShiftMask, XK_m, spawn, {.v = voltoggle } },
+ { MODKEY|ShiftMask, XK_m, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") },
{ MODKEY, XK_comma, spawn, SHCMD("mpc prev") },
{ MODKEY|ShiftMask, XK_comma, spawn, SHCMD("mpc seek 0%") },
{ MODKEY, XK_period, spawn, SHCMD("mpc next") },
{ MODKEY|ShiftMask, XK_period, spawn, SHCMD("mpc repeat") },
{ MODKEY, XK_Left, focusmon, {.i = -1 } },
- { MODKEY, XK_Left, focusmon, {.i = +1 } },
- { MODKEY|ShiftMask, XK_Right, tagmon, {.i = -1 } },
+ { MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } },
+ { MODKEY, XK_Right, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } },
{ MODKEY, XK_Page_Up, shiftview, { .i = -1 } },
@@ -210,7 +194,7 @@ static Key keys[] = {
{ MODKEY, XK_F1, spawn, SHCMD("groff -mom /usr/local/share/dwm/larbs.mom -Tpdf | zathura -") },
{ MODKEY, XK_F2, quit, {1} },
{ MODKEY, XK_F3, spawn, SHCMD("displayselect") },
- { MODKEY, XK_F4, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Hibernate computer?\")\" = Yes ] && sudo -A zzz") },
+ /* { MODKEY, XK_F4, spawn, SHCMD("") }, */
{ MODKEY, XK_F5, xrdb, {.v = NULL } },
{ MODKEY, XK_F6, spawn, SHCMD("torwrap") },
{ MODKEY, XK_F7, spawn, SHCMD("td-toggle") },
@@ -229,9 +213,9 @@ static Key keys[] = {
{ MODKEY, XK_Delete, spawn, SHCMD("dmenurecord kill") },
{ MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey &") },
- { 0, XF86XK_AudioMute, spawn, {.v = voltoggle } },
- { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
- { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
+ { 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") },
+ { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer --allow-boost -i 3; kill -44 $(pidof dwmblocks)") },
+ { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer --allow-boost -d 3; kill -44 $(pidof dwmblocks)") },
{ 0, XF86XK_AudioPrev, spawn, SHCMD("mpc prev") },
{ 0, XF86XK_AudioNext, spawn, SHCMD("mpc next") },
{ 0, XF86XK_AudioPause, spawn, SHCMD("mpc pause") },
@@ -242,7 +226,7 @@ static Key keys[] = {
{ 0, XF86XK_AudioMedia, spawn, SHCMD("st -e ncmpcpp") },
{ 0, XF86XK_PowerOff, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Shutdown computer?\")\" = Yes ] && sudo -A shutdown -h now") },
{ 0, XF86XK_Calculator, spawn, SHCMD("st -e bc -l") },
- { 0, XF86XK_Sleep, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Hibernate computer?\")\" = Yes ] && sudo -A zzz") },
+ { 0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz") },
{ 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") },
{ 0, XF86XK_DOS, spawn, SHCMD("st") },
{ 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },
@@ -298,75 +282,3 @@ static Button buttons[] = {
{ ClkTagBar, 0, Button4, shiftview, {.i = -1} },
{ ClkTagBar, 0, Button5, shiftview, {.i = 1} },
};
-
-void
-setlayoutex(const Arg *arg)
-{
- setlayout(&((Arg) { .v = &layouts[arg->i] }));
-}
-
-void
-viewex(const Arg *arg)
-{
- view(&((Arg) { .ui = 1 << arg->ui }));
-}
-
-void
-viewall(const Arg *arg)
-{
- view(&((Arg){.ui = ~0}));
-}
-
-void
-toggleviewex(const Arg *arg)
-{
- toggleview(&((Arg) { .ui = 1 << arg->ui }));
-}
-
-void
-tagex(const Arg *arg)
-{
- tag(&((Arg) { .ui = 1 << arg->ui }));
-}
-
-void
-toggletagex(const Arg *arg)
-{
- toggletag(&((Arg) { .ui = 1 << arg->ui }));
-}
-
-void
-tagall(const Arg *arg)
-{
- tag(&((Arg){.ui = ~0}));
-}
-
-/* signal definitions */
-/* signum must be greater than 0 */
-/* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
-static Signal signals[] = {
- /* signum function */
- { "focusstack", focusstack },
- { "setmfact", setmfact },
- { "togglebar", togglebar },
- { "incnmaster", incnmaster },
- { "togglefloating", togglefloating },
- { "focusmon", focusmon },
- { "tagmon", tagmon },
- { "zoom", zoom },
- { "view", view },
- { "viewall", viewall },
- { "viewex", viewex },
- { "toggleview", view },
- { "toggleviewex", toggleviewex },
- { "tag", tag },
- { "tagall", tagall },
- { "tagex", tagex },
- { "toggletag", tag },
- { "toggletagex", toggletagex },
- { "killclient", killclient },
- { "quit", quit },
- { "setlayout", setlayout },
- { "setlayoutex", setlayoutex },
- { "xrdb", xrdb },
-};