commit f0d09c76921a3b06fd309e74a1fc87f83346b23c parent e5508e84c546f03480e171e1e2edc5855aa3ed52 Author: Chris Down <chris@chrisdown.name> Date: Tue, 30 May 2017 09:03:35 +0100 Use $TMPDIR as base for cache directory Closes #38. Diffstat:
M | clipmenu | | | 6 | ++++-- |
M | clipmenud | | | 11 | ++++++----- |
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/clipmenu b/clipmenu @@ -1,13 +1,15 @@ #!/bin/bash +: "${CM_LAUNCHER=dmenu}" +: "${TMPDIR=/tmp}" + major_version=3 shopt -s nullglob -cache_dir=/tmp/clipmenu.$major_version.$USER +cache_dir=$TMPDIR/clipmenu.$major_version.$USER cache_file=$cache_dir/line_cache -: "${CM_LAUNCHER=dmenu}" if [[ "$CM_LAUNCHER" == rofi ]]; then # rofi supports dmenu-like arguments through the -dmenu flag diff --git a/clipmenud b/clipmenud @@ -1,15 +1,16 @@ #!/bin/bash +: "${CM_ONESHOT=0}" +: "${CM_OWN_CLIPBOARD=1}" +: "${CM_DEBUG=0}" +: "${TMPDIR=/tmp}" + major_version=3 -cache_dir=/tmp/clipmenu.$major_version.$USER/ +cache_dir=$TMPDIR/clipmenu.$major_version.$USER/ cache_file=$cache_dir/line_cache lock_file=$cache_dir/lock lock_timeout=2 -: "${CM_ONESHOT=0}" -: "${CM_OWN_CLIPBOARD=1}" -: "${CM_DEBUG=0}" - _xsel() { timeout 1 xsel --logfile /dev/stderr "$@" }