emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some ideas to improve Tab Bar


From: Juri Linkov
Subject: Re: Some ideas to improve Tab Bar
Date: Sat, 27 Feb 2021 22:12:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>>> 3. An easier way to add more items to Tab Bar to make it act more like
>>> a general Bar.  The following example was shared in Emacs Devel
>>> mailing list on how to add a simple clock to the right of Tab Bar:
>>> =========================================
>>>   (advice-add 'tab-bar-make-keymap-1 :around
>>>               (lambda (orig-fun)
>>>                 (append (funcall orig-fun)
>>>                         `((display-time menu-item
>>>                                         ,(concat
>>>                                           (propertize " " 'display '(space 
>>> :align-to (- right 5)))
>>>                                           (format-time-string "%H:%M"))
>>>                                         ignore))))
>>>               '((name . tab-bar-display-time)))
>>> =========================================
>>
>> Do you propose to add functions that would allow doing this more easily?
>> Maybe using some hooks?
>
> I didn't think in any implementation, actually. But I could see the potential 
> of
> the Tab Bar towards a more general Bar and that many users would like a better
> control on what is displayed there, like adding custom texts or buttons. I ran
> into this idea by reading some threads here in emacs-devel. I know `mode-line'
> is super customizable and a there is `header-line' also, but that means having
> additional bars on the screen.

This thread was in
https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg00672.html

And indeed, when display-time-mode or display-battery-mode is enabled,
it duplicates information about battery status or time in every mode line
of every window.

Instead of duplicating the same information in every mode line of every window,
now tab-bar-mode has a new variable tab-bar-format.  A new element
tab-bar-format-global can be added to its list.  In this case,
when `display-time-mode' is enabled and automatically updates the time string
every minute using a timer, it updates time on the tab bar,
without duplicating it in every mode line.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]