clipmenu

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

commit 04b71fb7a9b076b88959c71760a973efe6b399c5
parent bc35b6f44ab0def13601c4ebd836437c5dc0e360
Author: Chris Down <chris@chrisdown.name>
Date:   Sun, 19 Dec 2021 01:37:13 +0000

rofi: Pass -p in dmenu mode

-p wastes space in real dmenu, but rofi shows "dmenu:" by default
anyway, so it seems worth passing.

Closes #177.

Diffstat:
Mclipmenu | 5+++--
Mtests/test-clipmenu | 2+-
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/clipmenu b/clipmenu @@ -37,8 +37,9 @@ if [[ "$CM_LAUNCHER" == fzf ]]; then launcher_args=() fi -# rofi supports dmenu-like arguments through the -dmenu flag -[[ "$CM_LAUNCHER" == rofi ]] && set -- -dmenu "$@" +# rofi supports dmenu-like arguments through the -dmenu flag. -p wastes space +# in real dmenu, but rofi shows "dmenu:" anyway, so pass it here only. +[[ "$CM_LAUNCHER" == rofi ]] && set -- -dmenu -p clipmenu "$@" list_clips() { LC_ALL=C sort -rnk 1 < "$cache_file" | cut -d' ' -f2- | awk '!seen[$0]++' diff --git a/tests/test-clipmenu b/tests/test-clipmenu @@ -90,4 +90,4 @@ grep -Fxq "xsel line 2 stdin: Yes, it's selected text." "$temp" CM_LAUNCHER=rofi /tmp/clipmenu --foo bar > "$temp" 2>&1 # We have a special case to add -dmenu for rofi -grep -Fxq 'rofi args: -l 8 -dmenu --foo bar' "$temp" +grep -Fxq 'rofi args: -l 8 -dmenu -p clipmenu --foo bar' "$temp"