summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-04-06 20:47:29 -0700
committerLuke Smith <luke@lukesmith.xyz>2018-04-06 20:47:29 -0700
commitc69028fa0db2b95b298a4c483c877f362a914a95 (patch)
tree80efb8b82d16aafb8d42fc14cb938dc5579c6200
parent4dc4e439a1961cc2b682775babf72830914c7770 (diff)
downloadeibhear-c69028fa0db2b95b298a4c483c877f362a914a95.tar.gz
eibhear-c69028fa0db2b95b298a4c483c877f362a914a95.tar.zst
eibhear-c69028fa0db2b95b298a4c483c877f362a914a95.zip
prompt clarification
-rw-r--r--.config/i3/config10
-rwxr-xr-x.scripts/prompt7
2 files changed, 11 insertions, 6 deletions
diff --git a/.config/i3/config b/.config/i3/config
index b31faa4..8bfcae3 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 prompt "Are you sure you want to leave i3?" 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 prompt "Are you sure you want to reboot?" $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 dmenu
+bindsym $mod+d exec dmenu_run
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 prompt "Are you sure you want to shutdown?" $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 prompt "Are you sure you want to shutdown?" $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/.scripts/prompt b/.scripts/prompt
index f210986..0a2aba9 100755
--- a/.scripts/prompt
+++ b/.scripts/prompt
@@ -1,3 +1,8 @@
#!/bin/sh
+# A dmenu binary prompt script.
+# Gives a dmenu prompt labeled with $1 to perform command $2.
+# For example:
+# `./prompt "Do you want to shutdown?" "shutdown -h now"`
+
[ $(echo -e "No\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray -fn mono) \
-== "Yes" ] && "$@:2"
+== "Yes" ] && $2