dmenu-scripts/dmenu-share

13 lines
315 B
Plaintext
Raw Normal View History

2022-07-17 11:03:00 +02:00
#!/bin/sh
2022-10-23 21:55:28 +02:00
source $HOME/.config/dmenu/config
file=$(find $HOME -type f | $DMENU -l 15)
2022-07-22 18:25:25 +02:00
[ -z "$file" ] && exit
2022-10-23 21:55:28 +02:00
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
2022-07-17 11:03:00 +02:00
notify-send "Dmenu Share" "Ready to share"