commit ab0f09b167bea6e293213b0bf5a43d7f09d06387
parent 0dd22ac8f9b7d4d39fa924a5f62df5582467ac54
Author: Beau <cbeauhilton@gmail.com>
Date: Thu, 9 Jun 2022 08:58:15 -0500
excise dwmblocks
Diffstat:
4 files changed, 147 insertions(+), 164 deletions(-)
diff --git a/Makefile b/Makefile
@@ -41,12 +41,12 @@ install: all
sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
mkdir -p ${DESTDIR}${PREFIX}/share/dwm
- cp -f larbs.mom ${DESTDIR}${PREFIX}/share/dwm
- chmod 644 ${DESTDIR}${PREFIX}/share/dwm/larbs.mom
+ cp -f help.mom ${DESTDIR}${PREFIX}/share/dwm
+ chmod 644 ${DESTDIR}${PREFIX}/share/dwm/help.mom
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/dwm\
- ${DESTDIR}${PREFIX}/share/dwm/larbs.mom\
+ ${DESTDIR}${PREFIX}/share/dwm/help.mom\
${DESTDIR}${MANPREFIX}/man1/dwm.1
.PHONY: all options clean dist install uninstall
diff --git a/config.h b/config.h
@@ -4,94 +4,104 @@
#define TERMINAL "kitty"
/* appearance */
-static const unsigned int borderpx = 1; /*[> border pixel of windows <]*/
-static const unsigned int snap = 32; /* snap pixel */
-static const unsigned int gappih = 20; /* horiz inner gap between windows */
-static const unsigned int gappiv = 10; /* vert inner gap between windows */
-static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */
-static const unsigned int gappov = 30; /* vert outer gap between windows and screen edge */
-static const int smartgaps = 1; /* 1 means no outer gap when there is only one window */
-static const int showbar = 0; /* 0 means no bar */
-static const int topbar = 1; /* 0 means bottom bar */
-static const char *fonts[] = {
- "IBM Plex Mono:pixelsize=12:antialias=true:autohint=true",
- "Blex Mono:pixelsize=12:antialias=true:autohint=true",
- "JoyPixels:pixelsize=10:antialias=true:autohint=true"
-};
-static char dmenufont[] = "IBM Plex Mono:pixelsize=12:antialias=true:autohint=true";
-static char normbgcolor[] = "#181818";
-static char normbordercolor[] = "#181818";
-static char normfgcolor[] = "#777777";
-static char selfgcolor[] = "#dedede";
-static char selbordercolor[] = "#181818";
-static char selbgcolor[] = "#181818";
-static char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = {normfgcolor, normbgcolor, normbordercolor},
- [SchemeSel] = {selfgcolor, selbgcolor, selbordercolor},
+static const unsigned int borderpx = 1; /*[> border pixel of windows <]*/
+static const unsigned int snap = 32; /* snap pixel */
+static const unsigned int gappih = 20; /* horiz inner gap between windows */
+static const unsigned int gappiv = 10; /* vert inner gap between windows */
+static const unsigned int gappoh =
+ 10; /* horiz outer gap between windows and screen edge */
+static const unsigned int gappov =
+ 30; /* vert outer gap between windows and screen edge */
+static const int smartgaps =
+ 1; /* 1 means no outer gap when there is only one window */
+static const int showbar = 0; /* 0 means no bar */
+static const int topbar = 1; /* 0 means bottom bar */
+static const char *fonts[] = {
+ "IBM Plex Mono:pixelsize=12:antialias=true:autohint=true",
+ "Blex Mono:pixelsize=12:antialias=true:autohint=true",
+ "JoyPixels:pixelsize=10:antialias=true:autohint=true"};
+static char dmenufont[] =
+ "IBM Plex Mono:pixelsize=12:antialias=true:autohint=true";
+static char normbgcolor[] = "#181818";
+static char normbordercolor[] = "#181818";
+static char normfgcolor[] = "#777777";
+static char selfgcolor[] = "#dedede";
+static char selbordercolor[] = "#181818";
+static char selbgcolor[] = "#181818";
+static char *colors[][3] = {
+ /* fg bg border */
+ [SchemeNorm] = {normfgcolor, normbgcolor, normbordercolor},
+ [SchemeSel] = {selfgcolor, selbgcolor, selbordercolor},
};
/* tagging */
-static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9"};
+static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9"};
-static const Rule rules[] = {
- /* xprop(1):
- * WM_CLASS(STRING) = instance, class
- * WM_NAME(STRING) = title
- */
- /* class instance title tags mask isfloating isterminal noswallow monitor */
- {"kitty", NULL, NULL, 0, 0, 1, 0, -1},
+static const Rule rules[] = {
+ /* xprop(1):
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+ /* class instance title tags mask isfloating isterminal
+ noswallow monitor */
+ {"kitty", NULL, NULL, 0, 0, 1, 0, -1},
};
/* layout(s) */
-static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
-static const int nmaster = 1; /* number of clients in master area */
-static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
-#define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */
+static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
+static const int nmaster = 1; /* number of clients in master area */
+static const int resizehints =
+ 1; /* 1 means respect size hints in tiled resizals */
+#define FORCE_VSPLIT \
+ 1 /* nrowgrid layout: force two clients to always split vertically */
#include "vanitygaps.c"
-static const Layout layouts[] = {
- /* symbol arrange function */
- {"[]=", tile}, /* Default: Master on left, stack on right */
- {"TTT", bstack}, /* Master on top, stack on bottom */
+static const Layout layouts[] = {
+ /* symbol arrange function */
+ {"[]=", tile}, /* Default: Master on left, stack on right */
+ {"TTT", bstack}, /* Master on top, stack on bottom */
- {"[@]", spiral}, /* Fibonacci spiral */
- {"[\\]", dwindle}, /* Decreasing in size right and leftward */
+ {"[@]", spiral}, /* Fibonacci spiral */
+ {"[\\]", dwindle}, /* Decreasing in size right and leftward */
- {"[D]", deck}, /* Master on left, stack in monocle-like mode on right */
- {"[M]", monocle}, /* All windows on top of eachother */
+ {"[D]", deck}, /* Master on left, stack in monocle-like mode on right */
+ {"[M]", monocle}, /* All windows on top of eachother */
- {"|M|", centeredmaster}, /* Master in middle, stack on sides */
- {">M>", centeredfloatingmaster}, /* Same but master floats */
+ {"|M|", centeredmaster}, /* Master in middle, stack on sides */
+ {">M>", centeredfloatingmaster}, /* Same but master floats */
- {"><>", NULL}, /* no layout function means floating behavior */
- {NULL, NULL},
+ {"><>", NULL}, /* no layout function means floating behavior */
+ {NULL, NULL},
};
/* key definitions */
#define MODKEY Mod4Mask
-#define TAGKEYS(KEY, TAG) \
- {MODKEY, KEY, view, {.ui = 1 << TAG}}, \
- {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
- {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
- {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}},
+#define TAGKEYS(KEY, TAG) \
+ {MODKEY, KEY, view, {.ui = 1 << TAG}}, \
+ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
+ {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
+ {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}},
-#define STACKKEYS(MOD, ACTION) \
- {MOD, XK_j, ACTION##stack, {.i = INC(+1)}}, \
- {MOD, XK_k, ACTION##stack, {.i = INC(-1)}}, \
- {MOD, XK_v, ACTION##stack, {.i = 0}},
+#define STACKKEYS(MOD, ACTION) \
+ {MOD, XK_j, ACTION##stack, {.i = INC(+1)}}, \
+ {MOD, XK_k, ACTION##stack, {.i = INC(-1)}}, \
+ {MOD, XK_v, ACTION##stack, {.i = 0}},
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
-#define SHCMD(cmd) {.v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } }
+#define SHCMD(cmd) \
+ { \
+ .v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \
+ }
/* commands */
-static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
-static const char *dmenucmd[] = {"dmenu_run", "-fn", dmenufont, "-nb",
- normbgcolor, "-nf", normfgcolor, "-sb",
- selbgcolor, "-sf", selfgcolor, NULL};
-static const char *termcmd[] = {TERMINAL, NULL};
-static const char scratchpadname[] = "scratchpad";
-static const char *scratchpadcmd[] = {"st", "-t", scratchpadname,
+static char dmenumon[2] =
+ "0"; /* component of dmenucmd, manipulated in spawn() */
+static const char *dmenucmd[] = {"dmenu_run", "-fn", dmenufont, "-nb",
+ normbgcolor, "-nf", normfgcolor, "-sb",
+ selbgcolor, "-sf", selfgcolor, NULL};
+static const char *termcmd[] = {TERMINAL, NULL};
+static const char scratchpadname[] = "scratchpad";
+static const char *scratchpadcmd[] = {"st", "-t", scratchpadname,
"-g", "120x34", NULL};
#include "shiftview.c"
@@ -101,21 +111,19 @@ static Key keys[] = {
/* modifier key function argument */
STACKKEYS(MODKEY, focus) STACKKEYS(MODKEY | ShiftMask, push)
- /* { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("") }, */
+ /* { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("")
+ * },
+ */
{MODKEY, XK_grave, spawn, SHCMD("dmenuunicode")},
- /* { MODKEY|ShiftMask, XK_grave, togglescratch, SHCMD("")}, */
+ /* { MODKEY|ShiftMask, XK_grave, togglescratch,
+ * SHCMD("")},
+ */
- TAGKEYS(XK_1, 0)
- TAGKEYS(XK_2, 1)
- TAGKEYS(XK_3, 2)
- TAGKEYS(XK_4, 3)
- TAGKEYS(XK_5, 4)
- TAGKEYS(XK_6, 5)
- TAGKEYS(XK_7, 6)
- TAGKEYS(XK_8, 7)
- TAGKEYS(XK_9, 8)
+ TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3)
+ TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7)
+ TAGKEYS(XK_9, 8)
- {MODKEY, XK_0, view, {.ui = ~0}},
+ {MODKEY, XK_0, view, {.ui = ~0}},
{MODKEY | ShiftMask, XK_0, tag, {.ui = ~0}},
{MODKEY, XK_minus, spawn,
SHCMD("pamixer --allow-boost -d 5; kill -44 $(pidof dwmblocks)")},
@@ -126,7 +134,7 @@ static Key keys[] = {
{MODKEY | ShiftMask, XK_equal, spawn,
SHCMD("pamixer --allow-boost -i 15; kill -44 $(pidof dwmblocks)")},
{MODKEY, XK_BackSpace, spawn, SHCMD("dmenushutdown")},
- /* { MODKEY|ShiftMask, XK_BackSpace, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_BackSpace, spawn, SHCMD("")
* },
*/
{MODKEY, XK_Tab, view, {0}},
@@ -142,8 +150,8 @@ static Key keys[] = {
{MODKEY, XK_w, spawn,
SHCMD("$TERMINAL -e google-chrome-stable --force-dark-mode "
"--enable-features=WebUIDarkMode")},
- /* { MODKEY|ShiftMask, XK_w, spawn, SHCMD(TERMINAL
- " -e dmenunetworks") }, */
+ /* { MODKEY|ShiftMask, XK_w, spawn,
+ SHCMD(TERMINAL " -e dmenunetworks") }, */
{MODKEY, XK_e, spawn,
SHCMD("$TERMINAL -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook")},
{MODKEY | ShiftMask, XK_e, spawn,
@@ -162,10 +170,12 @@ static Key keys[] = {
{MODKEY, XK_u, setlayout, {.v = &layouts[4]}},
{MODKEY | ShiftMask, XK_u, setlayout, {.v = &layouts[5]}},
{MODKEY, XK_i, spawn, SHCMD("$TERMINAL -e htop")},
- /* { MODKEY, XK_i, setlayout, {.v = &layouts[6]}
+ /* { MODKEY, XK_i, setlayout, {.v =
+ * &layouts[6]}
* },
*/
- /* { MODKEY|ShiftMask, XK_i, setlayout, {.v = &layouts[7]}
+ /* { MODKEY|ShiftMask, XK_i, setlayout, {.v =
+ * &layouts[7]}
* },
*/
{MODKEY, XK_o, incnmaster, {.i = +1}},
@@ -177,16 +187,17 @@ static Key keys[] = {
{MODKEY, XK_bracketright, spawn, SHCMD("mpc seek +10")},
{MODKEY | ShiftMask, XK_bracketright, spawn, SHCMD("mpc seek +120")},
{MODKEY, XK_backslash, view, {0}},
- /* { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_backslash, spawn,
+ * SHCMD("")
* },
*/
{MODKEY, XK_a, spawn,
SHCMD("$TERMINAL -e pulsemixer; kill -44 $(pidof dwmblocks)")},
- /* { MODKEY|ShiftMask, XK_a, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_a, spawn, SHCMD("")
* },
*/
{MODKEY, XK_s, togglesticky, {0}},
- /* { MODKEY|ShiftMask, XK_s, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_s, spawn, SHCMD("")
* },
*/
{MODKEY, XK_d, spawn, {.v = dmenucmd}},
@@ -194,7 +205,7 @@ static Key keys[] = {
{MODKEY, XK_f, togglefullscr, {0}},
{MODKEY | ShiftMask, XK_f, setlayout, {.v = &layouts[8]}},
{MODKEY, XK_g, shiftview, {.i = -1}},
- /* { MODKEY|ShiftMask, XK_g, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_g, spawn, SHCMD("")
* },
*/
{MODKEY, XK_h, setmfact, {.f = -0.05}},
@@ -203,26 +214,28 @@ static Key keys[] = {
{MODKEY | ShiftMask, XK_l, spawn,
SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv")},
{MODKEY, XK_semicolon, shiftview, {.i = 1}},
- /* { MODKEY|ShiftMask, XK_semicolon, shiftview, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_semicolon, shiftview,
+ * SHCMD("")
* },
*/
- /* { MODKEY, XK_apostrophe, spawn, SHCMD("")
+ /* { MODKEY, XK_apostrophe, spawn, SHCMD("")
* },
*/
- /* { MODKEY|ShiftMask, XK_apostrophe, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_apostrophe, spawn, SHCMD("")
* },
*/
{MODKEY, XK_Return, spawn, {.v = termcmd}},
{MODKEY | ShiftMask, XK_Return, togglescratch, {.v = scratchpadcmd}},
{MODKEY, XK_z, incrgaps, {.i = +1}},
{MODKEY | ShiftMask, XK_z, incrgaps, {.i = -1}},
- /* { MODKEY, XK_x, spawn, SHCMD("")
+ /* { MODKEY, XK_x, spawn, SHCMD("")
* },
*/
- /* { MODKEY|ShiftMask, XK_x, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_x, spawn, SHCMD("")
* },
*/
- /* { MODKEY, XK_c, spawn, SHCMD("$TERMINAL -e bc -l")
+ /* { MODKEY, XK_c, spawn, SHCMD("$TERMINAL -e
+ * bc -l")
* },
*/
{MODKEY | ShiftMask, XK_c, spawn,
@@ -233,13 +246,13 @@ static Key keys[] = {
{MODKEY | ShiftMask, XK_v, spawn,
SHCMD("$TERMINAL -e $EDITOR $VIMWIKI_HOME")},
{MODKEY, XK_b, togglebar, {0}},
- /* { MODKEY|ShiftMask, XK_b, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_b, spawn, SHCMD("")
* },
*/
{MODKEY, XK_n, spawn, SHCMD(TERMINAL " -e lfrun")},
{MODKEY | ShiftMask, XK_n, spawn,
SHCMD(TERMINAL " -e newsboat; pkill -RTMIN+6 dwmblocks")},
- /* { MODKEY|ShiftMask, XK_n, spawn, SHCMD("")
+ /* { MODKEY|ShiftMask, XK_n, spawn, SHCMD("")
* },
*/
{MODKEY, XK_m, spawn, SHCMD("$TERMINAL -e ncmpcpp")},
@@ -258,10 +271,10 @@ static Key keys[] = {
{MODKEY, XK_Insert, spawn,
SHCMD("notify-send \"📋\" \"$(xclip -o -selection clipboard)\"")},
{MODKEY, XK_F1, spawn,
- SHCMD("groff -mom /usr/local/share/dwm/larbs.mom -Tpdf | zathura -")},
+ SHCMD("groff -mom /usr/local/share/dwm/help.mom -Tpdf | zathura -")},
{MODKEY, XK_F2, quit, {1}},
{MODKEY, XK_F3, spawn, SHCMD("displayselect")},
- /* { MODKEY, XK_F4, spawn, SHCMD("")
+ /* { MODKEY, XK_F4, spawn, SHCMD("")
* },
*/
{MODKEY, XK_F5, xrdb, {.v = NULL}},
@@ -270,10 +283,10 @@ static Key keys[] = {
{MODKEY, XK_F8, spawn, SHCMD("mailsync")},
{MODKEY, XK_F9, spawn, SHCMD("dmenumount")},
{MODKEY, XK_F10, spawn, SHCMD("dmenuumount")},
- /* { MODKEY, XK_F11, spawn, SHCMD("")
+ /* { MODKEY, XK_F11, spawn, SHCMD("")
* },
*/
- /* { MODKEY, XK_F12, spawn, SHCMD("")
+ /* { MODKEY, XK_F12, spawn, SHCMD("")
* },
*/
{MODKEY, XK_space, zoom, {0}},
@@ -298,15 +311,18 @@ static Key keys[] = {
/* { 0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10") }, */
/* { 0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10") },
*/
- /* { 0, XF86XK_AudioMedia, spawn, SHCMD("$TERMINAL -e ncmpcpp")
+ /* { 0, XF86XK_AudioMedia, spawn, SHCMD("$TERMINAL -e
+ * ncmpcpp")
* },
*/
- /* { 0, XF86XK_PowerOff, spawn, SHCMD("[ \"$(printf \"No\\nYes\"
+ /* { 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("$TERMINAL -e bc -l")
+ /* { 0, XF86XK_Calculator, spawn, SHCMD("$TERMINAL -e bc
+ * -l")
* },
*/
/* { 0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz") },
@@ -315,18 +331,21 @@ static Key keys[] = {
/* { 0, XF86XK_DOS, spawn, SHCMD("$TERMINAL") }, */
/* { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force
off; mpc pause; pauseallmpv") }, */
- /* { 0, XF86XK_TaskPane, spawn, SHCMD("$TERMINAL -e htop")
+ /* { 0, XF86XK_TaskPane, spawn, SHCMD("$TERMINAL -e
+ * htop")
* },
*/
- /* { 0, XF86XK_Mail, spawn, SHCMD("$TERMINAL -e neomutt ;
- * pkill
+ /* { 0, XF86XK_Mail, spawn, SHCMD("$TERMINAL -e
+ * neomutt ; pkill
*/
/* -RTMIN+12 dwmblocks") }, */
- /* { 0, XF86XK_MyComputer, spawn, SHCMD("$TERMINAL -e nnn /")
+ /* { 0, XF86XK_MyComputer, spawn, SHCMD("$TERMINAL -e nnn
+ * /")
* },
*/
/* { 0, XF86XK_Battery, spawn, SHCMD("") }, */
- /* { 0, XF86XK_Launch1, spawn, SHCMD("xset dpms force off")
+ /* { 0, XF86XK_Launch1, spawn, SHCMD("xset dpms force
+ * off")
* },
*/
/* { 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep
@@ -335,7 +354,8 @@ static Key keys[] = {
/* { 0, XF86XK_TouchpadOff, spawn, SHCMD("synclient TouchpadOff=1")
* },
*/
- /* { 0, XF86XK_TouchpadOn, spawn, SHCMD("synclient TouchpadOff=0")
+ /* { 0, XF86XK_TouchpadOn, spawn, SHCMD("synclient
+ * TouchpadOff=0")
* },
*/
{0, XF86XK_MonBrightnessUp, spawn, SHCMD("brillo -e -A 10")},
@@ -343,24 +363,20 @@ static Key keys[] = {
};
/* button definitions */
-/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
+/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
+ * ClkClientWin, or ClkRootWin */
static Button buttons[] = {
- /* click event mask button function argument / */
- {ClkLtSymbol, 0, Button1, setlayout, {0}},
- {ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}},
- {ClkWinTitle, 0, Button2, zoom, {0}},
- {ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1}},
- {ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2}},
- {ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3}},
- {ClkStatusText, 0, Button4, sigdwmblocks, {.i = 4}},
- {ClkStatusText, 0, Button5, sigdwmblocks, {.i = 5}},
- {ClkClientWin, MODKEY, Button1, movemouse, {0}},
- {ClkClientWin, MODKEY, Button2, togglefloating, {0}},
- {ClkClientWin, MODKEY, Button3, resizemouse, {0}},
- {ClkTagBar, 0, Button1, view, {0}},
- {ClkTagBar, 0, Button3, toggleview, {0}},
- {ClkTagBar, MODKEY, Button1, tag, {0}},
- {ClkTagBar, MODKEY, Button3, toggletag, {0}},
- {ClkTagBar, 0, Button4, shiftview, {.i = -1}},
- {ClkTagBar, 0, Button5, shiftview, {.i = 1}},
+ /* click event mask button function argument / */
+ {ClkLtSymbol, 0, Button1, setlayout, {0}},
+ {ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}},
+ {ClkWinTitle, 0, Button2, zoom, {0}},
+ {ClkClientWin, MODKEY, Button1, movemouse, {0}},
+ {ClkClientWin, MODKEY, Button2, togglefloating, {0}},
+ {ClkClientWin, MODKEY, Button3, resizemouse, {0}},
+ {ClkTagBar, 0, Button1, view, {0}},
+ {ClkTagBar, 0, Button3, toggleview, {0}},
+ {ClkTagBar, MODKEY, Button1, tag, {0}},
+ {ClkTagBar, MODKEY, Button3, toggletag, {0}},
+ {ClkTagBar, 0, Button4, shiftview, {.i = -1}},
+ {ClkTagBar, 0, Button5, shiftview, {.i = 1}},
};
diff --git a/dwm.c b/dwm.c
@@ -237,7 +237,6 @@ static void focus(Client *c);
static void focusin(XEvent *e);
static void focusmon(const Arg *arg);
static void focusstack(const Arg *arg);
-static int getdwmblockspid();
static int getrootptr(int *x, int *y);
static long getstate(Window w);
static int gettextprop(Window w, Atom atom, char *text, unsigned int size);
@@ -277,7 +276,6 @@ static void setup(void);
static void seturgent(Client *c, int urg);
static void showhide(Client *c);
static void sigchld(int unused);
-static void sigdwmblocks(const Arg *arg);
static void sighup(int unused);
static void sigterm(int unused);
static void spawn(const Arg *arg);
@@ -323,8 +321,6 @@ static pid_t winpid(Window w);
static const char broken[] = "broken";
static char stext[256];
static char rawstext[256];
-static int dwmblockssig;
-pid_t dwmblockspid = 0;
static int screen;
static int sw, sh; /* X display screen geometry width, height */
static int bh, blw = 0; /* bar geometry */
@@ -571,7 +567,6 @@ void buttonpress(XEvent *e) {
char *text = rawstext;
int i = -1;
char ch;
- dwmblockssig = 0;
while (text[++i]) {
if ((unsigned char)text[i] < ' ') {
ch = text[i];
@@ -582,7 +577,6 @@ void buttonpress(XEvent *e) {
i = -1;
if (x >= ev->x)
break;
- dwmblockssig = ch;
}
}
} else
@@ -995,16 +989,6 @@ Atom getatomprop(Client *c, Atom prop) {
return atom;
}
-int getdwmblockspid() {
- char buf[16];
- FILE *fp = popen("pidof -s dwmblocks", "r");
- fgets(buf, sizeof(buf), fp);
- pid_t pid = strtoul(buf, NULL, 10);
- pclose(fp);
- dwmblockspid = pid;
- return pid != 0 ? 0 : -1;
-}
-
int getrootptr(int *x, int *y) {
int di;
unsigned int dui;
@@ -1550,9 +1534,7 @@ void run(void) {
handler[ev.type](&ev); /* call handler */
}
-void runAutostart(void) {
- /* system("killall dwmblocks 2>/dev/null ; dwmblocks &"); */
-}
+void runAutostart(void) { system("killall slstatus 2>/dev/null ; slstatus &"); }
void scan(void) {
unsigned int i, num;
@@ -1837,21 +1819,6 @@ void sigterm(int unused) {
quit(&a);
}
-void sigdwmblocks(const Arg *arg) {
- union sigval sv;
- sv.sival_int = 0 | (dwmblockssig << 8) | arg->i;
- if (!dwmblockspid)
- if (getdwmblockspid() == -1)
- return;
-
- if (sigqueue(dwmblockspid, SIGUSR1, sv) == -1) {
- if (errno == ESRCH) {
- if (!getdwmblockspid())
- sigqueue(dwmblockspid, SIGUSR1, sv);
- }
- }
-}
-
void spawn(const Arg *arg) {
if (arg->v == dmenucmd)
dmenumon[0] = '0' + selmon->num;
diff --git a/larbs.mom b/help.mom