diff options
-rwxr-xr-x | config/hyprland/hypr/screenshot.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config/hyprland/hypr/screenshot.sh b/config/hyprland/hypr/screenshot.sh index e571b5b..a205bf4 100755 --- a/config/hyprland/hypr/screenshot.sh +++ b/config/hyprland/hypr/screenshot.sh @@ -1,8 +1,8 @@ #!/bin/sh dir="$(xdg-user-dir PICTURES)" -test -d "$dir" && - dir="$HOME/pics" +dir="${dir:-$HOME/pics}/screenshots" +mkdir -p "$dir" case $1 in "-m") @@ -10,13 +10,13 @@ case $1 in actmon="$(hyprctl monitors -j | jq -r ".[] | select(.id == $actwin)" | jq -r '.name')" - grim -o "$actmon" "$dir/screenshots/$(date +%y%m%d_%H_%M_%S.png)" + grim -o "$actmon" "$dir/$(date +%y%m%d_%H_%M_%S)_mon.png" ;; "-f") - grim "$dir/screenshots/$(date +%y%m%d_%H_%M_%S.png)" + grim "$dir/$(date +%y%m%d_%H_%M_%S)_full.png" ;; "-s") - grim -g "$(slurp)" "$dir/screenshots/$(date +%y%m%d_%H_%M_%S.png)" + grim -g "$(slurp)" "$dir/$(date +%y%m%d_%H_%M_%S)_sel.png" ;; "-sc") grim -g "$(slurp)" - | wl-copy |