From 8b6840e2ac194e7aa35a6dfaf1bd369685a90499 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 3 Oct 2019 18:59:50 +0200 Subject: [PATCH] [UPDATE][SCRIPT] Handle switch_user in i3exit Also switched from tabulation to spaces as indentation. --- scripts/i3exit | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/i3exit b/scripts/i3exit index 32c71ef..3f3d295 100755 --- a/scripts/i3exit +++ b/scripts/i3exit @@ -1,15 +1,15 @@ #!/bin/sh function lock() { - # Date and time parameters - x_pos=100 - y_pos=1040 - datetime_color=FFFFFF80 + # Date and time parameters + x_pos=100 + y_pos=1040 + datetime_color=FFFFFF80 - i3lock -i ~/Pictures/wallpapers/roundabout-blues.png --force-clock \ - --timepos="$x_pos:$y_pos" \ - --timecolor="$datetime_color" \ - --datecolor="$datetime_color" + i3lock -i ~/Pictures/wallpapers/roundabout-blues.png --force-clock \ + --timepos="$x_pos:$y_pos" \ + --timecolor="$datetime_color" \ + --datecolor="$datetime_color" } case "$1" in lock) @@ -18,6 +18,9 @@ case "$1" in logout) i3-msg exit ;; + switch_user) + dm-tool switch-to-greeter + ;; suspend) lock && systemctl suspend ;; @@ -31,7 +34,7 @@ case "$1" in systemctl poweroff ;; *) - echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}" + echo "Usage: $0 {lock|logout|switch_user|suspend|hibernate|reboot|shutdown}" exit 2 esac