mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 04:09:23 +00:00
18 lines
544 B
Bash
Executable File
18 lines
544 B
Bash
Executable File
#!/bin/bash
|
|
|
|
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
|
|
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"
|
|
|
|
if [[ ! -d "$OUTPUT_DIR" ]]; then
|
|
notify-send "Screenshot directory does not exist: $OUTPUT_DIR" -u critical -t 3000
|
|
exit 1
|
|
fi
|
|
|
|
hyprshot -m ${1:-region} --raw |
|
|
satty --filename - \
|
|
--output-filename "$OUTPUT_DIR/screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png" \
|
|
--early-exit \
|
|
--actions-on-enter save-to-clipboard \
|
|
--save-after-copy \
|
|
--copy-command 'wl-copy'
|