unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Some ideas to improve Tab Bar
Date: Sat, 27 Feb 2021 22:12:02 +0200	[thread overview]
Message-ID: <87czwlnxyt.fsf@mail.linkov.net> (raw)
In-Reply-To: <CH2PR01MB58793C6C2AB37A1C88594CB68BFA0@CH2PR01MB5879.prod.exchangelabs.com> (Gabriel do Nascimento Ribeiro's message of "Wed, 25 Nov 2020 14:19:49 -0300")

>>> 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.



  parent reply	other threads:[~2021-02-27 20:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25  0:35 Some ideas to improve Tab Bar Gabriel do Nascimento Ribeiro
2020-11-25  7:47 ` Juri Linkov
2020-11-25 17:19   ` Gabriel do Nascimento Ribeiro
2020-11-25 19:22     ` Juri Linkov
2021-02-27 20:12     ` Juri Linkov [this message]
2021-03-01 23:15       ` Gabriel do Nascimento Ribeiro
2021-03-02 19:46         ` Juri Linkov
2020-11-26 23:08 ` Gabriel do Nascimento Ribeiro
2020-11-27  8:22   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czwlnxyt.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    --cc=gabriel376@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).