Replace default menu bar in Atom


#1

Is there a way to override the default main menu in Atom? I would like to be able to have custom menu options rather than the default “file”, “edit”, etc. The Atom MenuManager class provides a means to add additional menus, but I am looking for a way to replace the current main menu bar with custom menus, rather than just add additional drop-downs.


#2

The menu bar is defined in the Atom source and the way to write a completely custom one would be to edit that and then build it.


#3

It seems a bit farfetched that the “hackable text editor for the 21st century” would draw the line of what can be hacked at the menu bar! :slight_smile:

Perhaps you might have some idea as to the best solution in the following scenario?

You would like to configure the editor for two audiences: for novice programmers, you would like to hide all but the most elementary menus (and possibly refactor those to eliminate any menu item that might give pause); but for seasoned programmers (or the novices as they got more experience), it would be nice if they could toggle the full menu options back on.

It seems that having to define the menus at build time would prevent such flexibility.


#4

You don’t have to define the menus at build time. Atom has a Menu API, but it is designed around adding to the menus, not wholesale rewriting them.


#5

It doesn’t draw the line there. The menu items are defined in a CSON file that’s really easy to get to. If they were defined on load time, that would be a performance hit just for the off-chance that somebody wanted to completely rewrite the menu bar without doing a rebuild.

Which items? I’m not convinced that any of the default menu items are “advanced”.