✨ feat(hypr): add option to see image in the notification of hyprshot
This commit is contained in:
parent
8bff613ddd
commit
de149a729d
2 changed files with 6 additions and 3 deletions
|
@ -56,9 +56,12 @@ function send_notification() {
|
||||||
local message=$([ $CLIPBOARD -eq 1 ] &&
|
local message=$([ $CLIPBOARD -eq 1 ] &&
|
||||||
echo "Image copied to the clipboard" ||
|
echo "Image copied to the clipboard" ||
|
||||||
echo "Image saved in <i>${1}</i> and copied to the clipboard.")
|
echo "Image saved in <i>${1}</i> and copied to the clipboard.")
|
||||||
notify-send "Screenshot saved" \
|
action=$(notify-send --action "View Image" "Screenshot saved" \
|
||||||
"${message}" \
|
"${message}" \
|
||||||
-t "$NOTIF_TIMEOUT" -i "${1}" -a Hyprshot
|
-t "$NOTIF_TIMEOUT" -i "${1}" -a Hyprshot)
|
||||||
|
if [ -n "$action" ]; then
|
||||||
|
xdg-open "${1}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function trim() {
|
function trim() {
|
||||||
|
|
|
@ -4,4 +4,4 @@ IMAGE_DIR="$HOME/Imagenes/Capturas/PC"
|
||||||
|
|
||||||
SELECTION=$(find "$IMAGE_DIR" -type f -exec ls -t {} + | awk -F/ '{print $NF}' | rofi -dmenu)
|
SELECTION=$(find "$IMAGE_DIR" -type f -exec ls -t {} + | awk -F/ '{print $NF}' | rofi -dmenu)
|
||||||
|
|
||||||
swappy -f "$IMAGE_DIR/$SELECTION"
|
xdg-open "$IMAGE_DIR/$SELECTION"
|
||||||
|
|
Loading…
Add table
Reference in a new issue