This package is a part of GNU Emacs.
Add tool bars to windows. Keep tool bars clean and useful for experienced Emacs users. Tool bars for GUIs and Terminals.
You may really like this package if any of the following is true:
- You like tool bars, but find Emacs' default tool bar not helpful because you already know how to do basic commands like open file, save file, cut, copy, or paste.
- You use the mouse when "browsing", like in help or info mode.
- You use
mouse-autoselect-window
and would like to use tool bars. - You like how VSCode does tool bars.
This package puts a tool bar in each window. This allows you to see multiple tool bars simultaneously directly next to the buffer it acts on which feels much more intuitive. Emacs "browsing" modes generally have sensible tool bars, for example: *info*, *Help*, and *eww* have them.
It does this while being mindful of screen real estate. If
tool-bar-map
is nil, then this package will not take up any space
for an empty tool bar. Most modes do not define a custom tool bar, so
calling (setq tool-bar-map nil)
in your init file will make most
buffers not take up space for a tool bar.
Window Tool Bar is included in Emacs 30 and higher. For older Emacsen,
installing is as simple as M-x
package-install
RET
window-tool-bar
. Additionally, on GNU Emacs 29 and higher, you can
run M-x
package-vc-install
RET
http://github.com/chaosemer/window-tool-bar-mode
to install directly
from source.
The default behavior is to make the per-window tab line show the tool
bar for each window's buffer. To enable this, add
(global-window-tool-bar-mode)
to your init file or enable via M-x
customize-group
RET
window-tool-bar
RET
. If you want to
enable the window tool bar for only specific modes, you can add
window-tool-bar-mode
to mode specific hooks.
It is common to only want to show mode specific tool bars and not the
default tool bar. To do this, add (setq tool-bar-map nil)
to your
init file. This is the configuration the author of this package uses.
If you want to share space with an existing tab line, mode line, or
header line, add (:eval (window-tool-bar-string))
to
tab-line-format
, mode-line-format
, or header-line-format
.
For additional documentation, see info node (emacs)Window Tool Bar.