commit e2b13aab75d18436a6e06e4ae2ee78ef41e8ae21
parent 6f5f3dfba0772e603eecf844ac3694cb68926a27
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Sun, 8 Oct 2023 08:45:31 -0700
Update dwm config
Diffstat:
1 file changed, 16 insertions(+), 22 deletions(-)
diff --git a/local/src/src/forks/dwm/patches/config.diff b/local/src/src/forks/dwm/patches/config.diff
@@ -1,11 +1,11 @@
Author: Jacob R. Edwards <jacob@jacobedwards.org>
-Date: 2023-02-27
+Date: 2023-10-08
Custom configuration.
---- /dev/null Mon Feb 27 10:44:56 2023
-+++ config.h Mon Feb 27 10:44:23 2023
-@@ -0,0 +1,172 @@
+--- /dev/null Sun Oct 8 07:40:54 2023
++++ config.h Sun Oct 8 07:40:38 2023
+@@ -0,0 +1,166 @@
+/* See LICENSE file for copyright and license details. */
+
+#include <X11/XF86keysym.h>
@@ -16,7 +16,7 @@ Custom configuration.
+static const unsigned int borderpx = 4;
+static const unsigned int snap = 16; /* window snap margin in floating mode */
+
-+static const char dmenufont[] = "monospace:size=8";
++static const char dmenufont[] = "sans:size=8";
+static const char *fonts[] = { dmenufont };
+
+static const char cdull[] = "#222";
@@ -65,6 +65,8 @@ Custom configuration.
+/* helper for spawning shell commands in the pre dwm-5.0 fashion */
+#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", "exec " cmd, NULL } }
+
++#define SHCMDSTATUS(cmd) SHCMD(cmd " >/tmp/status 2>&1")
++
+/* create argument array */
+#define ARGV(...) { .v = (const char*[]){ __VA_ARGS__, NULL } }
+
@@ -76,12 +78,6 @@ Custom configuration.
+ "-sf", cprimary, NULL
+};
+
-+static char *audio_next[] = { "apc", "next", NULL };
-+static char *audio_pause[] = { "apc", "pause", NULL };
-+static char *audio_play[] = { "apc", "play", NULL };
-+static char *audio_previous[] = { "apc", "previous", NULL };
-+static char *audio_stop[] = { "apc", "stop", NULL };
-+static char *audio_toggle[] = { "apc", "toggle", NULL };
+static char *volume_lower[] = { "sh", "-c", "vol -5 && notifyvol", NULL };
+static char *volume_mute[] = { "sh", "-c", "mute && notifyvol", NULL };
+static char *volume_raise[] = { "sh", "-c", "vol +5 && notifyvol", NULL };
@@ -129,17 +125,13 @@ Custom configuration.
+ { MODKEY|ShiftMask, XK_period, tagmon, { .i = +1 } },
+
+ /* audio player */
-+ { 0, XF86XK_AudioNext, spawn, { .v = audio_next } },
-+ { 0, XF86XK_AudioPause, spawn, { .v = audio_pause } },
-+ { 0, XF86XK_AudioPlay, spawn, { .v = audio_play } },
-+ { 0, XF86XK_AudioPrev, spawn, { .v = audio_previous } },
-+ { 0, XF86XK_AudioStop, spawn, { .v = audio_stop } },
-+ { MODKEY, XK_g, spawn, { .v = audio_toggle } },
-+ { MODKEY, XK_n, spawn, { .v = audio_next } },
-+ { MODKEY, XK_p, spawn, { .v = audio_previous } },
-+ { MODKEY, XK_slash, spawn, SHCMD("notify 'Currently playing' \"$(apc name | awk -F/ '{print $(NF-2), $(NF-1), $NF}')\"") },
++ { MODKEY, XK_g, spawn, SHCMD("apc toggle | status 'Player status'") },
++ { MODKEY, XK_n, spawn, SHCMD("apc next | status Playing") },
++ { MODKEY, XK_p, spawn, SHCMD("apc previous | status Playing") },
++ { MODKEY|ShiftMask, XK_g, spawn, SHCMD("apc stop") },
++ { MODKEY, XK_slash, spawn, SHCMD("apc name | status Playing") },
+ { MODKEY, XK_grave, spawn, SHCMD("apc list | shf | apc truncate ^") },
-+ { MODKEY | ShiftMask, XK_slash, spawn, SHCMD("notify 'Player status' \"$(apc status)\"") },
++ { MODKEY|ShiftMask, XK_slash, spawn, SHCMD("apc status | status 'Player status'") },
+
+ /* audio output */
+ { 0, XF86XK_AudioLowerVolume, spawn, { .v = volume_lower } },
@@ -162,7 +154,9 @@ Custom configuration.
+ { MODKEY, XK_e, spawn, { .v = dmenucmd } },
+ { MODKEY, XK_f, spawn, SHCMD("${TERMINAL:-st}") },
+ { MODKEY, XK_r, spawn, SHCMD("${BROWSER:-surf}") },
-+ { MODKEY, XK_space, spawn, SHCMD("plumb \"$(xclip -out -selection primary)\"") }
++ { MODKEY|ShiftMask, XK_r, spawn, SHCMD("cd \"$HOME\"/own/etc/urls && { urls | xgrab ;}") },
++ { MODKEY, XK_space, spawn, SHCMD("plumb \"$(xclip -out -selection primary)\"") },
++ { MODKEY, XK_q, spawn, SHCMD("urls | xgrab") }
+};
+
+/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */