From a6f1b997487bd9d94df5a6d228bffa5368b23185 Mon Sep 17 00:00:00 2001 From: Bruno Ribeiro Date: Wed, 1 Apr 2026 22:04:12 +0000 Subject: [PATCH 1/2] Create pictures dir if non existent --- bin/omarchy-cmd-screenshot | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-cmd-screenshot b/bin/omarchy-cmd-screenshot index 16060e91a2..bef9c80b0b 100755 --- a/bin/omarchy-cmd-screenshot +++ b/bin/omarchy-cmd-screenshot @@ -8,8 +8,12 @@ OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}" if [[ ! -d $OUTPUT_DIR ]]; then - notify-send "Screenshot directory does not exist: $OUTPUT_DIR" -u critical -t 3000 - exit 1 + if mkdir -p "$OUTPUT_DIR"; then + notify-send "Created screenshot directory: $OUTPUT_DIR" -u normal -t 2000 + else + notify-send "Failed to create screenshot directory: $OUTPUT_DIR" -u critical -t 3000 + exit 1 + fi fi pkill slurp && exit 0 From a40596443166b350e445e495369a51164ae45737 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 2 Apr 2026 11:43:26 +0200 Subject: [PATCH 2/2] Simplify Don't need to guard against mkdir failing --- bin/omarchy-cmd-screenshot | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bin/omarchy-cmd-screenshot b/bin/omarchy-cmd-screenshot index bef9c80b0b..f821c919f0 100755 --- a/bin/omarchy-cmd-screenshot +++ b/bin/omarchy-cmd-screenshot @@ -8,12 +8,7 @@ OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}" if [[ ! -d $OUTPUT_DIR ]]; then - if mkdir -p "$OUTPUT_DIR"; then - notify-send "Created screenshot directory: $OUTPUT_DIR" -u normal -t 2000 - else - notify-send "Failed to create screenshot directory: $OUTPUT_DIR" -u critical -t 3000 - exit 1 - fi + notify-send "Created screenshot directory: $OUTPUT_DIR" -u normal -t 2000 fi pkill slurp && exit 0