summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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