nix-config/home-manager/dotfiles/sway/scripts/screen_and_copy.sh
2025-03-23 17:39:23 +01:00

13 lines
324 B
Bash
Executable file

if [[ "$1" = "area" ]]; then
SCREENPATH=$(grimshot save area)
elif [ "$1" = "output" ]; then
SCREENPATH=$(grimshot save output)
fi
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