clipmenu

Simple clipboard management using dmenu
git clone https://git.sinitax.com/cdown/clipmenu
Log | Files | Refs | README | LICENSE | sfeed.txt

commit 700a6b27dc6f2c87a027259d77a558268154502e
parent e46b37c793cd10e24f1f52c7fe0d5aa18da4610c
Author: Chris Down <chris@chrisdown.name>
Date:   Wed,  5 Feb 2014 17:16:42 +0800

Copy chosen line's content to the clipboard

Diffstat:
Mclipmenu | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/clipmenu b/clipmenu @@ -17,4 +17,8 @@ for file in /tmp/clipmenu/*; do selections[$first_line]=$file done -printf '%s\n' "${!selections[@]}" | dmenu -l "$dmenu_lines" +chosen_line=$(printf '%s\n' "${!selections[@]}" | dmenu -l "$dmenu_lines") + +[[ $chosen_line ]] || exit 1 + +xclip < "${selections[$chosen_line]}"