dmenu-scripts/dmenu-share
2023-11-04 22:03:43 +01:00

13 lines
403 B
Bash
Executable File

#!/bin/sh
. $HOME/.config/dmenu/config
file=$(fd . "$HOME" --type f --hidden --color=never --exclude ".git" | $DMENU -l 15)
[ -z "$file" ] && exit
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
curl -F "file=@$file" "https://upfast.cronyakatsuki.xyz" | wl-copy -n
else
curl -F "file=@$file" "https://upfast.cronyakatsuki.xyz" | xclip -selection clipboard
fi
notify-send "Dmenu Share" "Ready to share"