configs/desktop/scripts/print-tmp.sh
2024-01-04 20:30:37 -03:00

12 lines
311 B
Bash
Executable File

#!/bin/bash
tmp="$HOME/tmp/tmp.png"
if [[ $XDG_SESSION_TYPE == "x11" ]]; then
maim -u -s "$tmp"
curl -F'file=@'"${tmp}" https://0x0.st | xclip -sel clip
fi
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
grim -g "$(slurp)" $tmp
curl -F'file=@'"${tmp}" -Fsecret= -Fexpires=24 https://0x0.st | wl-copy
fi