From 4a8173cdf75facdbe016afe6f0a07aacea3cfef8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 22 Mar 2024 23:48:56 +0000 Subject: [PATCH] make screenshot.sh use the basename utility instead of some convuluted awk and echo mess --- screenshot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenshot.sh b/screenshot.sh index e9d5514..4e76d01 100755 --- a/screenshot.sh +++ b/screenshot.sh @@ -4,4 +4,4 @@ filepath="$HOME/media/images/screenshots/$(date +%Y-%m-%d\ %H:%M:%S).png" maim --select --hidecursor | tee "$filepath" | xclip -selection clipboard -target image/png # send notification with a thumbnail of the screenshot taken, the name of the script, and the filepath -notify-send --icon "$filepath" "$(echo "$0" | awk -F '/' '{print $NF}')" "Screenshot saved to: $filepath" +notify-send --icon "$filepath" "$(basename "$0")" "Screenshot saved to: $filepath"