clipmenu

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

commit 1daaeda6f3aca6f9f8e5b3196314442fb74fae14
parent 8885306970fb0e5ef16620451b9fdd7061db2de6
Author: Chris Down <chris@chrisdown.name>
Date:   Fri,  6 Jan 2017 16:46:49 +0000

Remove print_debug_info, this was never very useful

Diffstat:
Mclipmenu | 1-
Mclipmenud | 35-----------------------------------
2 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/clipmenu b/clipmenu @@ -21,7 +21,6 @@ if ! [[ -f "$file" ]]; then exit 2 fi - for selection in clipboard primary; do if type -p xsel >/dev/null 2>&1; then xsel -i --"$selection" < "$file" diff --git a/clipmenud b/clipmenud @@ -31,43 +31,12 @@ get_first_line() { }' <<< "$data" } -hr_msg() { - printf -- '\n--- %s ---\n\n' "$1" >&2 -} - debug() { if (( DEBUG )); then printf '%s\n' "$@" >&2 fi } -print_debug_info() { - # DEBUG comes from the environment - if ! (( DEBUG )); then - return - fi - - local msg="${1?}" - - hr_msg "$msg" - - hr_msg Environment - env | LC_ALL=C sort >&2 - - cgroup_path=/proc/$$/cgroup - - if [[ -f $cgroup_path ]]; then - hr_msg cgroup - cat "$cgroup_path" >&2 - else - hr_msg 'NO CGROUP' - fi - - hr_msg 'Finished debug info' -} - -print_debug_info 'Initialising' - cache_dir=/tmp/clipmenu.$USER/ cache_file=$cache_dir/line_cache @@ -79,11 +48,8 @@ declare -A last_data declare -A last_filename while sleep "${CLIPMENUD_SLEEP:-0.5}"; do - print_debug_info 'About to run selection' for selection in clipboard primary; do - print_debug_info "About to do selection for '$selection'" - if type -p xsel >/dev/null 2>&1; then debug 'Using xsel' data=$(xsel -o --"$selection"; printf x) @@ -120,7 +86,6 @@ while sleep "${CLIPMENUD_SLEEP:-0.5}"; do rm -- "${last_filename[$selection]}" fi - last_data[$selection]=$data last_filename[$selection]=$filename