10 lines
296 B
Bash
Executable file
10 lines
296 B
Bash
Executable file
#!/bin/sh
|
|
SCREENSHOTS_DIR="$HOME/Pictures/Screenshots"
|
|
|
|
mkdir -p "$SCREENSHOTS_DIR"
|
|
|
|
if [ "$GDK_BACKEND" = "x11" ]; then
|
|
scrot -s "$SCREENSHOTS_DIR/%Y-%m-%d.png" -e 'xclip -selection clipboard -t image/png -i $f'
|
|
elif [ "$GDK_BACKEND" = "wayland" ]; then
|
|
grim -g "$(slurp -d)" - | wl-copy
|
|
fi
|