summaryrefslogtreecommitdiffstats
path: root/6.3+h/0005-add-lock-screenshot-audio-brigthness.patch
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-05-04 10:33:07 +0800
committerJesús <heckyel@hyperbola.info>2022-05-04 10:33:07 +0800
commit4b34604a01a175c1f7a3d5aad26b0954c9177119 (patch)
tree8e06985e56492cb59d68505c62e47ad5a165b781 /6.3+h/0005-add-lock-screenshot-audio-brigthness.patch
downloaddwm-patches-4b34604a01a175c1f7a3d5aad26b0954c9177119.tar.lz
dwm-patches-4b34604a01a175c1f7a3d5aad26b0954c9177119.tar.xz
dwm-patches-4b34604a01a175c1f7a3d5aad26b0954c9177119.zip
initial commit
Diffstat (limited to '6.3+h/0005-add-lock-screenshot-audio-brigthness.patch')
-rw-r--r--6.3+h/0005-add-lock-screenshot-audio-brigthness.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/6.3+h/0005-add-lock-screenshot-audio-brigthness.patch b/6.3+h/0005-add-lock-screenshot-audio-brigthness.patch
new file mode 100644
index 0000000..209b002
--- /dev/null
+++ b/6.3+h/0005-add-lock-screenshot-audio-brigthness.patch
@@ -0,0 +1,64 @@
+diff --git a/config.def.h b/config.def.h
+index 9018dd4..464a2ff 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -33,8 +33,8 @@ static const Rule rules[] = {
+ * WM_NAME(STRING) = title
+ */
+ /* class instance title tags mask isfloating monitor */
+- { "Gimp", NULL, NULL, 0, 1, -1 },
+- { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
++ { "Gimp", NULL, NULL, 0, 1, -1 },
++ { "Iceweasel", NULL, NULL, 1 << 8, 0, -1 },
+ };
+
+ /* layout(s) */
+@@ -66,6 +66,21 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn()
+ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+ static const char *termcmd[] = { "st", NULL };
+
++/* volume controls */
++static const char *upvol[] = { "amixer", "-q", "set", "Master", "5%+", "unmute", NULL };
++static const char *downvol[] = { "amixer", "-q", "set", "Master", "5%-", "unmute", NULL };
++static const char *mutevol[] = { "amixer", "-q", "set", "Master", "toggle", NULL };
++
++/* brightnes */
++static const char *brightdowncmd[] = { "xbacklight","-dec", "5", NULL };
++static const char *brightupcmd[] = { "xbacklight","-inc", "5", NULL };
++
++/* lock screen */
++static const char *lockcmd[] = { "slock", NULL };
++
++/* screenshot */
++static const char *capturecmd[] = { "scrot","-s", NULL };
++
+ static Key keys[] = {
+ /* modifier key function argument */
+ { MODKEY, XK_p, spawn, {.v = dmenucmd } },
+@@ -94,6 +109,14 @@ static Key keys[] = {
+ { MODKEY, XK_minus, setgaps, {.i = -1 } },
+ { MODKEY, XK_equal, setgaps, {.i = +1 } },
+ { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } },
++ { MODKEY|ControlMask, XK_l, spawn, {.v = lockcmd } },
++ { 0, XF86XK_AudioMute, spawn, {.v = mutevol } },
++ { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } },
++ { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } },
++ { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightdowncmd } },
++ { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightupcmd } },
++ { 0, XK_Print, spawn, {.v = capturecmd } },
++ { MODKEY|ControlMask, XK_l, spawn, {.v = lockcmd } },
+ TAGKEYS( XK_1, 0)
+ TAGKEYS( XK_2, 1)
+ TAGKEYS( XK_3, 2)
+diff --git a/dwm.c b/dwm.c
+index 83bc6bd..b724b6a 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -40,6 +40,7 @@
+ #include <X11/extensions/Xinerama.h>
+ #endif /* XINERAMA */
+ #include <X11/Xft/Xft.h>
++#include <X11/XF86keysym.h>
+
+ #include "drw.h"
+ #include "util.h"