summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-08-27 09:53:01 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-08-27 09:53:01 -0700
commit7342605ce796e7c6427a33807d80e06941517315 (patch)
treefadf1ec8a1559b96a32b988cc74f8b4f9e2794ba
parent462885ecf128f90fb9e89afa094fc950cf04a861 (diff)
downloaddotfiles-7342605ce796e7c6427a33807d80e06941517315.tar.gz
have i3 invoke xfce4-session-logout
-rw-r--r--.config/i3/config2
-rwxr-xr-xbin/i3-quit9
2 files changed, 10 insertions, 1 deletions
diff --git a/.config/i3/config b/.config/i3/config
index 561cbf53..b277107d 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -192,7 +192,7 @@ mode "Window management" {
# used to upgrade i3)
bindsym Shift+r restart, mode "default"
# exit i3 (logs you out of your X session)
- bindsym Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'", mode "default"
+ bindsym Shift+e exec i3-quit, mode "default"
bindsym g mode "Launch program"
diff --git a/bin/i3-quit b/bin/i3-quit
new file mode 100755
index 00000000..b9bd09f9
--- /dev/null
+++ b/bin/i3-quit
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$DESKTOP_SESSION" = "xfce" ]; then
+ xfce4-session-logout
+else
+ i3-nagbar -t warning \
+ -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' \
+ -b 'Yes, exit i3' 'i3-msg exit'
+fi