aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'config.h')
-rw-r--r--config.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/config.h b/config.h
index aca1e5d..2858473 100644
--- a/config.h
+++ b/config.h
@@ -43,8 +43,19 @@ static const AppRule rules[] = { \
* custom commands
* must always end with ', NULL };'
*/
-static const char *termcmd[] = { "alacritty", NULL };
-static const char *menucmd[] = { "run", NULL };
+static const char *termcmd[] = { "alacritty", NULL };
+static const char *menucmd[] = { "run", NULL };
+static const char *now_playing[] = { "now_playing", NULL };
+static const char *albumbler[] = { "albumbler.py", NULL };
+static const char* mpc_toggle[] = { "mpc", "toggle", NULL };
+static const char* lock[] = { "lock", NULL };
+
+#define XF86AudioLowerVolume 0x1008ff11
+#define XF86AudioRaiseVolume 0x1008ff13
+#define XF86AudioMute 0x1008ff12
+static const char *vol_dn[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
+static const char *vol_up[] = { "pactl", "set-sink-volume", "0", "+5%", NULL };
+static const char *vol_mt[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
#define DESKTOPCHANGE(K,N) \
{ MOD4, K, change_desktop, {.i = N} }, \
@@ -59,12 +70,17 @@ static Key keys[] = {
// Commands
{ MOD4, XK_t, spawn, {.com = termcmd} },
{ MOD4, XK_d, spawn, {.com = menucmd} },
- { MOD4, XK_space, spawn, SHCMD("mpc toggle") },
- { MOD4|SHIFT, XK_space, spawn, SHCMD("albumbler.py") },
- { MOD4, XK_h, spawn, SHCMD("lock") },
- { MOD4|SHIFT|CONTROL, XK_space, spawn, SHCMD("notify-send --app-name=Playing $(mpc current)")},
+ { MOD4, XK_space, spawn, {.com = mpc_toggle } },
+ { MOD4|SHIFT, XK_space, spawn, {.com = albumbler } },
+ { MOD4|SHIFT|CONTROL, XK_space, spawn, {.com = now_playing } },
+ { MOD4, XK_h, spawn, {.com = lock } },
{ MOD4|SHIFT|CONTROL, XK_q, quit, {.i = 0} }, /* quit with exit value 0 */
+ // Multimedia
+ { 0, XF86AudioLowerVolume, spawn, {.com = vol_dn } },
+ { 0, XF86AudioRaiseVolume, spawn, {.com = vol_up } },
+ { 0, XF86AudioMute, spawn, {.com = vol_mt } },
+
// Windows
{ MOD4, XK_n, next_win, {NULL} },
{ MOD4, XK_o, prev_win, {NULL} },