From 9d04c499021086d39546889f685de3b8f3aaf4c7 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 27 Oct 2024 23:12:54 +0800 Subject: feat(hyprshot): show preview in notification --- hyprshot | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hyprshot b/hyprshot index 623eecf..fe66073 100755 --- a/hyprshot +++ b/hyprshot @@ -13,12 +13,15 @@ fi trap notify EXIT notify () { - notify_cmd_shot='notify-send -u low -h string:x-dunst-stack-tag:obscreenshot -i /usr/share/archcraft/icons/dunst/picture.png' + notify_cmd_shot="notify-send -u low -i $dir/$file" + echo $notify_cmd_shot pngcheck ${dir}/"$file" > /dev/null if [[ -e "$dir/$file" ]]; then - ${notify_cmd_shot} "Screenshot Saved." + ${notify_cmd_shot} "Screenshot Saved." "Screenshot saved in '$dir/$file'" + echo $notify_cmd_shot "Screenshot Saved." "Screenshot saved in '$dir/$file'" else - ${notify_cmd_shot} "Screenshot Canceled." + # ${notify_cmd_shot} "Screenshot Canceled." + exit fi } -- cgit v1.2.3