From 2eccb548e8850f8a46adf0316529ff8413bcaf20 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 30 Apr 2023 15:17:43 +0200 Subject: fixed screenshots not working because missing folder --- config/hyprland/hypr/screenshot.sh | 10 +++++----- 1 file 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 -- cgit v1.2.3