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