summaryrefslogtreecommitdiff
path: root/bin/menuscripts
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-01-05 19:49:12 +0100
committerRaymaekers Luca <luca@spacehb.net>2025-01-05 19:49:12 +0100
commita7309ce61c093caeb554c20497f4e4b765073203 (patch)
tree6e7c9e559253f0f0584175c582624eec29a0d5cb /bin/menuscripts
parent58bf86c706c5a442da4fb01ea26e06f1ed291d45 (diff)
parent112449dd19eaae6769ef95a70b3e52234256400c (diff)
checkpoint
Diffstat (limited to 'bin/menuscripts')
-rwxr-xr-xbin/menuscripts/keyadd4
-rwxr-xr-xbin/menuscripts/memoji2
-rwxr-xr-xbin/menuscripts/mpass2
-rwxr-xr-xbin/menuscripts/mpotp2
-rwxr-xr-xbin/menuscripts/mpower9
-rwxr-xr-xbin/menuscripts/shdul.sh2
6 files changed, 13 insertions, 8 deletions
diff --git a/bin/menuscripts/keyadd b/bin/menuscripts/keyadd
index 4e7949f..5a38bfb 100755
--- a/bin/menuscripts/keyadd
+++ b/bin/menuscripts/keyadd
@@ -2,7 +2,7 @@
log()
{
- notify-send -t 1000 "keyadd" "$1" &
+ herbe "keyadd" "$1" &
>&2 printf '%s\n' "$1"
}
@@ -55,7 +55,7 @@ then
exit 1
fi
-HOST=$(hostnamectl hostname)
+HOST="$(hostname)"
export PASSWORD="keys/$HOST/ssh/$key_pretty"
export SSH_ASKPASS="sshpass"
ssh-add -q - < "$key" &&
diff --git a/bin/menuscripts/memoji b/bin/menuscripts/memoji
index 5766238..0b3965d 100755
--- a/bin/menuscripts/memoji
+++ b/bin/menuscripts/memoji
@@ -13,7 +13,7 @@ case "$1" in
input=$(tee | cut -f 1 -d ' ')
if [ "$input" ]
then
- notify-send "dmemoji" "$input <b>copied!</b>"
+ herbe "_dmemoji" "*$input copied!"
printf "%s" "$input" | clipp
fi
;;
diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass
index 5dc2289..5a09623 100755
--- a/bin/menuscripts/mpass
+++ b/bin/menuscripts/mpass
@@ -22,7 +22,7 @@ done
[ "$file" ] || exit 1
pass show -c "$file" || exit 1
-notify-send -t 1000 "mpass" "$file"
+herbe "_mpass" "*$file"
[ "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null && # on wayland and cliphist is running
cliphist list | head -n 1 | cliphist delete
diff --git a/bin/menuscripts/mpotp b/bin/menuscripts/mpotp
index 2be6186..8ffb468 100755
--- a/bin/menuscripts/mpotp
+++ b/bin/menuscripts/mpotp
@@ -4,4 +4,4 @@ pass="$(find "$PASSWORD_STORE_DIR"/keys/otp -iname "*.gpg" |
dmenu -c)"
[ "$pass" ] || exit 1
pass otp -c keys/otp/"$pass"
-notify-send -t 1000 "mpass" "copied $pass"
+herbe "_mpotp" "copied $pass"
diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower
index 51b8e1d..b4b8640 100755
--- a/bin/menuscripts/mpower
+++ b/bin/menuscripts/mpower
@@ -9,5 +9,10 @@ hibernate
EOF
)"
-[ "$choice" = "firmware" ] && systemctl reboot --firmware-setup
-[ "$choice" ] && systemctl "$choice"
+case "$choice" in
+ "suspend") doas /usr/sbin/zzz ;;
+ "poweroff") doas /usr/sbin/poweroff ;;
+ "reboot"|"firmware") doas /usr/sbin/reboot ;;
+ "") exit 1 ;;
+ *) ;;
+esac
diff --git a/bin/menuscripts/shdul.sh b/bin/menuscripts/shdul.sh
index 4e1d744..8c059b9 100755
--- a/bin/menuscripts/shdul.sh
+++ b/bin/menuscripts/shdul.sh
@@ -113,7 +113,7 @@ view_schedule()
then
print_schedule "$1" "$2"
prev_now="$now"
- notify-send -u critical -t 5000 "shdul" "$(awk "NR==$((now-1)) {print \$2}" "$1")"
+ herbe "_shdul" "$(awk "NR==$((now-1)) {print \$2}" "$1")"
# Align with clock
sleep "$((60-$(date +%-S)))s"