aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/lock-color
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2024-10-30 17:38:56 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2024-10-30 17:38:56 +0300
commitb490fe4bea23a89d85509403c9e5a86f2c16173e (patch)
treec63deb4401da98ba717fa17e7eb013f7edc4bb56 /dotfiles/.local/bin/lock-color
parentb21dc7fcd29a0bb5239c5fb07e8cf08720f3b5e2 (diff)
downloadswayrice-b490fe4bea23a89d85509403c9e5a86f2c16173e.tar.gz
swayrice-b490fe4bea23a89d85509403c9e5a86f2c16173e.zip
trying out niri
Diffstat (limited to 'dotfiles/.local/bin/lock-color')
-rwxr-xr-xdotfiles/.local/bin/lock-color12
1 files changed, 7 insertions, 5 deletions
diff --git a/dotfiles/.local/bin/lock-color b/dotfiles/.local/bin/lock-color
index 2187d44..0611c29 100755
--- a/dotfiles/.local/bin/lock-color
+++ b/dotfiles/.local/bin/lock-color
@@ -1,13 +1,15 @@
#!/bin/sh
-swaymsg input type:keyboard xkb_switch_layout 0
+if [ -n "$SWAYSOCK"]; then
+ swaymsg input type:keyboard xkb_switch_layout 0
-gpg-connect-agent --no-autostart reloadagent /bye
-
-if [ "$1" != "screenon" ]; then
- swayidle timeout 30 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
+ if [ "$1" != "screenon" ]; then
+ swayidle timeout 30 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
+ fi
fi
+gpg-connect-agent --no-autostart reloadagent /bye
+
canberra-gtk-play -i Oxygen-Window-All-Desktops-Not &
swaylock