aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-11-22 00:26:40 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-11-22 00:26:40 +0100
commitdaad6ac8f1238a3111a05d8b2d70f31e1a70da03 (patch)
tree1f139405c6e8673eea727df5d5bc45dc482a1745
parent51014d8ea8442e2e5cfb8e27b75bd7b7a3c70d18 (diff)
downloaddotfiles-daad6ac8f1238a3111a05d8b2d70f31e1a70da03.tar.gz
new i3 exit prompt
-rw-r--r--i3/config14
-rwxr-xr-xscripts/rofi-exit-menu.sh29
-rwxr-xr-xxinitrc.d/10-screensaver.sh3
3 files changed, 38 insertions, 8 deletions
diff --git a/i3/config b/i3/config
index 066eb2d..fdbed8d 100644
--- a/i3/config
+++ b/i3/config
@@ -14,7 +14,7 @@ bindsym $mod+Shift+Return exec "termite -t termite_floating"
bindsym $mod+o exec "termite -e ranger"
#start browser
-bindsym $mod+b exec "brave"
+bindsym $mod+b exec "firefox"
# kill focused window
bindsym $mod+Shift+q kill
@@ -36,6 +36,11 @@ bindsym $mod+minus [class="KeePassXC"] scratchpad show
# notifications
bindsym $mod+n exec "kill -s USR1 $(pidof deadd-notification-center)"
+bindsym $mod+Shift+c reload
+bindsym $mod+Shift+r restart
+
+bindsym $mod+Shift+e exec "rofi -show fb -modi fb:rofi-exit-menu.sh"
+
# Applications
for_window [class="KeePassXC" title="^.*KeePassXC$"] move scratchpad
@@ -133,13 +138,6 @@ bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
-# reload the configuration file
-bindsym $mod+Shift+c reload
-# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
-bindsym $mod+Shift+r restart
-# exit i3 (logs you out of your X session)
-#bindsym $mod+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'"
-bindsym $mod+Shift+e exec $(printf "shutdown now\nreboot\ni3-msg exit\nkillall compton" | rofi -dmenu -mesg "Exit?")
# resize window (you can also use the mouse for that)
mode "resize" {
diff --git a/scripts/rofi-exit-menu.sh b/scripts/rofi-exit-menu.sh
new file mode 100755
index 0000000..57ce492
--- /dev/null
+++ b/scripts/rofi-exit-menu.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+function options() {
+ cat << EOF
+supspend
+shutdown
+reboot
+Xit
+EOF
+}
+
+if [ $# -gt 0 ]; then
+ case "$@" in
+ suspend)
+ systemctl suspend;;
+ shutdown)
+ systemctl shutdown;;
+ reboot)
+ systemctl reboot;;
+ "exit i3")
+ i3-msg exit;;
+ *)
+ options;;
+
+ esac
+else
+ options
+fi
+
diff --git a/xinitrc.d/10-screensaver.sh b/xinitrc.d/10-screensaver.sh
index 91c853e..28e6cd2 100755
--- a/xinitrc.d/10-screensaver.sh
+++ b/xinitrc.d/10-screensaver.sh
@@ -6,3 +6,6 @@ setterm -blank 0 -powerdown 0
# turn off black Screensaver
xset s off
+
+export XSECURELOCK_PASSWORD_PROMPT=kaomoji
+xss-lock -- xsecurelock &