summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authortslil clingman <>2020-04-28 11:06:04 -0700
committertslil clingman <>2020-04-28 11:06:04 -0700
commit1d2c9def58d0ee5bd69c5f985ca97538cdf93c9b (patch)
tree7cdb9b15afc7aba56a0d1ee5a301cb0ed1fe8cd8 /emacs
parent55209d38b970a34adf04a7afc87b1e9dba5b8586 (diff)
Slightly-less-ugly-but-still-bad way of setting up statusbar.el
Diffstat (limited to 'emacs')
-rw-r--r--emacs/inits/00-exwm.el22
1 files 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