Added wayland support.

This commit is contained in:
cronyakatsuki 2022-10-23 21:55:28 +02:00
parent 2b54422aed
commit 7a5c6c41ce

View File

@ -1,6 +1,12 @@
#!/bin/sh #!/bin/sh
file=$(find $HOME -type f | dmenu -l 15) source $HOME/.config/dmenu/config
file=$(find $HOME -type f | $DMENU -l 15)
[ -z "$file" ] && exit [ -z "$file" ] && exit
curl -F "file=@$file" 0x0.st | xclip -selection clipboard if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
curl -F "file=@$file" 0x0.st | wl-copy -n
else
curl -F "file=@$file" 0x0.st | xclip -selection clipboard
fi
notify-send "Dmenu Share" "Ready to share" notify-send "Dmenu Share" "Ready to share"