From 7a5c6c41ce3c123717db2304cb42605ce51967be Mon Sep 17 00:00:00 2001 From: cronyakatsuki <64900606+cronyakatsuki@users.noreply.github.com> Date: Sun, 23 Oct 2022 21:55:28 +0200 Subject: [PATCH] Added wayland support. --- dmenu-share | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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"