Question

Is it possible to toolbar only when certain modes are used for the current buffer? What I am aiming at is have the toolbar only active when gdb-gud or newsticker are running, so that a quick interaction with it is possible. As soon as e.g. newsticker is closed, the toolbar-mode should be disabled. Is there a general way to achieve this behavior, or do I have to write something myself?

Was it helpful?

Solution

tool-bar-mode is a global mode. You can of course turn it on or off on a mode hook, but it affects all buffers in all frames.

As @legoscia mentioned, you can make the tool bar frame-specific. tool-bar-here-mode makes this easier (togglable). It is in library tool-bar+.el

I don't think you can easily limit use of the tool bar to a particular mode.

However, you can make showing the tool bar be on-demand when you click Buttons in the menu bar. This saves screen real estate: Show the tool bar temporarily, for the space of a single use.

This is available with tool-bar-popup-mode, which is also in library tool-bar+.el.

Screenshots and description.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top