enzlbtyn · 2022-03-01 21:41
Wanting the tab-bar to look a bit better.
Currently on MacOS. Looking at [https://www.gnu.org/software/emacs/manual/html\_node/emacs/Tab-Bars.html](https://www.gnu.org/software/emacs/manual/html_node/emacs/Tab-Bars.html)
Can't seem to find anything to change the appearance of the buttons to make it look better.
Thanks.
https://preview.redd.it/ilupnsbfduk81.png?width=888&format=png&auto=webp&s=3cb53064e3739cabff31b1efe2288e0404227c49
crawsphi · 2022-03-02 00:05
On a Mac you may want to try the "Mac Port" aka railwaycat aka Mituharu version: https://github.com/railwaycat/homebrew-emacsmacport
It allows Emacs to take advantage of MacOS's built in tabs, so they match the system chrome, respond to mouse drags, and so on.
tryptych · 2022-03-02 00:46
If you look in the source (eg `M-x find-library`) you'll find a few `defface`s.
Here's an [example customisation from zenburn](https://github.com/bbatsov/zenburn-emacs/blob/cef1e26146c1b8b32fc5ce346f2cfa9861eb67d4/zenburn-theme.el#L1492-L1499).
enzlbtyn · 2022-03-02 02:14
I'm using emacs-plus such that I can have native-comp enabled.
enzlbtyn · 2022-03-02 02:23
How do you add a face to an existing theme?
tryptych · 2022-03-02 03:06
You can just add the defface (with your own tweaks) to your init file, to override the defaults.
jimehgeek · 2022-03-02 14:16
There's one main function that tab-bar-mode uses to format the tabs, it's called `tab-bar-tab-name-format-default`. If you `M-x describe-function` on it, you can see the docs, and look at the source.
You can then define your own function, and set it as the name formatting function with:
(setq tab-bar-tab-name-format-function 'my-tab-bar-name-format)
There's also a group variant of this used when tab groups are enabled.
[Here](https://github.com/jimeh/.emacs.d/blob/c845af831690d1ab575b691020fbe91ce6435647/modules/workspaces/siren-tab-bar.el#L119-L138) is my personal format function that I'm using right now. It's pretty basic, but does what I want: https://share.jimeh.me/Screen-Shot-2022-03-02-14-08-29.09-PMZkgYQgfYf7.png
redblobgames · 2022-03-02 15:50
This is for tab-line and not tab-bar but I would expect that a lot of these customizations would be similar: [blog post](https://amitp.blogspot.com/2020/06/emacs-prettier-tab-line.html)
[preview image](https://www.redblobgames.com/x/screenshots/emacs-tab-line.png)
mclearc · 2022-03-02 21:49
Another thing you might consider (this depends on how many tabs you usually keep open, etc.) is not displaying tabs in the tab-bar at all `(setq tab-bar-show nil)` and displaying them in the echo-area instead. I use a combination of https://github.com/fritzgrabo/tab-bar-echo-area and https://github.com/qaiviq/echo-bar.el to give a consistent but very unobtrusive presentation of the tabs in the echo bar on the bottom right. You can see that in [this image](https://www.dropbox.com/s/pxv040sow6uwzdv/Screen%20Shot%202022-03-02%20at%2011.08.10.png?dl=0) -- and my config for it is [here](https://github.com/mclear-tools/dotemacs/blob/master/setup-config/setup-tabs.el).
crawsphi · 2022-03-03 19:36
Understood. For what it's worth, the Mac Port recently merged the 28 branch, so native comp is available there. I have not tried it out yet, however.