aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local')
-rwxr-xr-xdotfiles/.local/bin/lock-color4
-rwxr-xr-xdotfiles/.local/bin/mailsync3
2 files changed, 5 insertions, 2 deletions
diff --git a/dotfiles/.local/bin/lock-color b/dotfiles/.local/bin/lock-color
index c43fc15..0026842 100755
--- a/dotfiles/.local/bin/lock-color
+++ b/dotfiles/.local/bin/lock-color
@@ -2,9 +2,9 @@
swaymsg input type:keyboard xkb_switch_layout 0
-swayidle timeout 30 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
+gpg-connect-agent --no-autostart reloadagent /bye
+swayidle timeout 30 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
swaylock
pkill -n swayidle
-
diff --git a/dotfiles/.local/bin/mailsync b/dotfiles/.local/bin/mailsync
index 2a5ed03..431d314 100755
--- a/dotfiles/.local/bin/mailsync
+++ b/dotfiles/.local/bin/mailsync
@@ -4,6 +4,9 @@
# Run only if user logged in (prevent cron errors)
w | grep "^$USER\W" >/dev/null || exit
+# Don't run if screen is locked (gpg key is locked too)
+pidof swaylock && exit
+
# Check several times before giving up, useful when just waking up from sleep
# since internet is usually not available right away
wget -q --tries=3 --timeout=20 --spider 1.1.1.1 > /dev/null || exit