apply restartdwl patch
Kind of an ugly hack using a temporary file so I might take this out once I'm done iterating.master
parent
342850487a
commit
3e5024aced
|
|
@ -110,6 +110,8 @@ static const char *menucmd[] = { "bemenu-run", NULL };
|
|||
static const Key keys[] = {
|
||||
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
||||
/* modifier key function argument */
|
||||
|
||||
|
||||
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
|
||||
|
|
@ -142,7 +144,8 @@ static const Key keys[] = {
|
|||
TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
|
||||
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
|
||||
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, restartdwl, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT|WLR_MODIFIER_CTRL, XKB_KEY_Q, quit, {0} },
|
||||
|
||||
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
||||
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
|
||||
|
|
|
|||
10
dwl.c
10
dwl.c
|
|
@ -284,6 +284,7 @@ static void pointerfocus(Client *c, struct wlr_surface *surface,
|
|||
double sx, double sy, uint32_t time);
|
||||
static void printstatus(void);
|
||||
static void quit(const Arg *arg);
|
||||
static void restartdwl(const Arg *arg);
|
||||
static void rendermon(struct wl_listener *listener, void *data);
|
||||
static void requeststartdrag(struct wl_listener *listener, void *data);
|
||||
static void resize(Client *c, struct wlr_box geo, int interact);
|
||||
|
|
@ -1891,6 +1892,15 @@ quit(const Arg *arg)
|
|||
wl_display_terminate(dpy);
|
||||
}
|
||||
|
||||
void
|
||||
restartdwl(const Arg *arg)
|
||||
{
|
||||
FILE *fp;
|
||||
fp = fopen ("/tmp/restart_dwl", "w");
|
||||
fclose(fp);
|
||||
quit(0);
|
||||
}
|
||||
|
||||
void
|
||||
rendermon(struct wl_listener *listener, void *data)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue