clipmenu

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

commit f7b0ea1c185e5ca9a237f43103a29c1fc50c604d
parent 8c1054ca73b05f54859f95e3ccb90d66e3325342
Author: Chris Down <chris@chrisdown.name>
Date:   Wed, 11 Jan 2017 11:35:09 +0000

Add version to $cache_dir

Diffstat:
Mclipmenud | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/clipmenud b/clipmenud @@ -2,6 +2,8 @@ cache_dir=/tmp/clipmenu.$USER/ cache_file=$cache_dir/line_cache +version=2.0.0 +version_file=$cache_dir/version get_first_line() { # Args: @@ -44,11 +46,14 @@ debug() { # shellcheck disable=SC2174 mkdir -p -m0700 "$cache_dir" +# We currently don't do anything with this, but in future we can use this +# version for the fabled clipmenu-fsck, or other migration logic. +printf '%s\n' "$version" > "$version_file" + declare -A last_data declare -A last_filename while sleep "${CLIPMENUD_SLEEP:-0.5}"; do - for selection in clipboard primary; do if type -p xsel >/dev/null 2>&1; then debug 'Using xsel'