diff --git a/.config/hypr/scripts/hyprshot b/.config/hypr/scripts/hyprshot index e29b66f8..03d20673 100755 --- a/.config/hypr/scripts/hyprshot +++ b/.config/hypr/scripts/hyprshot @@ -56,9 +56,12 @@ function send_notification() { local message=$([ $CLIPBOARD -eq 1 ] && echo "Image copied to the clipboard" || echo "Image saved in ${1} and copied to the clipboard.") - notify-send "Screenshot saved" \ + action=$(notify-send --action "View Image" "Screenshot saved" \ "${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() { diff --git a/.config/hypr/scripts/rofi/screenshots_selection b/.config/hypr/scripts/rofi/screenshots_selection index 5beabd6e..fe41db33 100755 --- a/.config/hypr/scripts/rofi/screenshots_selection +++ b/.config/hypr/scripts/rofi/screenshots_selection @@ -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) -swappy -f "$IMAGE_DIR/$SELECTION" +xdg-open "$IMAGE_DIR/$SELECTION"