clipmenu

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

commit 775adccfb4a3c36c6358a2a072f294f51faf9e40
parent 5c53e5f1cde8aa0fd98ecbe3e6fd6cc3acd4d5f1
Author: Matthew White <mehw.is.me@inventati.org>
Date:   Thu, 18 Nov 2021 01:47:18 +0000

clipmenud: print message when disabling but already disabled

Print a specific message when receiving a disable signal but already
disabled, as it's done for when enabling but already enabled.

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

diff --git a/clipmenud b/clipmenud @@ -56,6 +56,11 @@ get_first_line() { debug() { (( CM_DEBUG )) && printf '%s\n' "$@" >&2; } sig_disable() { + if (( _CM_DISABLED )); then + info "Received disable signal but we're already disabled, so doing nothing" + return + fi + info "Received disable signal, suspending clipboard capture" _CM_DISABLED=1 echo "disabled" > "$status_file" @@ -63,7 +68,7 @@ sig_disable() { sig_enable() { if ! (( _CM_DISABLED )); then - info "Received enable signal but we're not disabled, so doing nothing" + info "Received enable signal but we're already enabled, so doing nothing" return fi