I run both gui frames and tty frames on the same server. I'd like to only have the gui frames have the menu-bar and I want all tty frames to not have a menu bar.
I'm confused by the menu bar docs, is there a way to do this?
nil for non-GUI Emacs. So something like the following should work:
(unless (display-graphic-p) (menu-bar-mode -1))
My original answer only works for Emacs run only in a tty. Since you are using both GUI and TTY frames run from the same server, you need to modify individual frame parameters:
(defun contextual-menubar (&optional frame) "Display the menubar in FRAME (default: selected frame) if on a graphical display, but hide it if in terminal." (interactive) (set-frame-parameter frame 'menu-bar-lines (if (display-graphic-p frame) 1 0))) (add-hook 'after-make-frame-functions 'contextual-menubar)