How to customize the Whisker menu, colors too!

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
JohnBobSmith

How to customize the Whisker menu, colors too!

Post by JohnBobSmith »

Hey guys! So like, this is my first real tutorial, so bear with me. Here we go!

First off, this tutorial builds upon research done by roblm in THIS old thread of mine.

Now, here we go!

Step 1) First, we need to copy a menu configuration file to our .config/menus directory. Open up Thunar as root, and go to /etc/xdg/menus/ and copy the xfce-applications.menu. Now paste it in /home/<username>/.confg/menus. If you dont see a .config, it is probably hidden. So press ctrl + h to make everything visible. You can also go to view > show hidden items.
Step 2) Now, we set the files permissions to read/write, so we can edit it. With Thunar still open as root, right click your xfce-applications.menu and make sure permissions are set to read/write for everyone.
Step 3) Now we create a backup file, just in case we mess something up. Copy your xfce-applications.menu and paste it in the same directory. Then, rename it to xfce-applications.menu.bak to finish the process.
Step 4) Now we edit the file! Open it up with gedit. You will see what looks like HTML. It is very simmillar to HTML, but not quite. Lets remove the default "accessories" category. To do this, find the bit of code that looks like this:

Code: Select all

    <Menu>
        <Name>Accessories</Name>
        <Directory>xfce-accessories.directory</Directory>
        <Include>
            <Or>
                <Category>Accessibility</Category>
                <Category>Core</Category>
                <Category>Legacy</Category>
                <Category>Utility</Category>
            </Or>
        </Include>
        <Exclude>
            <Or>
                <Filename>exo-file-manager.desktop</Filename>
                <Filename>exo-terminal-emulator.desktop</Filename>
                <Filename>xfce4-about.desktop</Filename>
                <Filename>xfce4-run.desktop</Filename>
            </Or>
        </Exclude>
    </Menu>
Everything between a <Menu> block is, well, a menu. For more information, please see the thread linked at the top of the page up ^ there. Now, remove that code. Save the file twice, then open the whisker menu. You should now see the accessories category is missing! This I find good, as I never used accessories anyways. If its not showing the changes, logout and log back in. You can now add/remove as many menus as you wish. I havent figured out a way to remove favorites or recently used though...

However, we can do more! We can even color our Whisker menu, using gtkrc theming! To do this, open up your .gtkrc-2.0 file located in your home directory. Open the file, and dump the following into it:

Code: Select all

include ".gtkrc-xfce"
style "darkback"
{
	bg[NORMAL] = "#404040"
	bg[ACTIVE] = "#606060"
	bg[PRELIGHT] = "#808080"
	fg[NORMAL] = "#ccc"
	fg[ACTIVE] = "#fff"
	fg[PRELIGHT] = "#fff"
}
widget "whiskermenu-window*" style "darkback"

style "darktree"
{
	base[NORMAL] = "#404040"
	base[ACTIVE] = "#606060"
	text[NORMAL] = "#ccc"
	text[ACTIVE] = "#fff"
}
widget "whiskermenu-window*TreeView*" style "darktree"
Thiis changes the text to a white-grey color, and the background to a dark grey color. I believe the colors are in HTML notation. So, if you wanted a blue colored theme, you would simply open up gimp, and copy the HTML notation from the color picker. I'm still doing research into what everything does, but I know that this will change the color of the entire whisker menu. Feel free to play around with this, and tell me what you think! :D

Having fun customizing my XFCE,
JohnBobSmith
Post Reply

Return to “Tutorials”