clipmenu

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

commit 50ba3d4b8f8cdd891c25dcca6c693ccbe526bab2
parent 48dce54b756ce2e329d918a60a2d6b5b15cb9369
Author: Chris Down <chris@chrisdown.name>
Date:   Tue, 21 Aug 2018 15:42:04 -0400

Merge branch 'release/5.5.0'

Diffstat:
Mclipmenu | 10++++------
Mclipmenud | 6+++---
2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/clipmenu b/clipmenu @@ -2,6 +2,7 @@ : "${CM_LAUNCHER=dmenu}" : "${CM_DIR="${XDG_RUNTIME_DIR-"${TMPDIR-/tmp}"}"}" +: "${CM_HISTLENGTH=8}" major_version=5 @@ -19,8 +20,9 @@ All arguments are passed through to dmenu itself. Environment variables: -- $CM_LAUNCHER: specify a dmenu-compatible launcher (default: dmenu) - $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) EOF exit 0 fi @@ -44,12 +46,8 @@ if [[ "$CM_LAUNCHER" == rofi-script ]]; then chosen_line="${@: -1}" fi else - # It's okay to hardcode `-l 8` here as a sensible default without checking - # whether `-l` is also in "$@", because the way that dmenu works allows a later - # argument to override an earlier one. That is, if the user passes in `-l`, our - # one will be ignored. chosen_line=$( - list_clips | "$CM_LAUNCHER" -l 8 "$@" + list_clips | "$CM_LAUNCHER" -l "${CM_HISTLENGTH}" "$@" ) fi diff --git a/clipmenud b/clipmenud @@ -80,11 +80,11 @@ when you want to select a clip. Environment variables: -- $CM_ONESHOT: run once immediately, do not loop (default: 0) - $CM_DEBUG: turn on debugging output (default: 0) -- $CM_OWN_CLIPBOARD: take ownership of the clipboard (default: 1) -- $CM_MAX_CLIPS: maximum number of clips to store, 0 for inf (default: 1000) - $CM_DIR: specify the base directory to store the cache dir in (default: $XDG_RUNTIME_DIR, $TMPDIR, or /tmp) +- $CM_MAX_CLIPS: maximum number of clips to store, 0 for inf (default: 1000) +- $CM_ONESHOT: run once immediately, do not loop (default: 0) +- $CM_OWN_CLIPBOARD: take ownership of the clipboard (default: 1) - $CM_SELECTIONS: space separated list of the selections to manage (default: "clipboard primary") EOF exit 0