Add ability to reset with Super+Shift+r
This commit is contained in:
parent
39806edb91
commit
0854099eab
8
dwm.c
8
dwm.c
@ -268,8 +268,10 @@ static int xerror(Display *dpy, XErrorEvent *ee);
|
|||||||
static int xerrordummy(Display *dpy, XErrorEvent *ee);
|
static int xerrordummy(Display *dpy, XErrorEvent *ee);
|
||||||
static int xerrorstart(Display *dpy, XErrorEvent *ee);
|
static int xerrorstart(Display *dpy, XErrorEvent *ee);
|
||||||
static void zoom(const Arg *arg);
|
static void zoom(const Arg *arg);
|
||||||
|
static void restart(const Arg *arg);
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
|
static const char *exec_name;
|
||||||
static Systray *systray = NULL;
|
static Systray *systray = NULL;
|
||||||
static const char broken[] = "broken";
|
static const char broken[] = "broken";
|
||||||
static char stext[256];
|
static char stext[256];
|
||||||
@ -2551,9 +2553,15 @@ zoom(const Arg *arg)
|
|||||||
pop(c);
|
pop(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
restart(const Arg *arg) {
|
||||||
|
execlp(exec_name, exec_name, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
exec_name = argv[0];
|
||||||
if (argc == 2 && !strcmp("-v", argv[1]))
|
if (argc == 2 && !strcmp("-v", argv[1]))
|
||||||
die("dwm-"VERSION);
|
die("dwm-"VERSION);
|
||||||
else if (argc != 1)
|
else if (argc != 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user