From e9cc14d5be2090a4272edc45f4c77c84dceb29d8 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 6 Feb 2023 02:19:52 +0100 Subject: Minor improvements. * bin/menu-pass: Simpler sanity checks * bin/zzz: I am overthinking --- bin/menu-pass | 8 ++------ bin/zzz | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/menu-pass b/bin/menu-pass index 74468d6..b79c19b 100755 --- a/bin/menu-pass +++ b/bin/menu-pass @@ -16,9 +16,5 @@ passfile=$(find -L "${PASSWORD_STORE_DIR}" \ | sed -e 's/.gpg$//' \ | bemenu -i -s -c -l 20 -W 0.2 -p '*') -if [ -z $passfile ] -then - exit 1 -else - pass show -c $passfile -fi +[ -z $passfile ] && exit 1 +pass show -c $passfile diff --git a/bin/zzz b/bin/zzz index 38f65d4..14d426a 100755 --- a/bin/zzz +++ b/bin/zzz @@ -41,7 +41,7 @@ test -w /sys/power/state || fail "sleep permission denied" ( flock -n 9 || fail "another instance of zzz is running" -printf "Zzzz... " +printf "Zzz... " for hook in /etc/zzz.d/suspend/*; do [ -x "$hook" ] && "$hook" @@ -60,5 +60,5 @@ for hook in /etc/zzz.d/resume/*; do [ -x "$hook" ] && "$hook" done -echo "yawn." +echo "... !" ) 9