diff --git a/README.md b/README.md index 3b421bc..41f3796 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -clipmenu is a simple clipboard manager using [dmenu][] (or [rofi][]) and -[xsel][]. +[![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][] with +`CM_LAUNCHER=rofi`) and [xsel][]. # Demo 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 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"