clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix some screenrecording to open satty

sspaeti 74c80e9f 332baab2

+23 -13
+23 -13
hypr/.config/hypr/sspaeti/omarchy-cmd-screenshot-wrapper.sh
··· 1 1 #!/bin/bash 2 2 3 3 # Wrapper for omarchy-cmd-screenshot with post-processing 4 - # Calls the original omarchy script, then organizes screenshots into monthly folders 4 + # Calls the original omarchy script, then always opens Satty for editing 5 + # and organizes screenshots into monthly folders 5 6 6 - # Call the original omarchy-cmd-screenshot with all arguments passed through 7 - ~/.local/share/omarchy/bin/omarchy-cmd-screenshot "$@" 7 + [[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs 8 + OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}" 8 9 9 - # Post-processing: Auto-organize screenshots into year-month folders 10 - # Run in background to avoid blocking the screenshot workflow 11 - { 12 - sleep 0.5 # Wait for file to be fully written 13 - ~/.config/hypr/sspaeti/image-browser/auto-organize-screenshot.sh >/dev/null 2>&1 10 + # Record newest screenshot before taking a new one 11 + BEFORE=$(ls -t "$OUTPUT_DIR"/screenshot-*.png 2>/dev/null | head -1) 14 12 15 - # # Fast OCR indexing - only recent screenshots 16 - # if [[ -f "/home/sspaeti/.config/hypr/sspaeti/image-browser/screenshot-indexer-parallel.sh" ]]; then 17 - # "/home/sspaeti/.config/hypr/sspaeti/image-browser/screenshot-indexer-parallel.sh" --recent >/dev/null 2>&1 18 - # fi 19 - } & 13 + # Call the original omarchy-cmd-screenshot, suppressing its notification 14 + OMARCHY_SCREENSHOT_EDITOR=true ~/.local/share/omarchy/bin/omarchy-cmd-screenshot "$@" 15 + 16 + # Find the newly created screenshot 17 + AFTER=$(ls -t "$OUTPUT_DIR"/screenshot-*.png 2>/dev/null | head -1) 18 + 19 + # If a new screenshot was taken, open Satty 20 + if [[ -n "$AFTER" && "$AFTER" != "$BEFORE" ]]; then 21 + satty --filename "$AFTER" \ 22 + --output-filename "$AFTER" \ 23 + --actions-on-enter save-to-clipboard \ 24 + --save-after-copy \ 25 + --copy-command 'wl-copy' 26 + 27 + # Post-processing: Auto-organize screenshots into year-month folders 28 + ~/.config/hypr/sspaeti/image-browser/auto-organize-screenshot.sh >/dev/null 2>&1 & 29 + fi