From: Amin Bandali Date: Sat, 14 Mar 2020 01:25:59 +0000 (-0400) Subject: emacs: add current exwm workspace number to mode-line X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/commitdiff_plain/e8a3b8f7e8f19a083ae438056278026f5e2083bd emacs: add current exwm workspace number to mode-line --- diff --git a/.emacs.d/init.el b/.emacs.d/init.el index f2c5bff..e965e01 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -67,7 +67,16 @@ (setq b/emacs-initialized t gc-cons-threshold b/gc-cons-threshold gc-cons-percentage b/gc-cons-percentage - file-name-handler-alist b/file-name-handler-alist)) + file-name-handler-alist b/file-name-handler-alist) + (with-eval-after-load 'exwm-workspace + (setq-default + mode-line-format + (append + mode-line-format + '((:eval + (format + "[%s]" (number-to-string + exwm-workspace-current-index)))))))) (add-hook 'after-init-hook #'b/post-init) ;; increase number of lines kept in *Messages* log