Merge branch 'release/5.5.0'

This commit is contained in:
Chris Down 2018-08-21 15:42:04 -04:00
commit 50ba3d4b8f
2 changed files with 7 additions and 9 deletions

View file

@ -2,6 +2,7 @@
: "${CM_LAUNCHER=dmenu}" : "${CM_LAUNCHER=dmenu}"
: "${CM_DIR="${XDG_RUNTIME_DIR-"${TMPDIR-/tmp}"}"}" : "${CM_DIR="${XDG_RUNTIME_DIR-"${TMPDIR-/tmp}"}"}"
: "${CM_HISTLENGTH=8}"
major_version=5 major_version=5
@ -19,8 +20,9 @@ All arguments are passed through to dmenu itself.
Environment variables: 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_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 EOF
exit 0 exit 0
fi fi
@ -44,12 +46,8 @@ if [[ "$CM_LAUNCHER" == rofi-script ]]; then
chosen_line="${@: -1}" chosen_line="${@: -1}"
fi fi
else 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=$( chosen_line=$(
list_clips | "$CM_LAUNCHER" -l 8 "$@" list_clips | "$CM_LAUNCHER" -l "${CM_HISTLENGTH}" "$@"
) )
fi fi

View file

@ -80,11 +80,11 @@ when you want to select a clip.
Environment variables: Environment variables:
- $CM_ONESHOT: run once immediately, do not loop (default: 0)
- $CM_DEBUG: turn on debugging output (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_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") - $CM_SELECTIONS: space separated list of the selections to manage (default: "clipboard primary")
EOF EOF
exit 0 exit 0