17 lines
424 B
Bash
Executable file
17 lines
424 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if is_wayland; then
|
|
grim -g "$(slurp -d)" - | wl-copy
|
|
else
|
|
pkill unclutter
|
|
sleep 0.1
|
|
fn="$SCROTS_PATH/clipshot_$(date +"%Y-%m-%d_%H-%M-%S").png"
|
|
import "$fn"
|
|
chmod 700 "$fn"
|
|
< "$fn" xclip -t image/png -i -selection clipboard
|
|
< "$fn" xclip -t image/png -i -selection primary
|
|
< "$fn" xclip -t image/png -i -selection secondary
|
|
< "$fn" xclip -t image/png -i -selection buffer-cut
|
|
unclutter &
|
|
fi
|