From b490fe4bea23a89d85509403c9e5a86f2c16173e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Wed, 30 Oct 2024 17:38:56 +0300 Subject: trying out niri --- dotfiles/.local/bin/lock-color | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'dotfiles/.local/bin/lock-color') 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 -- cgit v1.2.3