From 6dbee0278351c95999f0e05d2e884924a92cc987 Mon Sep 17 00:00:00 2001 From: Chris Down Date: Tue, 20 Feb 2018 11:48:14 +0000 Subject: [PATCH 1/4] readme: Add Travis link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3b421bc..5f8ee56 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Tests](https://img.shields.io/travis/cdown/clipmenu/develop.svg)](https://travis-ci.org/cdown/clipmenu) + clipmenu is a simple clipboard manager using [dmenu][] (or [rofi][]) and [xsel][]. From 9b7183b940ebe298b1eb6885c6e45cb10554befa Mon Sep 17 00:00:00 2001 From: Chris Down Date: Tue, 20 Feb 2018 12:00:24 +0000 Subject: [PATCH 2/4] Add rofi instructions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f8ee56..41f3796 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Tests](https://img.shields.io/travis/cdown/clipmenu/develop.svg)](https://travis-ci.org/cdown/clipmenu) -clipmenu is a simple clipboard manager using [dmenu][] (or [rofi][]) and -[xsel][]. +clipmenu is a simple clipboard manager using [dmenu][] (or [rofi][] with +`CM_LAUNCHER=rofi`) and [xsel][]. # Demo From a93cc27b65e745dfe94f37bacb76b3159fe9e766 Mon Sep 17 00:00:00 2001 From: Chris Down Date: Wed, 21 Feb 2018 17:23:07 +0000 Subject: [PATCH 3/4] Add nanosecond resolution to cache file output Possibly related to #62. --- clipmenud | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clipmenud b/clipmenud index cc5adcc..6b83508 100755 --- a/clipmenud +++ b/clipmenud @@ -190,7 +190,7 @@ while true; do # Without checking ${last_data[any]}, we often double write since both # selections get the same content - cache_file_output="$(date +%s) $first_line" + cache_file_output="$(date +%s%N) $first_line" if [[ ${last_data[any]} != "$data" ]]; then filename="$cache_dir/$(cksum <<< "$first_line")" debug "Writing $data to $filename" From 4347465b78fc2c881cc263ea0493c48b6fd0cd7a Mon Sep 17 00:00:00 2001 From: Chris Down Date: Wed, 21 Feb 2018 17:32:40 +0000 Subject: [PATCH 4/4] Force LC_ALL=C for clip sort --- clipmenu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clipmenu b/clipmenu index b5a4abf..3d245a4 100755 --- a/clipmenu +++ b/clipmenu @@ -35,8 +35,8 @@ fi # argument to override an earlier one. That is, if the user passes in `-l`, our # one will be ignored. chosen_line=$( - cat "$cache_file_prefix"_* /dev/null | sort -rnk 1 | cut -d' ' -f2- | - awk '!seen[$0]++' | "$CM_LAUNCHER" -l 8 "$@" + cat "$cache_file_prefix"_* /dev/null | LC_ALL=C sort -rnk 1 | + cut -d' ' -f2- | awk '!seen[$0]++' | "$CM_LAUNCHER" -l 8 "$@" ) [[ $chosen_line ]] || exit 1