summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-10-27 23:12:54 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-10-27 23:12:54 +0800
commit9d04c499021086d39546889f685de3b8f3aaf4c7 (patch)
tree289ad77c2e2ef22d8e93634d7de4fbec8368be25
parentb6be114ccc705df951d62dba50dcf17664ef2f03 (diff)
feat(hyprshot): show preview in notification
-rwxr-xr-xhyprshot9
1 files 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 <i>'$dir/$file'</i>"
+ echo $notify_cmd_shot "Screenshot Saved." "Screenshot saved in <i>'$dir/$file'</i>"
else
- ${notify_cmd_shot} "Screenshot Canceled."
+ # ${notify_cmd_shot} "Screenshot Canceled."
+ exit
fi
}