19 lines
568 B
Bash
Executable File
19 lines
568 B
Bash
Executable File
#!/bin/bash
|
|
###
|
|
### ~/.config/hypr/scripts/screenshot/screenshot_monitor.sh
|
|
###
|
|
|
|
time=$(date +%Y-%m-%d-%I-%M-%S)
|
|
geometry=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | "\(.width)x\(.height)"')
|
|
dir="$(xdg-user-dir PICTURES)/Screenshots"
|
|
file="Screenshot_${time}_${geometry}.png"
|
|
|
|
mkdir -p "$dir"
|
|
|
|
# Take screenshot of selected region using hyprshot
|
|
hyprshot -m output -o "$dir" -f "$file"
|
|
|
|
# Optional: open in swappy for annotation (since hyprshot doesn't pipe to swappy directly)
|
|
# if command -v swappy >/dev/null 2>&1; then
|
|
# swappy -f "$dir/$file"
|
|
# fi |