summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h49
-rw-r--r--dwm.c4
2 files changed, 46 insertions, 7 deletions
diff --git a/config.h b/config.h
index d7ccd28..252ab4d 100644
--- a/config.h
+++ b/config.h
@@ -1,5 +1,7 @@
/* See LICENSE file for copyright and license details. */
+#include <X11/XF86keysym.h>
+
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int gappx = 6; /* gaps between windows */
@@ -36,8 +38,9 @@ static const Rule rules[] = {
{ "ardour-6.2.0", NULL,NULL, 0, 1, 0, 0, -1 },
{ "Ardour-6.2.0", NULL,NULL, 0, 1, 0, 0, -1 },
{ "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
- { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
- { "st-256color",NULL, NULL, 0, 0, 1, -1, -1 },
+ { "Firefox", NULL, NULL, 1 << 8, 0, 0, 1, -1 },
+ { "st-256color",NULL, NULL, 0, 0, 1, 1, -1 },
+ { "tabbed", NULL, NULL, 0, 0, 1, 0, -1 },
{ "Alacritty", NULL, NULL, 0, 0, 1, 0, -1 },
{ "Blueman", NULL, NULL, 0, 1, 0, 0, -1 },
{ "QjackCtl", NULL, NULL, 0, 1, 0, 0, -1 },
@@ -45,7 +48,10 @@ static const Rule rules[] = {
{ "catia.py", NULL, NULL, 0, 1, 0, 0, -1 },
{ "Catia", NULL, NULL, 0, 1, 0, 0, -1 },
{ NULL, NULL, "Event Tester", 0, 1, 0, 1, -1 }, /* xev */
- { "Steam", NULL, NULL, 4, 0, 0, 0, -1 },
+ { "Steam", NULL, NULL, 4, 0, 0, 0, -1 },
+ { "steam", NULL, NULL, 4, 0, 0, 0, -1 },
+ { "Lutris", NULL, NULL, 2, 0, 0, 0, -1 },
+ { "lutris", NULL, NULL, 2, 0, 0, 0, -1 },
};
/* layout(s) */
@@ -75,12 +81,43 @@ static const Layout layouts[] = {
/* commands */
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[] = { "alacritty", NULL };
+static const char *passmenu[] = { "passmenu", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+//static const char *termcmd[] = { "tabbed", "-c", "st", "-w", NULL };
+static const char *termcmd[] = { "tabbed", "-c", "st", "-w", NULL };
+static const char *mpdtoggle[] = { "playerctl", "--player=mpd,mpv,%any", "play-pause", NULL };
+static const char *mpdnext[] = { "playerctl", "--player=mpd,mpv,%any", "next", NULL };
+static const char *mpdprev[] = { "playerctl", "--player=mpd,mpv,%any", "previous", NULL };
+static const char *plytoggle[] = { "playerctl", "--player=%any,mpd", "play-pause", NULL };
+static const char *plyfwd[] = { "playerctl", "--player=%any,mpd", "position 5+", NULL };
+static const char *plybck[] = { "playerctl", "--player=%any,mpd", "position 5-", NULL };
+static const char *blightup[] = { "light", "-A", "1", NULL };
+static const char *blightdown[] = { "light", "-U", "1", NULL };
+static const char *audioup[] = { "volsv", "-i", NULL };
+static const char *audiodown[] = { "volsv", "-d", NULL };
+static const char *audiomute[] = { "volsv", "-t", NULL };
+static const char *micmute[] = { "pamixer", "--source", "1", "-t", NULL };
+static const char *lockscr[] = { "i3lock-fancy", NULL };
+static const char *xidletog[] = { "xidletog", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
+ { MODKEY, XK_p, spawn, {.v = passmenu } },
+ { MODKEY, XK_c, spawn, {.v = xidletog } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
+ { 0, XF86XK_AudioPlay, spawn, {.v = mpdtoggle } },
+ { 0, XF86XK_AudioNext, spawn, {.v = mpdnext } },
+ { 0, XF86XK_AudioPrev, spawn, {.v = mpdprev } },
+ { ShiftMask, XF86XK_AudioPlay, spawn, {.v = plytoggle } },
+ { ShiftMask, XF86XK_AudioNext, spawn, {.v = plyfwd } },
+ { ShiftMask, XF86XK_AudioPrev, spawn, {.v = plybck } },
+ { 0, XF86XK_MonBrightnessUp, spawn, {.v = blightup } },
+ { 0, XF86XK_MonBrightnessDown, spawn, {.v = blightdown } },
+ { 0, XF86XK_AudioLowerVolume, spawn, {.v = audiodown } },
+ { 0, XF86XK_AudioRaiseVolume, spawn, {.v = audioup } },
+ { 0, XF86XK_AudioMute, spawn, {.v = audiomute } },
+ { 0, XF86XK_AudioMicMute, spawn, {.v = micmute } },
+ { Mod4Mask, XK_l, spawn, {.v = lockscr } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY|ShiftMask, XK_j, pushdown, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, pushup, {.i = -1 } },
@@ -90,7 +127,7 @@ static Key keys[] = {
{ MODKEY, XK_period, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
- { MODKEY|ShiftMask, XK_h, zoom, {0} },
+ { MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
@@ -98,7 +135,7 @@ static Key keys[] = {
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
- { MODKEY|ShiftMask, XK_f, togglefullscr, {0} },
+ { MODKEY, XK_f, togglefullscr, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY|ControlMask, XK_comma, focusmon, {.i = -1 } },
diff --git a/dwm.c b/dwm.c
index 2c6e70e..0848d2c 100644
--- a/dwm.c
+++ b/dwm.c
@@ -227,7 +227,7 @@ static void monocle(Monitor *m);
static void motionnotify(XEvent *e);
static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c);
-static void pop(Client *);
+//static void pop(Client *);
static Client *prevtiled(Client *c);
static void propertynotify(XEvent *e);
static void pushdown(const Arg *arg);
@@ -1551,6 +1551,7 @@ nexttiled(Client *c)
return c;
}
+/*
void
pop(Client *c)
{
@@ -1559,6 +1560,7 @@ pop(Client *c)
focus(c);
arrange(c->mon);
}
+*/
Client *
prevtiled(Client *c) {