diff options
Diffstat (limited to 'lib/eos/jao-tracking.el')
| -rw-r--r-- | lib/eos/jao-tracking.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/eos/jao-tracking.el b/lib/eos/jao-tracking.el index 2af868c..b8514c8 100644 --- a/lib/eos/jao-tracking.el +++ b/lib/eos/jao-tracking.el @@ -1,6 +1,6 @@ ;; jao-minibuffer-tracking.el --- Tracking notifications -*- lexical-binding: t; -*- -;; Copyright (C) 2021, 2022, 2024 jao +;; Copyright (C) 2021, 2022, 2024, 2026 jao ;; Author: jao <mail@jao.io> ;; Keywords: convenience @@ -25,6 +25,10 @@ (require 'jao-minibuffer) (require 'jao-afio) +;;; frame tracking for exwm +(with-eval-after-load 'tracking + (add-hook 'exwm-workspace-switch-hook 'tracking-remove-visible-buffers)) + ;;; shorten ;;;###autoload (defun jao-shorten-modes (&rest modes) @@ -87,13 +91,13 @@ (defvar jao-tracking--pipe (let ((name "/tmp/emacs.status")) (unless (file-exists-p name) - (shell-command (format "mkfifo %s" name name))) + (shell-command (format "mkfifo %s" name))) name)) (defun jao-tracking-set-log (v) - (when (member window-system '(x)) + (when (fboundp 'x-change-window-property) (x-change-window-property "_EMACS_LOG" v nil nil nil nil 0)) - (if jao-wayland-enabled + (if (bound-and-true-p jao-wayland-enabled) (let ((inhibit-message t)) (shell-command (format "echo \"%s\" > %s" v jao-tracking--pipe))) (let* ((action (if (string-blank-p v) "remove" "add")) @@ -105,7 +109,7 @@ `(:propertize ,(plist-get s :propertize) face (jao-tracking-minibuffer - ,@(when-let ((f (plist-get s 'face))) + ,@(when-let* ((f (plist-get s 'face))) (jao-tracking-set-log " * ") (list f)))) `(:propertize "|" face jao-tracking-minibuffer-sep))) |
