reddit / emacs

global mode line

whudwl · 2022-05-31 07:58
I got to know that emacs now has a global mode line from here [https://amodernist.com/texts/emacs-global.html](https://amodernist.com/texts/emacs-global.html) The post above shows how to enable global mode line, and hints that it can be used together with tabs as well. After checking the docstring, it appears to be quite easy: ​ `(add-to-list 'tab-bar-format 'tab-bar-format-align-right t)` `(add-to-list 'tab-bar-format 'tab-bar-format-global t)` `(tab-bar-mode t)` ​ By default, battery info , date time (if enabled) and org clocking info will appear on the right side of tab bar, which is pretty cool. Hope someone might find this useful. https://preview.redd.it/ar3yt6qdpr291.png?width=1120&format=png&auto=webp&s=54c4fbe9b7c9e6e0b2b535c57d2c73962fe4e91b
7890yuiop · 2022-05-31 09:01
> I got to know that emacs now has a global mode line FYI that's just displaying `global-mode-string` which is a standard part of `mode-line-misc-info` in the normal `mode-line-format` (and has been for a really long time). So it's something most people are seeing already -- but seems like a nice approach to putting it somewhere different, for anyone using `tab-bar-mode`.
00-11 · 2022-05-31 19:51
Calling it the (or a) *global mode line* is misleading, IMO. It's not the mode-line, and it doesn't use the mode-line.
b3n · 2022-05-31 22:50
An alternative is to use [minibuffer-line](http://elpa.gnu.org/packages/minibuffer-line.html). Notice in the screenshot how the bottom line is completely blank wasted space? This adds a default to dispaly there when it's not being used. (package-install 'minibuffer-line) (setq minibuffer-line-format '(:eval global-mode-string)) (setq minibuffer-line-refresh-interval 1) (setq mode-line-misc-info nil)) (minibuffer-line-mode)
7890yuiop · 2022-06-01 23:20
I'd suggest that you explicitly remove the thing you want to remove from `mode-line-misc-info` rather than assuming that there will never be anything else in there.