clipmenu

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

commit 9e672cf0a5ab64886957cbbb091252393d54dec2
parent 8de3d7a9c5b8d718dab2ffdea9c2cdcd06c0ac09
Author: Chris Down <chris@chrisdown.name>
Date:   Mon, 23 Mar 2020 17:05:59 +0000

Make clipnotify mandatory

The old sleep method is basically untested and unmaintained. Make it
official.

Diffstat:
Mclipmenud | 20++------------------
1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/clipmenud b/clipmenud @@ -128,13 +128,7 @@ declare -A last_data declare -A last_filename declare -A last_cache_file_output -command -v clipnotify >/dev/null 2>&1 && has_clipnotify=1 - -if ! (( has_clipnotify )); then - echo "WARN: Consider installing clipnotify for better performance." >&2 - echo "WARN: See https://github.com/cdown/clipnotify." >&2 -fi - +command -v clipnotify >/dev/null 2>&1 || die 2 "clipnotify not in PATH" command -v xdotool >/dev/null 2>&1 && has_xdotool=1 if [[ $CM_IGNORE_WINDOW ]] && ! (( has_xdotool )); then @@ -143,18 +137,8 @@ fi exec {lock_fd}> "$lock_file" -sleep_cmd=(sleep "${CM_SLEEP:-0.5}") - while true; do - if ! (( CM_ONESHOT )); then - if (( has_clipnotify )); then - # Fall back to polling if clipnotify fails - clipnotify || "${sleep_cmd[@]}" - else - # Use old polling method - "${sleep_cmd[@]}" - fi - fi + (( CM_ONESHOT )) || clipnotify if [[ $CM_IGNORE_WINDOW ]] && (( has_xdotool )); then windowname="$(xdotool getactivewindow getwindowname)"