feat: prompt gpg password in workhours only

This commit is contained in:
Klesh Wong 2022-09-07 09:06:12 +08:00
parent 26bdbd472d
commit 6b6e1f76ee

View File

@ -30,4 +30,9 @@ fi
pactl set-source-volume @DEFAULT_SOURCE@ 100% 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