diff --git a/dmenu-share b/dmenu-share index 9e1fc8c..0dd5cd6 100755 --- a/dmenu-share +++ b/dmenu-share @@ -1,6 +1,12 @@ #!/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 -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"