dmenu-scripts/dmenu-share

13 lines
409 B
Plaintext
Raw Normal View History

2022-07-17 11:03:00 +02:00
#!/bin/sh
2022-10-30 16:07:16 +01:00
. $HOME/.config/dmenu/config
2022-10-23 21:55:28 +02:00
2022-11-28 13:42:35 +01:00
file=$(fd . "$HOME" --type f --hidden --color=never --exclude ".git" | $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
2023-08-23 19:50:09 +02:00
curl -F "file=@$file" "https://upfast.cronyakatsuki.xyz" | wl-copy -n
2022-10-23 21:55:28 +02:00
else
2023-08-23 19:50:09 +02:00
curl -F "file=@$file" "https://upfast.cronyakatsuki.xyz" | xclip -selection clipboard
2022-10-23 21:55:28 +02:00
fi
2022-07-17 11:03:00 +02:00
notify-send "Dmenu Share" "Ready to share"