mirror of
https://github.com/tiyn/dwm.git
synced 2025-10-19 14:21:19 +02:00
Compare commits
25 Commits
f6886c63dc
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
f58d147e39 | ||
|
35271b171c | ||
2d72ffe932 | |||
7458dff00f | |||
76e7f12b7d | |||
2b6678b993 | |||
3b66ee89b0 | |||
00aaef36c5 | |||
06edec0e26 | |||
d7971a2924 | |||
22b482d2c9 | |||
5fb1ba1806 | |||
09cd0a6931 | |||
58c2988f12 | |||
6255476d24 | |||
dd78bfd8a9 | |||
a46043c632 | |||
81d1901820 | |||
cdacc63d2c | |||
e38f510fc7 | |||
914f84af4d | |||
299cb5e508 | |||
002df98ae2 | |||
19a055a06e | |||
9026191666 |
22
README.md
22
README.md
@@ -21,7 +21,9 @@ The list below shows the currently applied patches to the master branch.
|
||||
- dwm-cyclelayouts-20180524-6.2.diff (adds ability to cycle through layouts)
|
||||
- dwm-deck-6.0.diff (adds deck layout)
|
||||
- dwm-noborder-6.2.diff (removes border if there is only one window)
|
||||
- dwm-notitle-6.2.diff (removes window title in the middle of the bar)
|
||||
- dwm-pertag-20170513-ceac8c9.diff (allows having a layout/mwfact/barpos/nmaster per tag)
|
||||
- dwm-quitprompt-20220718-6613d9f.diff (adds a confirmation prompt before exiting dwm)
|
||||
- dwm-status2d-6.2.diff (adds colors and ability to draw rectangles)
|
||||
- dwm-statusallmons-6.2.diff (display statusbar on every monitors)
|
||||
- dwm-statuscmd-6.2.diff (enables dwmblocks compatibility)
|
||||
@@ -39,11 +41,10 @@ build are the following.
|
||||
| Super | | j | (Tiling/Deck) Focus window lower in stack than current |
|
||||
| Super | | k | (Tiling/Deck) Focus window higher in stack than current |
|
||||
| Super | | l | (Tiling/Deck) Focus window lower in stack than current |
|
||||
| Super | | 0 | Show all tags |
|
||||
| Super | | 1/2/.../9 | Show tag 1/2/.../9 |
|
||||
| Super | | 1/2/.../9/0 | Show tag 1/2/.../9/0 |
|
||||
| Super | | . | Show monitor lower in stack |
|
||||
| Super | | , | Show monitor higher in stack |
|
||||
| Super | Shift | Escape | Quit dwm |
|
||||
| Super | Shift | Escape | Quit dwm with call for confirmation |
|
||||
| Super | Shift | b | Toggle dwmbar |
|
||||
| Super | Shift | c | Enable deck(/card) layout |
|
||||
| Super | Shift | d | Toggle floating/tiled for selected window |
|
||||
@@ -58,7 +59,18 @@ build are the following.
|
||||
| Super | Shift | u | Enable bottomstack layout |
|
||||
| Super | Shift | v | Enable bottomstackhorizontal layout |
|
||||
| Super | Shift | z | (Tiling/Deck) Decrease master window size |
|
||||
| Super | Shift | 0 | Add current window to all tag |
|
||||
| Super | Shift | 1/2/.../9 | Add current window to tag 1/2/.../9 |
|
||||
| Super | Shift | 1/2/.../9/0 | Add current window to tag 1/2/.../9/0 |
|
||||
| Super | Shift | . | Add to monitor lower in stack |
|
||||
| Super | Shift | , | Add to monitor higher in stack |
|
||||
| Alt | | Tab | (Tiling/Deck) Focus window lower in stack than current |
|
||||
|
||||
## Installation
|
||||
|
||||
The following programs are required to be installed for full functionality.
|
||||
|
||||
- [dmenu](https://github.com/tiyn/dmenu)
|
||||
|
||||
The most basic way is to clone the repository and then invoke make.
|
||||
|
||||
- `git clone https://github.com/tiyn/dwm`
|
||||
- `make clean install`
|
||||
|
39
config.def.h
39
config.def.h
@@ -13,7 +13,6 @@ static const int showsystray = 1; /* 0 means no systray */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = { "monospace:size=10" };
|
||||
static const char dmenufont[] = "monospace:size=10";
|
||||
static const char normbgcolor[] = "#0e0f14";
|
||||
static const char normbordercolor[] = "#363b47";
|
||||
static const char normfgcolor[] = "#dfdfdf";
|
||||
@@ -36,15 +35,32 @@ static const unsigned int alphas[][3] = {
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "", "", "", "", "", "", "", "", "", "" };
|
||||
static const char *tags[] = { "", "", "", "", "", "", "", "", "", "" };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
*/
|
||||
/* class instance title tags mask iscentered isfloating monitor */
|
||||
{ NULL, "origin.exe", NULL, 0, 0, 1, -1 },
|
||||
/* class instance title tags center float mon */
|
||||
{ "firefox", 0, 0, 1 << 1, 0, 0, -1 },
|
||||
{ "zen", 0, 0, 1 << 1, 0, 0, -1 },
|
||||
{ "Lutris", 0, 0, 1 << 2, 0, 0, 0 },
|
||||
{ "zenity", 0, 0, 0, 0, 1, -1 },
|
||||
{ "steam", 0, 0, 1 << 2, 0, 0, 0 },
|
||||
{ "discord", 0, 0, 1 << 2, 0, 0, 1 },
|
||||
{ "TeamSpeak", 0, 0, 1 << 2, 0, 0, 1 },
|
||||
{ "Element", 0, 0, 1 << 2, 0, 0, 1 },
|
||||
{ "Signal", 0, 0, 1 << 4, 0, 0, 1 },
|
||||
{ "TelegramDesktop", 0, 0, 1 << 4, 0, 0, 1 },
|
||||
{ "threema-web", 0, 0, 1 << 4, 0, 0, 1 },
|
||||
{ "thunderbird", 0, 0, 1 << 4, 0, 0, 1 },
|
||||
{ "Sonixd", 0, 0, 1 << 8, 0, 0, 1 },
|
||||
{ "KeePassXC", 0, "Unlock Database - KeePassXC", 1 << 1, 0, 0, 0 },
|
||||
{ "KeePassXC", 0, 0, 1 << 9, 0, 0, 0 },
|
||||
{ "easyeffects", 0, 0, 1 << 9, 0, 0, 1 },
|
||||
{ "pavucontrol", 0, 0, 1 << 9, 0, 0, 1 },
|
||||
{ "Onboard", 0, 0, 0, 0, 1, 0 },
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
@@ -74,13 +90,9 @@ static const Layout layouts[] = {
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
#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", "-c", "-l", "20", NULL };
|
||||
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY|ShiftMask, XK_Escape, quit, {0} },
|
||||
{ MODKEY|ShiftMask, XK_Escape, quitprompt, {0} },
|
||||
{ MODKEY|ShiftMask, XK_b, togglebar, {0} },
|
||||
{ MODKEY|ShiftMask, XK_c, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY|ShiftMask, XK_d, togglefloating, {0} },
|
||||
@@ -105,9 +117,7 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1} },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1} },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1} },
|
||||
//{ MODKEY|ShiftMask, XK_o, incnmaster, {.i = +1} },
|
||||
//{ MODKEY|ShiftMask, XK_z, incnmaster, {.i = -1} },
|
||||
//{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ Mod1Mask, XK_Tab, focusstack, {.i = +1} },
|
||||
|
||||
TAGKEYS(XK_1, 0)
|
||||
TAGKEYS(XK_2, 1)
|
||||
@@ -122,13 +132,12 @@ static Key keys[] = {
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkClientWin, or ClkRootWin */
|
||||
static Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
{ ClkLtSymbol, 0, Button1, cyclelayout, {.i = +1} },
|
||||
{ ClkLtSymbol, 0, Button2, setlayout, {.v = &layouts[0]} },
|
||||
{ ClkLtSymbol, 0, Button2, focusstack, {.i = +1} },
|
||||
{ ClkLtSymbol, 0, Button3, cyclelayout, {.i = -1} },
|
||||
{ ClkWinTitle, 0, Button2, focusstack, {.i = +1} },
|
||||
{ ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} },
|
||||
{ ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} },
|
||||
{ ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3} },
|
||||
|
81
dwm-notitle-6.2.diff
Normal file
81
dwm-notitle-6.2.diff
Normal file
@@ -0,0 +1,81 @@
|
||||
From 969dbbc548f16da5d94630e3d54e9c96c5296520 Mon Sep 17 00:00:00 2001
|
||||
From: Ryan Kes <alrayyes@gmail.com>
|
||||
Date: Thu, 28 Mar 2019 14:36:07 +0100
|
||||
Subject: [PATCH] dwm-notitle-6.2
|
||||
|
||||
---
|
||||
config.def.h | 1 -
|
||||
dwm.c | 20 ++++----------------
|
||||
2 files changed, 4 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 1c0b587..19330cd 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -102,7 +102,6 @@ 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, Button2, spawn, {.v = termcmd } },
|
||||
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 4465af1..bcf5cb1 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -64,8 +64,8 @@ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
||||
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
|
||||
-enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
|
||||
- ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
|
||||
+enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkClientWin,
|
||||
+ ClkRootWin, ClkLast }; /* clicks */
|
||||
|
||||
typedef union {
|
||||
int i;
|
||||
@@ -439,10 +439,8 @@ buttonpress(XEvent *e)
|
||||
arg.ui = 1 << i;
|
||||
} else if (ev->x < x + blw)
|
||||
click = ClkLtSymbol;
|
||||
- else if (ev->x > selmon->ww - TEXTW(stext))
|
||||
- click = ClkStatusText;
|
||||
else
|
||||
- click = ClkWinTitle;
|
||||
+ click = ClkStatusText;
|
||||
} else if ((c = wintoclient(ev->window))) {
|
||||
focus(c);
|
||||
restack(selmon);
|
||||
@@ -729,15 +727,8 @@ drawbar(Monitor *m)
|
||||
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
|
||||
|
||||
if ((w = m->ww - sw - x) > bh) {
|
||||
- if (m->sel) {
|
||||
- drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
||||
- drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||
- if (m->sel->isfloating)
|
||||
- drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
|
||||
- } else {
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
drw_rect(drw, x, 0, w, bh, 1, 1);
|
||||
- }
|
||||
}
|
||||
drw_map(drw, m->barwin, 0, 0, m->ww, bh);
|
||||
}
|
||||
@@ -1235,11 +1226,8 @@ propertynotify(XEvent *e)
|
||||
drawbars();
|
||||
break;
|
||||
}
|
||||
- if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
|
||||
+ if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName])
|
||||
updatetitle(c);
|
||||
- if (c == c->mon->sel)
|
||||
- drawbar(c->mon);
|
||||
- }
|
||||
if (ev->atom == netatom[NetWMWindowType])
|
||||
updatewindowtype(c);
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
92
dwm-quitprompt-20220718-6613d9f.diff
Normal file
92
dwm-quitprompt-20220718-6613d9f.diff
Normal file
@@ -0,0 +1,92 @@
|
||||
From eb558048819ed916b272765e64e1ea795a85740e Mon Sep 17 00:00:00 2001
|
||||
From: Lerrrtaste <lerrrtaste@protonmail.com>
|
||||
Date: Mon, 18 Jul 2022 12:22:39 +0200
|
||||
Subject: [PATCH] This Patch replaces the default quit behavior with an dmenu
|
||||
prompt. Possible selections are (Quit DWM?) "yes", "no" and "restart". The
|
||||
additional confirmation can save your work from accidentally hitting the quit
|
||||
key by requiring two additional keystrokes (y/yes and RET). Additionally it
|
||||
allows for restarting / reloading dwm without ending the xsession and closing
|
||||
all open x windows. To abort press ESC or n/no and RET.
|
||||
|
||||
---
|
||||
config.def.h | 2 +-
|
||||
dwm.c | 30 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index a2ac963..9e3b394 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -94,7 +94,7 @@ static Key keys[] = {
|
||||
TAGKEYS( XK_7, 6)
|
||||
TAGKEYS( XK_8, 7)
|
||||
TAGKEYS( XK_9, 8)
|
||||
- { MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
+ { MODKEY|ShiftMask, XK_q, quitprompt, {0} },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 7c0f978..3761ba4 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -188,6 +188,7 @@ static Client *nexttiled(Client *c);
|
||||
static void pop(Client *c);
|
||||
static void propertynotify(XEvent *e);
|
||||
static void quit(const Arg *arg);
|
||||
+static void quitprompt(const Arg *arg);
|
||||
static Monitor *recttomon(int x, int y, int w, int h);
|
||||
static void resize(Client *c, int x, int y, int w, int h, int interact);
|
||||
static void resizeclient(Client *c, int x, int y, int w, int h);
|
||||
@@ -262,6 +263,7 @@ static void (*handler[LASTEvent]) (XEvent *) = {
|
||||
};
|
||||
static Atom wmatom[WMLast], netatom[NetLast];
|
||||
static int running = 1;
|
||||
+static int restart = 1;
|
||||
static Cur *cursor[CurLast];
|
||||
static Clr **scheme;
|
||||
static Display *dpy;
|
||||
@@ -1258,6 +1260,31 @@ quit(const Arg *arg)
|
||||
running = 0;
|
||||
}
|
||||
|
||||
+void
|
||||
+quitprompt(const Arg *arg)
|
||||
+{
|
||||
+ FILE *pp = popen("echo -e \"no\nrestart\nyes\" | dmenu -i -sb red -p \"Quit DWM?\"", "r");
|
||||
+ if(pp != NULL) {
|
||||
+ char buf[1024];
|
||||
+ if (fgets(buf, sizeof(buf), pp) == NULL) {
|
||||
+ fprintf(stderr, "Quitprompt: Error reading pipe!\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(buf, "yes\n") == 0) {
|
||||
+ pclose(pp);
|
||||
+ restart = 0;
|
||||
+ quit(NULL);
|
||||
+ } else if (strcmp(buf, "restart\n") == 0) {
|
||||
+ pclose(pp);
|
||||
+ restart = 1;
|
||||
+ quit(NULL);
|
||||
+ } else if (strcmp(buf, "no\n") == 0) {
|
||||
+ pclose(pp);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
Monitor *
|
||||
recttomon(int x, int y, int w, int h)
|
||||
{
|
||||
@@ -2155,5 +2182,8 @@ main(int argc, char *argv[])
|
||||
run();
|
||||
cleanup();
|
||||
XCloseDisplay(dpy);
|
||||
+ if (restart == 1) {
|
||||
+ execlp("dwm", "dwm", NULL);
|
||||
+ }
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
--
|
||||
2.36.0
|
||||
|
54
dwm.c
54
dwm.c
@@ -83,8 +83,8 @@ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
||||
enum { Manager, Xembed, XembedInfo, XLast }; /* Xembed atoms */
|
||||
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
|
||||
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
|
||||
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
|
||||
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkClientWin,
|
||||
ClkRootWin, ClkLast }; /* clicks */
|
||||
|
||||
typedef union {
|
||||
int i;
|
||||
@@ -222,6 +222,7 @@ static Client *nexttiled(Client *c);
|
||||
static void pop(Client *);
|
||||
static void propertynotify(XEvent *e);
|
||||
static void quit(const Arg *arg);
|
||||
static void quitprompt(const Arg *arg);
|
||||
static Monitor *recttomon(int x, int y, int w, int h);
|
||||
static void removesystrayicon(Client *i);
|
||||
static void resize(Client *c, int x, int y, int w, int h, int interact);
|
||||
@@ -314,6 +315,7 @@ static void (*handler[LASTEvent]) (XEvent *) = {
|
||||
};
|
||||
static Atom wmatom[WMLast], netatom[NetLast], xatom[XLast];
|
||||
static int running = 1;
|
||||
static int restart = 1;
|
||||
static Cur *cursor[CurLast];
|
||||
static Clr **scheme;
|
||||
static Display *dpy;
|
||||
@@ -527,7 +529,7 @@ buttonpress(XEvent *e)
|
||||
}
|
||||
}
|
||||
} else
|
||||
click = ClkWinTitle;
|
||||
click = ClkStatusText;
|
||||
} else if ((c = wintoclient(ev->window))) {
|
||||
focus(c);
|
||||
restack(selmon);
|
||||
@@ -1058,15 +1060,8 @@ drawbar(Monitor *m)
|
||||
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
|
||||
|
||||
if ((w = m->ww - sw - stw - x) > bh) {
|
||||
if (m->sel) {
|
||||
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
||||
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||
if (m->sel->isfloating)
|
||||
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
|
||||
} else {
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
drw_rect(drw, x, 0, w, bh, 1, 1);
|
||||
}
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
drw_rect(drw, x, 0, w, bh, 1, 1);
|
||||
}
|
||||
drw_map(drw, m->barwin, 0, 0, m->ww - stw, bh);
|
||||
}
|
||||
@@ -1617,11 +1612,8 @@ propertynotify(XEvent *e)
|
||||
drawbars();
|
||||
break;
|
||||
}
|
||||
if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
|
||||
if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName])
|
||||
updatetitle(c);
|
||||
if (c == c->mon->sel)
|
||||
drawbar(c->mon);
|
||||
}
|
||||
if (ev->atom == netatom[NetWMWindowType])
|
||||
updatewindowtype(c);
|
||||
}
|
||||
@@ -1633,6 +1625,31 @@ quit(const Arg *arg)
|
||||
running = 0;
|
||||
}
|
||||
|
||||
void
|
||||
quitprompt(const Arg *arg)
|
||||
{
|
||||
FILE *pp = popen("echo \"no\nrestart\nyes\" | dmenu -i -p \"Quit DWM?\"", "r");
|
||||
if(pp != NULL) {
|
||||
char buf[1024];
|
||||
if (fgets(buf, sizeof(buf), pp) == NULL) {
|
||||
fprintf(stderr, "Quitprompt: Error reading pipe!\n");
|
||||
return;
|
||||
}
|
||||
if (strcmp(buf, "yes\n") == 0) {
|
||||
pclose(pp);
|
||||
restart = 0;
|
||||
quit(NULL);
|
||||
} else if (strcmp(buf, "restart\n") == 0) {
|
||||
pclose(pp);
|
||||
restart = 1;
|
||||
quit(NULL);
|
||||
} else if (strcmp(buf, "no\n") == 0) {
|
||||
pclose(pp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Monitor *
|
||||
recttomon(int x, int y, int w, int h)
|
||||
{
|
||||
@@ -2101,8 +2118,6 @@ sigdwmblocks(const Arg *arg)
|
||||
void
|
||||
spawn(const Arg *arg)
|
||||
{
|
||||
if (arg->v == dmenucmd)
|
||||
dmenumon[0] = '0' + selmon->num;
|
||||
if (fork() == 0) {
|
||||
if (dpy)
|
||||
close(ConnectionNumber(dpy));
|
||||
@@ -2871,6 +2886,9 @@ main(int argc, char *argv[])
|
||||
run();
|
||||
cleanup();
|
||||
XCloseDisplay(dpy);
|
||||
if (restart == 1) {
|
||||
execlp("dwm", "dwm", NULL);
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user