summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-04-06 20:37:39 -0700
committerLuke Smith <luke@lukesmith.xyz>2018-04-06 20:37:39 -0700
commit4dc4e439a1961cc2b682775babf72830914c7770 (patch)
treef78483d3192d3d312680baf3d65074f5fc898915
parenta5ad0978966a735d79e6ee147901a257f3b11c59 (diff)
downloadeibhear-4dc4e439a1961cc2b682775babf72830914c7770.tar.gz
eibhear-4dc4e439a1961cc2b682775babf72830914c7770.tar.zst
eibhear-4dc4e439a1961cc2b682775babf72830914c7770.zip
shutdown/reboot confirm prompt added (dmenu)
-rw-r--r--.config/i3/config10
-rw-r--r--.config/i3/i3_guide.rmd6
-rwxr-xr-x.scripts/prompt3
3 files changed, 11 insertions, 8 deletions
diff --git a/.config/i3/config b/.config/i3/config
index 74fbaa5..b31faa4 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -139,10 +139,10 @@ bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+Escape workspace prev
-bindsym $mod+Shift+Escape exec i3-msg exit
+bindsym $mod+Shift+Escape exec prompt "Are you sure you want to leave i3?" i3-msg exit
# bindsym $mod+BackSpace
-bindsym $mod+Shift+BackSpace exec $reboot
+bindsym $mod+Shift+BackSpace exec prompt "Are you sure you want to reboot?" $reboot
# bindsym $mod+grave
##bindsym $mod+asciitilde
@@ -187,7 +187,7 @@ bindsym $mod+Shift+a exec $term -e ncpamixer
bindsym $mod+s gaps inner current plus 5
bindsym $mod+Shift+s gaps inner current minus 5
-bindsym $mod+d exec rofi -show run
+bindsym $mod+d exec dmenu
bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0
bindsym $mod+f fullscreen toggle
@@ -212,7 +212,7 @@ bindsym $mod+z gaps outer current plus 5
bindsym $mod+Shift+z gaps outer current minus 5
bindsym $mod+x exec --no-startup-id ~/.config/i3/lock.sh
-bindsym $mod+Shift+x exec $shutdown
+bindsym $mod+Shift+x exec prompt "Are you sure you want to shutdown?" $shutdown
bindsym $mod+c exec --no-startup-id camtoggle
#bindsym $mod+Shift+c
@@ -388,7 +388,7 @@ bindsym XF86Launch1 exec $stoprec & xset dpms force off
bindsym XF86AudioMute exec $mute
bindsym XF86AudioLowerVolume exec $dec
bindsym XF86AudioRaiseVolume exec $inc
-bindsym XF86PowerOff exec $shutdown
+bindsym XF86PowerOff exec prompt "Are you sure you want to shutdown?" $shutdown
##bindsym XF86Copy exec
##bindsym XF86Open exec
##bindsym XF86Paste exec
diff --git a/.config/i3/i3_guide.rmd b/.config/i3/i3_guide.rmd
index 869f6d4..c10d044 100644
--- a/.config/i3/i3_guide.rmd
+++ b/.config/i3/i3_guide.rmd
@@ -87,9 +87,9 @@ Be sure you play around with these. Be flexible with the basic commands and the
+ Mod+R -- ranger as root user
+ Mod+x -- i3lock (Enter password to return)
-+ Mod+X -- shutdown now (Be careful with this one!)
-+ Mod+Shift+Backspace -- reboot (And this one!)
-+ Mod+Shift+Escape -- exit i3 (And this one as well!)
++ Mod+X -- shutdown (will give a dmenu confirm prompt)
++ Mod+Shift+Backspace -- reboot (will give a dmenu confirm prompt)
++ Mod+Shift+Escape -- exit i3 (will give a dmenu confirm prompt)
+ Mod+F1 -- Shows this document
+ Mod+F2 -- Refresh i3
+ Mod+F3 -- arandr (For adding screens/HDMI/VGA connections)
diff --git a/.scripts/prompt b/.scripts/prompt
new file mode 100755
index 0000000..f210986
--- /dev/null
+++ b/.scripts/prompt
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ $(echo -e "No\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray -fn mono) \
+== "Yes" ] && "$@:2"