From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: [tab-bar] How to show something in the right side? Date: Fri, 25 Jun 2021 23:18:23 +0200 Message-ID: <87zgvdtzhc.fsf@gmx.net> References: <875yy2ufyq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25648"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Rodrigo Morales Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 25 23:18:56 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwtE0-0006V9-4a for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 25 Jun 2021 23:18:56 +0200 Original-Received: from localhost ([::1]:59540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwtDz-0006rc-7K for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 25 Jun 2021 17:18:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwtDZ-0006rU-GO for help-gnu-emacs@gnu.org; Fri, 25 Jun 2021 17:18:29 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:54533) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwtDX-00013o-CZ for help-gnu-emacs@gnu.org; Fri, 25 Jun 2021 17:18:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1624655904; bh=M4k3TVZ4b74IhOQNfoYNTThgSNS28WjihKRhvDzDm1I=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Zbj6+/cR7WxPlj2Lxl3R8oMIY6Md/B3UfVqF5aztjzfiixnmvhl1X6VqlsWFjMMko 0/2diPSfJDZlYOK80LeDbnHNFvJ3RojCyOVGgcu+LkyphAHB2X0qK/2qRiYvgn6z78 pjod88MbPWVs6bCkVEfQvA/tOXZnqnXtw6K/2P/Y= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobelfs ([178.1.126.121]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MxlzI-1l2KNV3bUU-00zCMQ; Fri, 25 Jun 2021 23:18:23 +0200 In-Reply-To: <875yy2ufyq.fsf@gmail.com> (Rodrigo Morales's message of "Fri, 25 Jun 2021 10:22:21 -0500") X-Provags-ID: V03:K1:1LswVh5mVPea2IWqQZFUsNc95RhCM5yYiTWL+EcoODSLwlVaGMs dG4DjONFb8jgtixur3oxnrJF3w9k3O+Vjb2zA/KkAoVKKp+uDItPVBt3aEmaLF3ueSEaf8x +YXMphuKrNwtef3naCiOS2Ebdn7WBoFIroG1i+RoURZM8q2zc8m7B6u1uhNLfMvuQbttr2R RJof5U8lgEpoV32NsegeQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:5P3+3VIckCA=:ZXVe3Vizkv5WlEePXcTvhv 3TrYvYJbzI425a+KrITj1NiSNy+dqU/c1f5RyhTPEFMG5BAbuoqUujLLQMt8vOyySRHFI9BZe 0WCrEwT3G2Rh9746JCklBW7Es2ZchecpzmwPbCJwWqhor/yc/XoyKlLNvSN2bZj7jd/6TnqpB YM7j6aPzpgCgE9QDeL8rZ6YtgBoApZFl8h6Vanf8gc1wFrmLQarnIWFna76p1dHbamUjCzOX8 Yh7bHI13NbqVZZYdBle7Eyd0BGmDvr0qbD5FG4j0Zc2MmMzsyaFDkD9y5pKLA82QteO+01TX9 zYLQwCNHUKTFtRFFluFwLiJnfOLqTzZHuLG1jT77CJT0xZ/l7aXKZYy0GtTyCuoPd8QLOPi/r yaVy7WtwtMsbTOCWD/mJIM6hiwybP2v7DUBW2fQY2RlB4uWTEhIdV1/hKtSAHUZDBSEHVOcd/ F6v3N7vBYmhNLMaCdbs+rni5vsOnUamMDjSyRnEkJ2Pmbj9ZrJW2vpARQFemBtzOYzv+HQzOO iaEfBDIUIxr9KU1O071GAjHZIZWU2/+f8qOCPFmoWOUbPXVFmyRACmfOC4Ti0NMzkq0/GqDHZ xBWoBZkqUkpC83UyjWTMhe0mtsZpKV7HE0+fIkRqemkJ42YeAL3aFavQnDxiGjQj/E+mRV5n9 //iG4NG4zemFaTH1iHkZE0+RTT1xjY33yp+0Jj8Ck13/6CfyZZ2aKBJszE7D7aKvi6+JXI9na b1wbDkc3vpM8T9oyenp0x7nwU65XJg53aijniT2z/80ySZ00+18zg7BWlnrp+5KT+maDn4f7 Received-SPF: pass client-ip=212.227.15.18; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131227 Archived-At: On Fri, 25 Jun 2021 10:22:21 -0500 Rodrigo Morales wrote: > * The question > > Have any of you managed to insert some content in the right side of the > tab-bar (the one that is shown when tab-bar-mode is enabled)? > > For those who don't know, the current behavior of =tab-bar-mode= is to > show the name of opened tabs starting from the left side, so if you have > 3 tabs opened and your font is small enough, the names will fill the bar > less than the middle of the screen. This means that there is an empty > space that could be used for something else. For this reason, I would > like to show the current time (i.e. 10:10AM) in that part of the screen > because most of the time that part is empty. Some users use "polybar" > for accomplishing this, but I was wondering whether it was possible to > do this with "tab-bar-mode" without much tinkering. > > * Additional context > > I could also make the time be shown in my screen with > =display-time-mode=, but I don't particularly like this because this > makes the time be shown in all modelines, so if I have 4 buffers, the > time is shown in the modeline of each buffer (i.e. 4 times). I would > rather the time be shown just once. Juri Linkov, the author of tab-bar-mode, offered this way to do that (see https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg00685.html): (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))) Steve Berman