clipmenu

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

commit 3704ce34272b5ae0fc36a6bd63d24db00cece33f
parent fd665a298a1ace0637b5a6f3c4cd017c03c51216
Author: Chris Down <chris@chrisdown.name>
Date:   Thu,  8 Feb 2018 01:04:47 +0000

Fall back to polling if clipnotify fails

Diffstat:
Mclipmenud | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/clipmenud b/clipmenud @@ -96,13 +96,16 @@ fi exec {lock_fd}> "$lock_file" +sleep_cmd=(sleep "${CM_SLEEP:-0.5}") + while true; do if ! (( CM_ONESHOT )); then if (( has_clipnotify )); then - clipnotify + # Fall back to polling if clipnotify fails + clipnotify || "${sleep_cmd[@]}" else # Use old polling method - sleep "${CM_SLEEP:-0.5}" + "${sleep_cmd[@]}" fi fi