summaryrefslogtreecommitdiff
path: root/x11-misc/myi3lock/files
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/myi3lock/files')
-rwxr-xr-xx11-misc/myi3lock/files/myi3lock18
1 files changed, 12 insertions, 6 deletions
diff --git a/x11-misc/myi3lock/files/myi3lock b/x11-misc/myi3lock/files/myi3lock
index b64abb2..ec0536d 100755
--- a/x11-misc/myi3lock/files/myi3lock
+++ b/x11-misc/myi3lock/files/myi3lock
@@ -1,11 +1,17 @@
#!/bin/sh
BACKS="/usr/share/backgrounds"
-# Set pidgin to offline
-purple-remote 'setstatus?status=offline'
-# Power off screen
-xset dpms force off
+if [ "$1" != "--login" ]; then
+ # Set pidgin to offline
+ purple-remote 'setstatus?status=offline'
+ # Power off screen
+ xset dpms force off
+fi
+
# Run lock
i3lock -n -c 000000 -i "$(shuf -n1 -e "$BACKS"/*)"
-# Set pidgin to available
-purple-remote 'setstatus?status=available'
+
+if [ "$1" != "--login" ]; then
+ # Set pidgin to available
+ purple-remote 'setstatus?status=available'
+fi