diff --git a/home-manager/dotfiles/sway/scripts/screen_and_copy.sh b/home-manager/dotfiles/sway/scripts/screen_and_copy.sh index 95b05ec..7aecdc5 100755 --- a/home-manager/dotfiles/sway/scripts/screen_and_copy.sh +++ b/home-manager/dotfiles/sway/scripts/screen_and_copy.sh @@ -4,4 +4,10 @@ elif [ "$1" = "output" ]; then SCREENPATH=$(grimshot save output) fi -cat $SCREENPATH | wl-copy -t image/png +if [[ -f "$SCREENPATH" ]]; then + cat "$SCREENPATH" | wl-copy -t image/png + echo "Screenshot copied to clipboard :3" +else + echo "oh noes it failed... no file at $SCREENPATH" + exit 1 +fi