2023-10-09 17:55:47 -03:00
|
|
|
#!/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
|
2024-08-20 10:13:31 -03:00
|
|
|
curl -F'file=@'"${tmp}" -H 'X-Auth: '$(cat ~/.key) https://paste.jabuxas.xyz/upload | wl-copy
|
2023-10-09 17:55:47 -03:00
|
|
|
fi
|