FollieHiyuki-dotfiles/home/.local/bin/X11/clipboard

20 lines
498 B
Plaintext
Raw Normal View History

2021-02-13 11:28:59 -05:00
#!/bin/sh
case $1 in
--dmenu)
greenclip print | sed '/^$/d' | dmenu -i -l 10 -p "clipboard" | xargs -r -d'\n' -I '{}' greenclip print '{}'
;;
--rofi)
rofi -modi " :greenclip print" -show " " -run-command '{cmd}'
;;
--fzf)
greenclip print | sed '/^$/d' | fzf --no-multi -e | xargs -r -d'\n' -I '{}' greenclip print '{}'
;;
--clear)
pkill greenclip && greenclip clear && greenclip daemon &
notify-send -i $HOME/.config/dunst/clipboard.png "Clipboard cleared"
;;
*)
;;
esac