From 6b6e1f76eedfb1a552217851f776c8274c137dbe Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Wed, 7 Sep 2022 09:06:12 +0800 Subject: [PATCH] feat: prompt gpg password in workhours only --- gui/awesome/autostart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/awesome/autostart b/gui/awesome/autostart index 4e0177c..ee1d984 100755 --- a/gui/awesome/autostart +++ b/gui/awesome/autostart @@ -30,4 +30,9 @@ fi pactl set-source-volume @DEFAULT_SOURCE@ 100% -DOW=$(date +%u); [ "$DOW" -ge 1 ] && [ "$DOW" -le 5 ] && gpg -d "$(ls ~/.password-store/*.gpg | head -n 1)" > /dev/null +DOW=$(date +%u) +HOD=$(date +%k) +[ "$DOW" -ge 1 ] && [ "$DOW" -le 5 ] \ + && [ "$HOD" -ge 8 ] && [ "$HOD" -le 20 ] \ + && gpg -d "$(ls ~/.password-store/*.gpg | head -n 1)" > /dev/null +