clipmenu

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

commit 5379860679cb25259d9b4f49b0dc7ad9e17b4574
parent 1368ec7a2a9879ae53523f6cea86d6e8b02a205e
Author: Chris Down <chris@chrisdown.name>
Date:   Wed, 25 Mar 2020 01:02:40 +0000

Merge pull request #108 from jb55/print-selection

clipmenu: print selection to stdout
Diffstat:
Mclipmenu | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/clipmenu b/clipmenu @@ -23,6 +23,7 @@ Environment variables: - $CM_DIR: specify the base directory to store the cache dir in (default: $XDG_RUNTIME_DIR, $TMPDIR, or /tmp) - $CM_HISTLENGTH: specify the number of lines to show in dmenu/rofi (default: 8) - $CM_LAUNCHER: specify a dmenu-compatible launcher (default: dmenu) +- $CM_OUTPUT_CLIP: if set, output clip selection to stdout EOF exit 0 fi @@ -52,3 +53,7 @@ file=$cache_dir/$(cksum <<< "$chosen_line") for selection in clipboard primary; do xsel --logfile /dev/null -i --"$selection" < "$file" done + +if (( CM_OUTPUT_CLIP )); then + cat "$file" +fi