From 960878d8d639eebea38a83b83ab64024caa407ac Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Sun, 26 Oct 2025 23:48:47 +0400 Subject: fix(shot): set the default directory and create if needed --- scripts/gui/shot | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/gui/shot b/scripts/gui/shot index 7404943..40be620 100755 --- a/scripts/gui/shot +++ b/scripts/gui/shot @@ -18,7 +18,7 @@ exit 0 check_program "scrot" -default_dir="${HOME}"/pics/screenshot +default_dir="${XDG_SCREENSHOT_DIR:-${HOME}/media/photo/screenshot}" s_flg="" while getopts "d:sh" option; do @@ -38,7 +38,10 @@ shift $((OPTIND - 1)) [ ${#} != 0 ] && invalid_use -[ -z "${input}" ] && input="${default_dir}" +if [ -z "${input}" ]; then + input="${default_dir}" + mkdir -p "${default_dir}" +fi outfile="${input}" -- cgit v1.2.3