diff options
author | jao <jao@gnu.org> | 2022-08-01 23:06:23 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-08-01 23:06:23 +0100 |
commit | 79d1c5fd9162ebfd9a9760f5d65b1a72598335fb (patch) | |
tree | 43e99e468d15de046190378ebc5a0616d4170c4f /lib/eos/jao-tracking.el | |
parent | 934a4e9c99ff02e562681e813394a6a3efc70118 (diff) | |
download | elibs-79d1c5fd9162ebfd9a9760f5d65b1a72598335fb.tar.gz elibs-79d1c5fd9162ebfd9a9760f5d65b1a72598335fb.tar.bz2 |
tracking: clear off demands_attention as needed
Diffstat (limited to 'lib/eos/jao-tracking.el')
-rw-r--r-- | lib/eos/jao-tracking.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/eos/jao-tracking.el b/lib/eos/jao-tracking.el index 95db95a..8436733 100644 --- a/lib/eos/jao-tracking.el +++ b/lib/eos/jao-tracking.el @@ -87,8 +87,9 @@ (defun jao-tracking-set-log (v) (when (member window-system '(x)) (x-change-window-property "_EMACS_LOG" v nil nil nil nil 0)) - (unless (equal "" v) - (shell-command-to-string "wmctrl -r emacs -b add,demands_attention"))) + (let* ((action (if (string-blank-p v) "remove" "add")) + (cmd (format "wmctrl -r emacs -b %s,demands_attention" action))) + (shell-command-to-string cmd))) (jao-tracking-set-log "") |