dwm

[fork] dynamic window manager
Log | Files | Refs | README | LICENSE

commit bb180f67b859d2367c6eab000348d9f16c9ab274
parent 27628f828f6df61a35aee214ad05202264f7e224
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Mon,  2 Mar 2020 21:27:35 +0000

halt, reboot, general sys commands

Diffstat:
Mconfig.h | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/config.h b/config.h @@ -83,9 +83,19 @@ static const char *slock_mod[] = { "st", "-e", "slock_mod", "/tmp/mpv-socket", " static const char *cmon_[] = { "cmon", NULL }; static const char *maim_[] = { "main", ">", "tmp.png", NULL }; static const char *tmux_[] = { "st", "-e", "tmux", NULL }; +static const char *halt_[] = { "userinput", "\"Do you want to halt the system?\"", "\"sudo halt\"", NULL }; +static const char *reboot_[] = { "userinput", "\"Do you want to reboot the system?\"", "\"sudo reboot\"", NULL }; +static const char *suspend_[] = { "userinput", "\"Do you want to suspend the system?\"", "\"sudo zzz\"", NULL }; +static const char *hibernate_[] = { "userinput", "\"Do you want to hibernate the system?\"", "\"sudo ZZZ\"", NULL }; static Key keys[] = { /* modifier key function argument */ + /* Sys */ + { MODKEY, XK_Escape, spawn, {.v = suspend_ } }, + { MODKEY|ShiftMask, XK_Escape, spawn, {.v = hibernate_ } }, + { MODKEY|ControlMask, XK_Escape, spawn, {.v = halt_ } }, + { MODKEY|AltMask, XK_Escape, spawn, {.v = reboot_ } }, + /* Normal */ { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY|ShiftMask, XK_Return, zoom, {0} }, { MODKEY, XK_space, setlayout, {0} },