From ff007bd8b5d91b163d810136d0e92c77a1462163 Mon Sep 17 00:00:00 2001 From: Matteo Bini Date: Wed, 13 Oct 2021 17:09:06 +0200 Subject: [PATCH] Reboot command --- config.def.h | 2 ++ dwm.1 | 3 +++ 2 files changed, 5 insertions(+) diff --git a/config.def.h b/config.def.h index 7054c06..7c76bbc 100644 --- a/config.def.h +++ b/config.def.h @@ -55,6 +55,7 @@ static const Layout layouts[] = { /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; +static const char *rebootcmd[] = { "sudo", "shutdown", "-r", "+0", NULL }; static const char *termcmd[] = { "st", NULL }; static Key keys[] = { @@ -92,6 +93,7 @@ static Key keys[] = { TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, + { MODKEY|ShiftMask, XK_Delete, spawn, {.v = rebootcmd} }, }; /* button definitions */ diff --git a/dwm.1 b/dwm.1 index 6687011..4356242 100644 --- a/dwm.1 +++ b/dwm.1 @@ -136,6 +136,9 @@ Add/remove all windows with nth tag to/from the view. .TP .B Mod1\-Shift\-q Quit dwm. +.TP +.B Mod1\-Shift\-Delete +Reboot (sudo shutdown -r +0). .SS Mouse commands .TP .B Mod1\-Button1 -- 2.30.2