From 1d2c9def58d0ee5bd69c5f985ca97538cdf93c9b Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Tue, 28 Apr 2020 11:06:04 -0700 Subject: Slightly-less-ugly-but-still-bad way of setting up statusbar.el --- emacs/inits/00-exwm.el | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/emacs/inits/00-exwm.el b/emacs/inits/00-exwm.el index 8d9caa7..e9fa71c 100644 --- a/emacs/inits/00-exwm.el +++ b/emacs/inits/00-exwm.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-26 20:34:40 (tslil@bison)> +;; Time-stamp: <2020-04-28 11:04:55 (tslil@bison)> (defun banish-rat () (interactive) @@ -73,7 +73,10 @@ (defvar exwm-workspace-lighter "") (defun exwm-update-workspace-lighter () - (setq exwm-workspace-lighter (format "@%d (*%d)" exwm-workspace-current-idx exwm-workspace-last-idx))) + (setq exwm-workspace-lighter (format (concat "@%d" + (when (/= exwm-workspace-current-idx exwm-workspace-last-idx) + " (*%d)")) + exwm-workspace-current-idx exwm-workspace-last-idx))) (defun exwm-workspace-track-changes (frame-or-index &optional ignored) (when (/= exwm-workspace-current-index exwm-workspace-current-idx) @@ -127,6 +130,21 @@ (exwm-systemtray-enable) (setq exwm-systemtray-height 24) + ;; ----------------------------------------------------------------------------- + ;; Statusbar.el + + (add-to-list 'load-path (expand-file-name "~/.emacs.d/scripts/statusbar.el/")) + (use-package posframe :ensure t) + (use-package statusbar + :config + (advice-add 'exwm-update-workspace-lighter :after #'statusbar-refresh) + (setq statusbar-modeline-variables '(exwm-workspace-lighter display-time-string))) + + ;; This is an awful hack, i'm not sure why i can't just run this immediately after EXWM + (push (lambda () + (statusbar-mode 1) + (exwm-update-workspace-lighter)) exwm-init-hook) + ;; ------------------------------------------------------------------- ;; RandR -- cgit v1.2.3