suspend might come in useful

This commit is contained in:
Rick van Lieshout 2018-07-02 22:42:48 +02:00
parent 90855d3f7e
commit 9fd93cd929
2 changed files with 12 additions and 0 deletions

View File

@ -106,6 +106,9 @@ bindsym $mod+r mode "resize"
# Lock the computer
bindsym $mod+l exec /bin/bash ~/.config/i3/scripts/i3lock.sh
# Lock the computer
bindsym $mod+shift+l exec /bin/bash ~/.config/i3/scripts/suspend.sh
############################################
# Application Keys #
############################################

9
i3/scripts/suspend.sh Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# check if locked
if !(pgrep -x "i3lock" > /dev/null)
then
bash ~/.config/i3/scripts/i3lock.sh
fi
systemctl suspend