You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
522 B
Plaintext
14 lines
522 B
Plaintext
3 years ago
|
#!/usr/bin/env bash
|
||
|
# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry)
|
||
|
# https://www.youtube.com/user/gotbletu
|
||
|
# DESC: copy from your clipboard history
|
||
|
# DEMO: https://www.youtube.com/watch?v=Vzt0tVNrJ0A
|
||
|
# DEPEND: fzf greenclip coreutils xsel (or tmux)
|
||
|
# REFF: https://github.com/erebe/greenclip
|
||
|
# NOTE: not good with multiline at the moment
|
||
|
|
||
|
selected="$(greenclip print | fzf -e -i --reverse)"
|
||
|
[ -z "$selected" ] && exit
|
||
|
printf "%s" "$selected" | xsel -b
|
||
|
printf "%s" "$selected" | tmux load-buffer -
|