dwm

suckless's window manager with Luke's setup
Log | Files | Refs | README | LICENSE

commit 535d682d1c45649a37b098311cf2c13d2f46592d
parent 6e374b24652bc9d697c4a88e410e0bbd8a0750b4
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Fri, 13 Mar 2020 09:31:15 -0400

prompt script now unnecessary

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

diff --git a/config.h b/config.h @@ -88,7 +88,7 @@ static Key keys[] = { /* modifier key function argument */ STACKKEYS(MODKEY, focus) STACKKEYS(MODKEY|ShiftMask, push) - { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("prompt \"Leave Xorg?\" \"killall Xorg\"") }, + { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Close Xorg?\")\" = Yes ] && killall Xorg") }, { MODKEY, XK_grave, spawn, SHCMD("dmenuunicode") }, /* { MODKEY|ShiftMask, XK_grave, togglescratch, SHCMD("") }, */ TAGKEYS( XK_1, 0) @@ -107,7 +107,7 @@ static Key keys[] = { { MODKEY, XK_equal, spawn, SHCMD("amixer sset Master 5%+ ; pkill -RTMIN+10 dwmblocks") }, { MODKEY|ShiftMask, XK_equal, spawn, SHCMD("amixer sset Master 15%+ ; pkill -RTMIN+10 dwmblocks") }, /* { MODKEY, XK_BackSpace, spawn, SHCMD("") }, */ - { MODKEY|ShiftMask, XK_BackSpace, spawn, SHCMD("prompt \"Reboot computer?\" \"sudo -A reboot\"") }, + { MODKEY|ShiftMask, XK_BackSpace, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Reboot computer?\")\" = Yes ] && sudo -A reboot") }, { MODKEY, XK_Tab, view, {0} }, /* { MODKEY|ShiftMask, XK_Tab, spawn, SHCMD("") }, */ @@ -161,7 +161,7 @@ static Key keys[] = { { MODKEY, XK_z, incrgaps, {.i = +1 } }, { MODKEY|ShiftMask, XK_z, incrgaps, {.i = -1 } }, { MODKEY, XK_x, spawn, SHCMD("slock & xset dpms force off; mpc pause ; pauseallmpv") }, - { MODKEY|ShiftMask, XK_x, spawn, SHCMD("prompt \"Shutdown computer?\" \"sudo -A shutdown -h now\"") }, + { MODKEY|ShiftMask, XK_x, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Shutdown computer?\")\" = Yes ] && sudo -A shutdown -h now") }, /* { MODKEY, XK_c, spawn, SHCMD("") }, */ { MODKEY|ShiftMask, XK_c, spawn, SHCMD("mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --title=mpvfloat /dev/video0") }, { MODKEY, XK_v, spawn, SHCMD("st -e $EDITOR -c \"VimwikiIndex\"") }, @@ -184,7 +184,7 @@ static Key keys[] = { { MODKEY, XK_F1, spawn, SHCMD("groff -mom $HOME/.local/share/larbs/readme.mom -Tpdf | zathura -") }, { MODKEY, XK_F2, quit, {0} }, { MODKEY, XK_F3, spawn, SHCMD("displayselect") }, - { MODKEY, XK_F4, spawn, SHCMD("prompt \"Hibernate computer?\" \"sudo -A zzz -Z\"") }, + { MODKEY, XK_F4, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Hibernate computer?\")\" = Yes ] && sudo -A zzz") }, { MODKEY, XK_F5, xrdb, {.v = NULL } }, { MODKEY, XK_F6, spawn, SHCMD("torwrap") }, { MODKEY, XK_F7, spawn, SHCMD("td-toggle") }, @@ -214,9 +214,9 @@ static Key keys[] = { { 0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10") }, { 0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10") }, { 0, XF86XK_AudioMedia, spawn, SHCMD("st -e ncmpcpp") }, - { 0, XF86XK_PowerOff, spawn, SHCMD("prompt \"Shutdown computer?\" \"sudo -A shutdown -h now\"") }, + { 0, XF86XK_PowerOff, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Shutdown computer?\")\" = Yes ] && sudo -A shutdown -h now") }, { 0, XF86XK_Calculator, spawn, SHCMD("st -e bc -l") }, - { 0, XF86XK_Sleep, spawn, SHCMD("prompt \"Hibernate computer?\" \"sudo -A zzz -Z\"") }, + { 0, XF86XK_Sleep, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Hibernate computer?\")\" = Yes ] && sudo -A zzz") }, { 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") }, { 0, XF86XK_DOS, spawn, SHCMD("st") }, { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },