From 02143b432378b7babc1562a63e5581c097536bb8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 25 Nov 2016 10:29:05 +1100 Subject: [PATCH] Scrot: Add a warning when the scrot directory doesn't exist --- neofetch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 555bbcd8..c852c1fc 100755 --- a/neofetch +++ b/neofetch @@ -2258,7 +2258,12 @@ to_off() { # SCREENSHOT take_scrot() { - $scrot_cmd "${scrot_dir}${scrot_name}" + if [[ -d "$scrot_dir" ]]; then + $scrot_cmd "${scrot_dir}${scrot_name}" + else + printf "%s\n" "Screenshot: $scrot_dir doesn't exist. Edit the config file or create the directory to take screenshots." + fi + [[ "$scrot_upload" == "on" ]] && scrot_upload }