From af4aff8ef2b0310ded320af641d0c0a5a470f540 Mon Sep 17 00:00:00 2001 From: ranomier Date: Fri, 20 Jun 2025 23:02:24 +0200 Subject: [PATCH] feat: try following xdg spec --- screenshot | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/screenshot b/screenshot index cb04e68..0573cb1 100755 --- a/screenshot +++ b/screenshot @@ -4,9 +4,16 @@ set -E -o pipefail shopt -s failglob export LC_ALL=C.UTF8 +PICTURES="$HOME" + +source /etc/xdg/user-dirs.defaults +source "$XDG_CONFIG_HOME/user-dirs.dirs" + +mkdir -p "$PICTURES" + grim -g "$(slurp -o -r -c '#ff0000ff')" - \ | satty \ --filename - \ --fullscreen \ --initial-tool "crop" \ - --output-filename "$HOME/Media/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png" + --output-filename "$PICTURES/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png"