Search code examples
sublimetext2

Is it possible to hide the menu bar in Sublime Text 2?


I suspect the answer is no, but I've got to ask anyway, is there any way to hide the menu bar in Sublime Text 2 running in Linux?


Solution

  • Ah, finally found people talking about it: http://www.sublimetext.com/forum/viewtopic.php?f=2&t=12441&p=48966&hilit=hide+menu+bar#p48966

    The long and short of it is no, this seems to be the one thing that can't be customized in Sublime 2. >:-|

    Edit: Wow, talk about me being glad to be wrong!

    http://www.sublimetext.com/forum/viewtopic.php?f=3&t=2726&p=39487&hilit=hide+menu+bar#p39487 outlines a glorious terrible hack that gets the job done beautifully! To reproduce the steps here for redundancy:

    The idea is to trick GTK into rendering the window as if you're using it in Unity (or the like) so it doesn't draw the menu bar despite Sublime telling it to. It doesn't allow you to turn the menus back on without restarting, but for my purposes that's fine (it's all just a ctrl+shift+p away anyway) and it looks sooo much better without that bar. Anyway here's how to do it in ubuntu and mint:

    sudo apt-get install git-core valac-0.14 libvala-0.14-dev libgtk-3-dev gobject-introspection libgirepository1.0-dev libgtk2.0-dev autotools-dev automake autoconf intltool libtool
    git clone git://github.com/gnome-globalmenu/gnome-globalmenu.git
    cd gnome-globalmenu
    git checkout gnome-3
    autoreconf --force --install --verbose
    ./autogen.sh --prefix=/usr
    make
    sudo make GTK2_MODULES_DIR=/usr/lib/gtk-2.0/modules GTK3_MODULES_DIR=/usr/lib/gtk-3.0/modules GLIB_COMPILE_SCHEMAS=/bin/true install
    sudo glib-compile-schemas /usr/share/glib-2.0/schemas
    

    then invoke it with

    GTK_MODULES=globalmenu-gtk /path/to/sublime_text
    

    or better yet wrap a script around it.