Better colors for the tabs in the Emacs tab bar
===============================================

Emacs on the desktop and remote
-------------------------------
I use Emacs on my desktop on a graphical display and in
the terminal over ssh.

I use Denote in a FreeBSD jail on the central server in
my network. That way, no matter which laptop I am using,
I can access it.

Denote in this jail has its own configuration, which
makes it not a good option for using Tramp.

Tab mode
--------
Tab mode is a built in mode, without the need to
install extra packages.

Tab mode works on Emacs on graphical displays and on
text terminals. It adds a bar on top of each frame,
just below the menu bar.

Switching to a tab switches to the window configuration
recorded by the tab; it is a configuration of windows
and buffers which was previously used in the frame when
that tab was the current tab.

Default theme
-------------
On the desktop Emacs runs with the default theme, but
with reversed colors (white on black).

For this I have added a file ~/.emacs.d/early-init.el
with the following contents:

  (add-to-list 'default-frame-alist '(reverse . t))
  (setq initial-frame-alist default-frame-alist)

On the jail Emacs runs without having set any theme.

Tab colors
----------
The tab bar displays the tabs. The colors of the
inactive tabs and of the active tab are close to each
other, making it hard to distinguish which tab is
active.

I am happy with the other parts of the configuration
of the tabs, so I wanted to change only the colors of
the tabs.

This is how I set the colors of the tabs:

On the graphical display:

  (set-face-background
   'tab-bar-tab
   "white")
  (set-face-foreground
   'tab-bar-tab
   "black")

  (set-face-background
   'tab-bar-tab-inactive
   "gray75")
  (set-face-foreground
   'tab-bar-tab-inactive
   "black")

On the terminal:

  (set-face-background
   'tab-bar-tab
   "white")
  (set-face-foreground
   'tab-bar-tab
   "black")

  (set-face-background
   'tab-bar-tab-inactive
   "black")
  (set-face-foreground
   'tab-bar-tab-inactive
   "gray")

Happy tabbing !


Last edited: $Date: 2023/11/02 18:01:27 $