How to edit the whisker menu? [SOLVED]

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
JohnBobSmith
Level 4
Level 4
Posts: 338
Joined: Wed Nov 06, 2013 5:42 pm
Location: Canada

How to edit the whisker menu? [SOLVED]

Post by JohnBobSmith » Wed Feb 26, 2014 8:01 pm

How do I edit the whisker menu in XFCE? I cant find anything in the settings, and right clicking does very little. Google is proving to be of little help, though I found some files/things of possible interest:

the location

Code: Select all

/usr/share/xfcemint/
looks like it may be of use, particularly the file xfce-applications.menu. I have no idea how to edit that file though, or what its purpose is. If someone could enlighten me on what that file does, it would be appreciated. My best guess is that it controls the whisker menu in some way or another.

I would like to be fully able to customize my whisker menu, even if I need to dig into python/C++ code to do so. If I need to edit the source code, relevant links and tutorials would be appreciated.

Happy Linux modding,
JohnBobSmith
Last edited by JohnBobSmith on Sun Mar 02, 2014 6:52 pm, edited 1 time in total.
Image
If you want to change the world, start by changing yourself.
Success is often 1% inspiration and 99% perspiration.
You get one shot at life, so live to the maximum, not the minimum.

User avatar
karlchen
Level 20
Level 20
Posts: 11501
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: How to edit the whisker menu?

Post by karlchen » Thu Feb 27, 2014 3:03 am

Hello, JohnBobSmith.

There are 2 ways of editing the Mint menu on Linux Mint xfce, with the classical xfce menu or with the WhiskerMenu:
Either follow this tutorial: adding new item in the menu
Or install and use Menu Libre

Kind regards,
Karl
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

User avatar
nomko
Level 10
Level 10
Posts: 3025
Joined: Sat Feb 25, 2012 7:28 pm
Location: The Hague, The Netherlands

Re: How to edit the whisker menu?

Post by nomko » Thu Feb 27, 2014 10:47 am

I recommend MenuLibre. It's an easy to use program to edit the menu of Xfce. It's even better than Alacarte and LXMed.

User avatar
JohnBobSmith
Level 4
Level 4
Posts: 338
Joined: Wed Nov 06, 2013 5:42 pm
Location: Canada

Re: How to edit the whisker menu?

Post by JohnBobSmith » Fri Feb 28, 2014 12:00 pm

I tried using MenuLibre, but I couldnt seem to figure out how to use it... I want to remove a menu entry, like settings or accessories, just as an example. After that, I would like to have control of what menu item appears in which category. For instance, if I think gimp would be better put under the graphics tab instead of accessories, how would i move it there? Again, gimp and the locations are just an example. Also, how would I change the appearence of the text and the icons and their locations?

I should point out that I want to make my own Windows XP theme (with some twists :wink: ), so as to learn more about how XFCE works. Directly editting text files or source code might be a better option. I will continue my research, and post back when I find a solution.
Image
If you want to change the world, start by changing yourself.
Success is often 1% inspiration and 99% perspiration.
You get one shot at life, so live to the maximum, not the minimum.

User avatar
roblm
Level 11
Level 11
Posts: 3632
Joined: Sun Feb 24, 2013 2:41 pm

Re: How to edit the whisker menu?

Post by roblm » Sat Mar 01, 2014 8:29 pm

Update: My last post has info on Mint 18.3 Xfce Applications Menu Editing.


The end of this post has info on Mint 18 Xfce Whisker Menu Icon Editing:


Updated info for creating the Mint 19.1 MATE Applications Menu, which is similar to Xfce’s Applications menu, has been added to this topic:
viewtopic.php?f=206&t=185952



JohnBobSmith,

You can edit the menu manually but it can get tedious and you have to use the Applications Menu that came with previous
Xfce versions, not the Whisker Menu. As an example of what can be done, the menu on the left below is the default Applications
Menu. The middle menu shows a modification of the default menu by removing three program launchers at the top, removing the
Graphics, Internet (Network), and Office categories, and adding a new Favorites category. The menu on the right shows the
three removed program launchers added to the Favorites category and a Mail Reader launcher added.

Xfce 16 menu 1.png

Here's how it's done. First make a backup copy of the configuration file that will be edited by opening the Terminal and
typing: sudo cp /usr/share/xfcemint/xfce-applications.menu /usr/share/xfcemint/xfce-applications.menu.old

Then right click on the panel and select → Add New Item. Select → Applications Menu. Click “Add”. The menu will appear in the
right side of the panel. It can be moved to the left later. Right click on it and select → Properties → Use custom menu file:
In the Menu file window below, browse to → /usr/share/xfcemint/xfce-applications.menu

Click “Open”. Open the File Manager, right click on “File System” on the left and select “Open Folder as Root”. Go to "/usr/share/xfcemint"
and open the file “xfce-applications.menu” for editing. The file is divided into sections, such as the top section, which is named:

Code: Select all

<Menu>  
    <Name>xfce</Name>
and sections corresponding to the menu categories such as:

Code: Select all

<Menu>  
    <Name>Settings</Name>

<Menu>  
    <Name>Accessories</Name>
Each section will end with: </Menu>

Each section may have “Include” and “Exclude” subsections:

Each program must be listed in this format:
<Filename>PROGRAM-NAME.desktop</Filename>

For example:
<Filename>firefox.desktop</Filename>

To hide a program, go to the section of the category it is displayed in the menu and add it to the “Exclude” subsection, such as:

Code: Select all

<Exclude>
    <Filename>firefox.desktop</Filename>
</Exclude>
To add a program to a category, go to the section you want it displayed in and add it to the “Include” subsection, such as:

Code: Select all

<Include>
    <Filename>firefox.desktop</Filename>
</Include>
You may have to create the “Include” or “Exclude” subsections if they don't exist.

To remove a category, just delete it's section, from <Menu> to </Menu>. EDITED: DON'T DELETE THE SECTION.
See my last post on 3-2-14 for instructions.


To add a new category, use this format:

Code: Select all

<Menu>
    <Name>PROGRAM-NAME</Name>
    <Directory>xfce-PROGRAM-NAME.directory</Directory>
</Menu>
For example, to create a category named Favorites:

Code: Select all

<Menu>
    <Name>Favorites</Name>
    <Directory>xfce-favorites.directory</Directory>
    <Include>
        <Filename>firefox.desktop</Filename>
    </Include>
</Menu>
At least one program must be listed before the new category will be displayed.

A tricky part is getting the correct name for the program. It can be the exact name such as “firefox.desktop” for Firefox, or
a more complex name such as “exo-terminal-emulator.desktop” for Terminal Emulator. The easiest way I found is to open as
root the file “/usr/share/aplications”, find the program you're trying to add, right click on it and select “Copy”, and then paste it
into another location. The pasted name will be in the correct form to use. After editing the Applications Menu, move it to the left
side and remove the Whisker Menu.


Mint 18 Xfce Whisker Menu Icon Editing:

This section was just added on 8-14-2016 and it explains how to change icons in the Whisker menu that can't be changed using the menu editor. At the top left corner of the menu is the Mugshot icon. Clicking it brings up the Mugshot screen, which is used to edit the user profile. Click on the picture to change it and select Browse. If you have a photo of yourself, then go to it's location. The photo will also be used to replace the Mugshot icon in the menu. I think the photo should be no larger than 512x512 pixels and it displays better if it’s square in size or close to it. If it’s too large, then open it in GIMP. Click Tools > Transform > Crop to remove the excess background. Then click Image > Scale Image, to further reduce the size if necessary.

To save the image, click File > Export As. Give it a name and save it in the Pictures folder.

Click Export. You may have to click it twice. Close GIMP. You will see a message saying:
Save the changes to image '[name-of-saved-image] (exported)' before closing?
Click Discard Changes.

In the screenshot below, the picture being used is the Mint project founder and lead developer, Clem Lefebvre. The left menu is the original.

Xfce 18 Whisker menu.jpg

The next icon I changed is the Favorites category icon. It uses the help-about.png icon found in /usr/share/icons/Mint-X/actions/24/

I prefer using a star icon. It can be found at /usr/share/icons/gnome/48x48/status/starred.png

To change the icon, use this command to rename the default one:

Code: Select all

sudo mv /usr/share/icons/Mint-X/actions/24/help-about.png /usr/share/icons/Mint-X/actions/24/help-about.png.old
Then copy the starred.png icon to /usr/share/icons/Mint-X/actions/24/:

Code: Select all

sudo cp /usr/share/icons/gnome/48x48/status/starred.png /usr/share/icons/Mint-X/actions/24/
EDITED:
The starred.png icon in folder 24x24 should be used instead of the one in 48x48. Otherwise there will be a huge icon next to the word About when right clicking the menu or the panel and selecting Panel. This is the correct command:

Code: Select all

sudo cp /usr/share/icons/gnome/24x24/status/starred.png /usr/share/icons/Mint-X/actions/24
End of editing.


Then rename the icon to help-about.png:

Code: Select all

sudo mv /usr/share/icons/Mint-X/actions/24/starred.png /usr/share/icons/Mint-X/actions/24/help-about.png
The next icon I changed is the All category icon. I used the penguin icon. The picture came from doing a search on Google Images for penguins. The size of the photo was 230x219 pixels. This needs to be reduced in size using the crop and scaling tools to at least a 48x48 pixel size. To remove the background from the icon, use the instructions in this topic under Making Custom Icons:
viewtopic.php?f=206&t=185952

To save the image, click File > Export As. Name it applications-other.png and save it in the Pictures folder. Click Export twice.

The default icon for the All category is named applications-other.png and is found in /usr/share/icons/Mint-X/categories/24/

Rename the default icon with this command:

Code: Select all

sudo mv /usr/share/icons/Mint-X/categories/24/applications-other.png /usr/share/icons/Mint-X/categories/24/applications-other.png.old
Then copy the applications-other.png icon in the Pictures folder to /usr/share/icons/Mint-X/categories/24/. Substitute your-user-name with your actual user name:

Code: Select all

sudo cp /home/your-user-name/Pictures/applications-other.png /usr/share/icons/Mint-X/categories/24/
The next icon I changed is the Recently Used category icon. It uses the document-open-recent.png icon found in
/usr/share/icons/Mint-X/actions/24/

I used a recycle icon from Google Images and cropped and scaled it down in size in GIMP to 48x48 pixels, using the instructions above for the penguin icon.

EDITED: The icon should be scaled down to 24x24

Save the image as document-open-recent.png in the Pictures folder.

Then rename the default icon with this command:

Code: Select all

sudo mv /usr/share/icons/Mint-X/actions/24/document-open-recent.png /usr/share/icons/Mint-X/actions/24/document-open-recent.png.old
Then copy the document-open-recent.png icon in the Pictures folder to /usr/share/icons/Mint-X/actions/24/. Substitute your-user-name with your actual user name:

Code: Select all

sudo cp /home/your-user-name/Pictures/document-open-recent.png /usr/share/icons/Mint-X/actions/24/
The last icon I changed is the Log Out icon, which is too puny and plain looking. It uses the system-log-out.png icon found in
/usr/share/icons/Mint-X/actions/24/

The icon I used is named system-shutdown.png and found in /usr/share/linuxmint/mintinstall/icons/
This icon is 32x32 pixels. Open the icon in GIMP and click Image > Scale Image. Scale the icon down to 24x24 pixels.
Click File > Export As. Name it system-log-out.png and save it in the Pictures folder. Click Export twice.

UPDATE for Xfce 18.3:
The round system-log-out.png icon is no longer available. Go to /usr/share/icons/Mint-Y/actions/24 and use the square system-shutdown.png icon. It is already 24x24 pixels, so it just needs to be renamed system-log-out.png
End of update info.

Use this command to rename the default icon:

Code: Select all

sudo mv /usr/share/icons/Mint-X/actions/24/system-log-out.png /usr/share/icons/Mint-X/actions/24/system-log-out.png.old
Then use this command to copy the system-log-out.png icon in Pictures to /usr/share/icons/Mint-X/actions/24/. Substitute your-user-name with your actual user name:

Code: Select all

sudo cp /home/your-user-name/Pictures/system-log-out.png /usr/share/icons/Mint-X/actions/24/
Log out and back in.

The icon size used in the menu can be seen by right clicking the menu and selecting Properties. The default size is Small for Item icon size and Smaller for Category icon size. The menu in my picture uses Smaller for both, which I think most people will use. The instructions I gave for changing the icons for the Favorites, Recently Used and All categories will only work when the Item icon size is set to Smaller. If you want to use the Small setting, then folder 24 in the command lines must be changed to 32, or to 48 for Normal setting. For example, change the 24 in the command below:
sudo mv /usr/share/icons/Mint-X/actions/24/help-about.png /usr/share/icons/Mint-/actions/24/help-about.png.old
In my edited menu, you will notice that the icons for GIMP, which is found in the Graphics category, and for Transmission, which is found in the Internet category, are still listed in the Favorites category, but both the Graphics and Internet categories are not displayed. When the category containing a program’s icon is not displayed, the icon will also disappear from the Favorites category, if it was also added there. I didn’t want those two categories displayed because there was only one program in each that I used, except for Firefox, which is on the panel, and the menu would be more compact by removing them. To enable the icons to still be displayed in the Favorties category, I made a new launcher for each program and added them to another displayed category, in this case System.

Other icons that can be changed:

The All Settings icon uses the preferences-desktop.png icon found in /usr/share/icons/Mint-X/categories/24/

The Lock Screen icon uses the system-lock-screen.png icon found in /usr/share/icons/Mint-X/actions/24/
Since pressing Ctrl+Alt+L will also execute the Lock Screen feature, the Lock Screen icon is not needed.

The Switch Users icon uses the config-users.png icon found in /usr/share/icons/Mint-X/apps/24/

This ends the section for the Xfce 18 Whisker menu. My next post continues with editing the Xfce Applications menu.
Last edited by roblm on Wed Feb 13, 2019 2:28 pm, edited 23 times in total.

User avatar
karlchen
Level 20
Level 20
Posts: 11501
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: How to edit the whisker menu?

Post by karlchen » Sat Mar 01, 2014 8:58 pm

Hello, roblm.

Your instructions on how to modify the category structure of the genuine xfce menu may be absolutely correct.
Yet, it is not the answer to the question which JohnBobSmith asked - see the thread title: "How to edit the whisker menu?"
The answer to this question will never be, "Remove the Whisker Menu" and use the default xfce menu instead.
And even if you switch back to the genuine xfce menu, you can still modify it with the help of menu-libre.
Honestly, a person who considers menu-libre too complicated will hardly manage to follow your steps, because manually modifying the /usr/share/xfcemint/xfce-applications.menu file is much more complex than using menu-libre.

Kind regards,
Karl
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

User avatar
roblm
Level 11
Level 11
Posts: 3632
Joined: Sun Feb 24, 2013 2:41 pm

Re: How to edit the whisker menu?

Post by roblm » Sat Mar 01, 2014 9:24 pm

Hi Karl,

I agree that manually editing the Applications Menu's configuration file is a lot more difficult. The reason I suggested
that is because JohnBobSmith also asked how to remove menu categories like Settings and Accessories, which cannot
be done with MenuLibre. From the little time I've tested MenuLibre, it appears that adding program launchers to other
categories is not easy either, which he also asked about.

User avatar
karlchen
Level 20
Level 20
Posts: 11501
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: How to edit the whisker menu?

Post by karlchen » Sun Mar 02, 2014 10:30 am

Hi, roblm.

I agree with anybody who - explicitly or implicitly - complains that modifying the Mint menus is more complex than modifying the Windows menus.
Menu-libre requires some understanding on how Linux menus work internally, too.

About removing categories:
I think the conflicting ideas here are:
The users expect to be able to really remove the categories. The menu-editors only allow you to hide them from being displayed. Without manually editing the xfce-applications.menu XML file you cannot remove categories.
I think that the menu-editors all allow hiding menu categories, but do not actually remove them for a simple reason: Things you have just made invisible can be easily unhidden with a simply mouse click. Things have been really deleted need to be recreated. So in effect menu-editors protect users from destroying the underlying menu structure.

Cheers,
Karl
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

User avatar
JohnBobSmith
Level 4
Level 4
Posts: 338
Joined: Wed Nov 06, 2013 5:42 pm
Location: Canada

Re: How to edit the whisker menu?

Post by JohnBobSmith » Sun Mar 02, 2014 4:04 pm

The reason that I barked about MenuLibre is that I really cant figure out how to use it. Right clicking on any of the icons does nothing; it behaves like a left click. There does not appear to be a way to remove an entire menu entry. By "remove" I mean make it so that its not visible. It may not appear to be that hard to use, but for me it is.

I honestly prefer typing things into a terminal and editting things manually. That way I can learn more about Linux, how it works, what exactly I am doing, why I am doing it, etc. I am not one of those hardcore users where terminal is a must for everything. I just perfer the terminal over GUI's that I don't understand. roblm's instructions made sense to me, so thats not an issue.

I am thinking of going back to the previous XFCE menu. The whisker menu seems like more work than its worth, and I do not like it anyways. If someone could point me in the right direction for disabling the whisker menu, that'd be great. :)
Image
If you want to change the world, start by changing yourself.
Success is often 1% inspiration and 99% perspiration.
You get one shot at life, so live to the maximum, not the minimum.

User avatar
karlchen
Level 20
Level 20
Posts: 11501
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: How to edit the whisker menu?

Post by karlchen » Sun Mar 02, 2014 5:02 pm

Hello, JohnBobSmith.
If someone could point me in the right direction for disabling the whisker menu, that'd be great.
  • Launch [Menu] => Settings => Panel.
  • Inside the "Panel" dialogue box, click on the tab "Objects".
  • Press the [+] button.
    From the list of "New elements", select the item "Application Menu".
    Click the [Add] button.
  • Use the up arrow button and move the item "Application Menu" to the top of the list.
  • Select the "Whisker Menu". Click on the red [X] button thus disabling the Whisker Menu.
  • Select the item "Application Menu". Click on the edit button. This is the button below the red [X] button.
  • In the "Application Menu" properties dialogue, add the string "Menu" to the field "button title".
  • Go down to the area "Menu file". Click the option (*) Custom application menu file.
  • Make sure the filename in the edit box below reads

    Code: Select all

    /usr/share/xfcemint/xfce-applications.menu
  • Click [Close]. Click [Close]
  • The Whisker Menu should be gone. Instead clicking on the [Menu] button should open the genuine Linux Mint xfce menu.
HTH,
Karrl
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

User avatar
roblm
Level 11
Level 11
Posts: 3632
Joined: Sun Feb 24, 2013 2:41 pm

Re: How to edit the whisker menu?

Post by roblm » Sun Mar 02, 2014 5:48 pm

JohnBobSmith,

The information for my first post came from a Mint Xfce 16 installation running in VirtualBox, but I've just installed it on my extra
partition to check for differences. In VirtualBox I could not create program launchers using MenuLibre but I could do that on a
Mint 14 Xfce installation on another computer. I tried MenuLibre again on the installed Xfce 16 and it now works.

MenuLibre cannot be used to hide or permanently remove menu categories or create new categories.

EDITED 3-13-14: Older versions of MenuLibre (Precise, Raring, and Quantal) can not hide or create menu categories.
I had used version 13.04 (Raring) because I was having problems installing other versions on my Xfce 16 installation running in
VirtualBox. I got the information from this Launchpad site: https://launchpad.net/menulibre

Newer versions (Saucy and Trusty), can hide and create categories. The picture on the left below is the older version and the
picture on the right is the newer version:
MenuLibre.png
However, after installing Xfce 16 on an extra partition and then testing the newer versions, I ran into a major problem. I could only
perform two menu editing actions and then MenuLibre would quit and not open again. The action could be hiding a menu category,
hiding a category app, or creating a new program launcher. The newer version also installs the package “python3-psutil”.

I tried uninstalling MenuLibre and then reinstalling it several times, but it still would not open. I also removed “python3-psutil”. I installed
all the updates, tried rebooting many times and even running the command “sudo apt-get remove --purge menulibre”. I then restored
a backup image of my fresh Xfce installation and tried everything over two more times and got the same result.

I then installed the older version (Raring), and it worked perfectly, just as before. So if you're having this same problem, then I
recommend installing the older version (Raring) from the link above. Or just copy these two lines:

deb http://ppa.launchpad.net/menulibre-dev/devel/ubuntu raring main
deb-src http://ppa.launchpad.net/menulibre-dev/devel/ubuntu raring main

Then open Software Sources and click on "Additional repositories". Click on "Add a new repository", and paste the two lines. Click OK
and then click "Update the cache". Open the Terminal and type: sudo apt-get install menulibre
Last edited by roblm on Sat Mar 15, 2014 2:39 pm, edited 4 times in total.

User avatar
JohnBobSmith
Level 4
Level 4
Posts: 338
Joined: Wed Nov 06, 2013 5:42 pm
Location: Canada

Re: How to edit the whisker menu?

Post by JohnBobSmith » Sun Mar 02, 2014 6:43 pm

karlchen wrote: ...
  • Launch [Menu] => Settings => Panel.
  • Inside the "Panel" dialogue box, click on the tab "Objects".
...
HTH,
Karrl
I dont see the objects tab, is there something I need to do to enable it?
Image
If you want to change the world, start by changing yourself.
Success is often 1% inspiration and 99% perspiration.
You get one shot at life, so live to the maximum, not the minimum.

User avatar
JohnBobSmith
Level 4
Level 4
Posts: 338
Joined: Wed Nov 06, 2013 5:42 pm
Location: Canada

Re: How to edit the whisker menu?

Post by JohnBobSmith » Sun Mar 02, 2014 6:51 pm

The objects tab is german for items. I followed the above steps, and voila, I now have the default XFCE menu! Following roblm's instructions, I should be able to customize it to my hearts desire.

Thanks for all the help, topic solved.
Image
If you want to change the world, start by changing yourself.
Success is often 1% inspiration and 99% perspiration.
You get one shot at life, so live to the maximum, not the minimum.

User avatar
karlchen
Level 20
Level 20
Posts: 11501
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: How to edit the whisker menu?

Post by karlchen » Sun Mar 02, 2014 7:51 pm

JohnBobSmith wrote:The objects tab is german for items.
Oh really?! Too bad, I had launched the settings manager like this to switch to genuine American English:

Code: Select all

env LANG=en_US.UTF-8 xfce4-settings-manager
The System Settings were displayed in English as a result, but as soon as I clicked on "Panel", the panel dialogue box came up in German. But I thought "Objekte" (German) will be "Objects" (English). Good you found the right tab nonetheless. Hopefully next time I will remember the genuine English tab name is "Items".

Karl
[/size]
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

User avatar
roblm
Level 11
Level 11
Posts: 3632
Joined: Sun Feb 24, 2013 2:41 pm

Re: How to edit the whisker menu? [SOLVED]

Post by roblm » Sun Mar 02, 2014 10:17 pm

JohnBobSmith,

After doing some more testing I found out that to remove a menu category, it doesn't have to be deleted from the
“xfce-applications.menu” file. For example, looking at the section for the Graphics category below:

Code: Select all

<Menu>
      <Name>Graphics</Name>
        <Directory>xfce-graphics.directory</Directory>
        <Include>
            <Category>Graphics</Category>
        </Include>
   </Menu>
The two “Include” lines that are above and below the line: <Category>Graphics</Category>
will be changed to “Exclude”. So the edited section will look like this to hide the category:

Code: Select all

<Menu>
      <Name>Graphics</Name>
        <Directory>xfce-graphics.directory</Directory>
        <Exclude>
            <Category>Graphics</Category>
        </Exclude>
   </Menu>
Some category sections have a little different layout and have more than one "Category" line which may not contain the
actual category name. Just change the “Include” words to “Exclude”. For example, the Multimedia section.

Code: Select all

<Menu>
        <Name>Multimedia</Name>
        <Directory>xfce-multimedia.directory</Directory>
        <Include>
            <Category>Audio</Category>
            <Category>Video</Category>
            <Category>AudioVideo</Category>
        </Include>
    </Menu>
The “Internet” section is called “Network”.
Sometimes after editing a category the change doesn't appear in the menu after saving it. I found that after saving it a second
time, then the menu change will appear.

I created the menu on the right below as an example to help you get started. The default menu is on the left. The edited
configuration file that goes with this menu is also listed below. The top part of this menu is used as a Favorites section. You can
add separators. To add an app (application) to this section, you need to edit the first section of the file under <Name>Xfce</Name>.
In this section any app that you want to add has to be listed in both the “Include” and “Layout” subsections.
Xfce-16-menu-4.png

Code: Select all

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
  "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">

<Menu>
    <Name>Xfce</Name>
    <DefaultAppDirs/>
    <DefaultDirectoryDirs/>
    <DefaultMergeDirs/>

    <Include>
        <Category>X-Xfce-Toplevel</Category>
        <Filename>mint-xfce4-lock.desktop</Filename>
	     <Filename>extras-menulibre.desktop</Filename>
        <Filename>xfce4-screenshooter.desktop</Filename>
        <Filename>transmission-gtk.desktop</Filename>
        <Filename>exo-terminal-emulator.desktop</Filename>
    </Include>

    <Exclude>
        <Filename>exo-mail-reader.desktop</Filename>
        <Filename>exo-file-manager.desktop</Filename>
        <Filename>exo-web-browser.desktop</Filename>
        <Filename>mintInstall.desktop</Filename>
        <Filename>mint-xfce4-lock.desktop</Filename>
    </Exclude>
        
    <Layout>
        <Filename>xfce4-run.desktop</Filename>
        <Filename>extras-menulibre.desktop</Filename>
        <Filename>xfce4-screenshooter.desktop</Filename>
        <Filename>transmission-gtk.desktop</Filename>
        <Filename>exo-terminal-emulator.desktop</Filename>
        <Filename>exo-file-manager.desktop</Filename>
        <Filename>exo-web-browser.desktop</Filename>
        <Filename>mintInstall.desktop</Filename>
        <Separator/>
        <Separator/>
        <Merge type="all"/>
        <Separator/>
        <Separator/>
        <Filename>xfhelp4.desktop</Filename>
        <Filename>xfce4-about.desktop</Filename>
        <Filename>xfce4-session-logout.desktop</Filename>
    </Layout>

    <Menu>
        <Name>Accessories</Name>
        <Directory>xfce-accessories.directory</Directory>
        <Include>
            <Or>
	        <Filename>evince.desktop</Filename>
                <Category>Accessibility</Category>
                <Category>Core</Category>
                <Category>Legacy</Category>
                <Category>Utility</Category>
            </Or>
        </Include>
        <Exclude>
            <Or>
	        <Filename>exo-file-manager.desktop</Filename>
	        <Filename>Thunar-bulk-rename.desktop</Filename>
	        <Filename>xfce4-run.desktop</Filename>
                <Filename>exo-terminal-emulator.desktop</Filename>
                <Filename>xfce4-about.desktop</Filename>                
            </Or>
        </Exclude>
    </Menu>

    <Menu>
        <Name>Development</Name>
        <Directory>xfce-development.directory</Directory>
        <Include>
            <Category>Development</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Education</Name>
        <Directory>xfce-education.directory</Directory>
        <Include>
            <Category>Education</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Games</Name>
        <Directory>xfce-games.directory</Directory>
        <Include>
            <Category>Games</Category>
        </Include>
    </Menu>

    <Menu>
      <Name>Graphics</Name>
        <Directory>xfce-graphics.directory</Directory>
        <Include>
            <Category>Graphics</Category>
        </Include>
   </Menu>

   <Menu>
      <Name>Favorites</Name>
        <Directory>xfce-favorites.directory</Directory>
        <Exclude>
            <Category>favorites</Category>
            <Filename>extras-menulibre.desktop</Filename>
        </Exclude>
   </Menu>

   <Menu>
        <Name>Multimedia</Name>
        <Directory>xfce-multimedia.directory</Directory>
        <Include>
            <Category>Audio</Category>
            <Category>Video</Category>
            <Category>AudioVideo</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Network</Name>
        <Directory>xfce-network.directory</Directory>
        <Exclude>
            <Category>Network</Category>
        </Exclude>
        <Exclude>
            <Or>
                <Filename>exo-web-browser.desktop</Filename>
                <Filename>exo-mail-reader.desktop</Filename>
            </Or>
        </Exclude>
    </Menu>

    <Menu>
        <Name>Office</Name>
        <Directory>xfce-office.directory</Directory>
        <Exclude>
            <Category>Office</Category>
        </Exclude>
	<Exclude>
	  <Or>
	       <Filename>evince.desktop</Filename>
	  </Or>
	</Exclude>
    </Menu>
    
    <Menu>
        <Name>Settings</Name>
        <Directory>xfce-settings.directory</Directory>
        <Include>
            <Category>Settings</Category>
        </Include>
        <Exclude>
            <Category>System</Category>
            <Filename>xscreensaver-properties.desktop</Filename>
        </Exclude>
        <Menu>
            <Name>Screensavers</Name>
            <Directory>xfce-screensavers.directory</Directory>
            <Include>
                <Category>Screensaver</Category>
            </Include>
        </Menu>
    </Menu>
 
    <Menu>
        <Name>System</Name>
        <Directory>xfce-system.directory</Directory>
        <Include>
            <Or>
                <Category>Emulator</Category>
                <Category>System</Category>
            </Or>
        </Include>
        <Exclude>
            <Or>
	        <Filename>Thunar.desktop</Filename>
                <Filename>xfce4-session-logout.desktop</Filename>
            </Or>
        </Exclude>
    </Menu>

    <Menu>
        <Name>Other</Name>
        <Directory>xfce-other.directory</Directory>
        <OnlyUnallocated/>
      <Exclude>
            <All/>
        </Exclude>
    </Menu>

</Menu>

User avatar
JohnBobSmith
Level 4
Level 4
Posts: 338
Joined: Wed Nov 06, 2013 5:42 pm
Location: Canada

Re: How to edit the whisker menu? [SOLVED]

Post by JohnBobSmith » Mon Mar 03, 2014 8:14 pm

Thanks roblm. I have on more question though, how could I add icons to the menu itself? What determines how the icons look? From there, I should be able to make a crude windows XP theme. :)

EDIT:
Also, what are all the <Or> and </Or> tags?
Image
If you want to change the world, start by changing yourself.
Success is often 1% inspiration and 99% perspiration.
You get one shot at life, so live to the maximum, not the minimum.

User avatar
roblm
Level 11
Level 11
Posts: 3632
Joined: Sun Feb 24, 2013 2:41 pm

Re: How to edit the whisker menu? [SOLVED]

Post by roblm » Tue Mar 04, 2014 9:53 pm

JohnBobSmith,

Are you asking how to change the icons for the categories? It appears that each system category has a unique, fixed icon
assigned to it, and any new category you create is given the same icon, but I'm still investigating if this can be changed. One
way to more easily identify the categories you create is to segregate them into a section of the menu. For example, I created
three categories named “Favorites”, “I Love Xfce” and “Windows Memories”. Using this line of code:
<Menuname>CATEGORY-NAME</Menuname>

I will add these three lines:
<Menuname>Favorites</Menuname>
<Menuname>I Love Xfce</Menuname>
<Menuname>Windows Memories</Menuname>

to the “Layout” subsection of the top “<Name>Xfce</Name>” section. They can be placed above the system categories by
adding them above the line “<Merge type="all"/>”, or below the system categories by adding them below that line. Click on the
picture below:
Xfce-menu-6.png
I'm not sure what the <Or> and </Or> tags are for. I don't think I remember seeing them used in any Javascript code or HTML
code I've read. I could not find any information on them from doing a Google search either. I'm wondering if only Linux developers
use them? From my testing, whether you leave them or remove them, they seem to have no effect on adding or hiding apps or
categories. I never used them.
Also, the lines of code in the menu configuration file don't have to be positioned in any perfect alignment. They can all be lined up
with the left margin if it's easier that way.

I would recommend to you or anyone else trying to edit the Xfce menu to use MenuLibre first to hide all the apps you probably
won't use because it's a lot quicker (use the older version if the newer version does not work correctly). However, if an app is in
the Favorites section of the menu, then don't hide it in any other category where it's listed if you're using MenuLibre, or it will
disappear from the Favorites section also. However, if you're editing the menu's configuration file, then you can hide the app in a
category and it will not disappear from the Favorites section.

To add an application's icon to the panel, open the file manager and go to "/usr/share/applications". Click on the app you want to add
and drag it to the panel, just to the right of the menu button until a red line appears, and then release the mouse button. A pop-up
message will appear. Click "Create Launcher". Then right click on the new icon and select "Move". A red line will appear which can be
moved to the position on the panel that you want the app's icon.

EDITED 3-16-14:
Custom icons made for the three created categories:
Xfce 16 menu 16.png

EDITED 3-16-14:
This is an update of new information I got from searching and testing. The configuration file for the Whisker menu is found at
"/home/user-name/.config/menus/xfce-applications.menu". It's a hidden file. I had searched for it previously but couldn't find it because it didn't show up when running Mint 16 Xfce in VirtualBox, but only appears after an actual installation. It can be edited similarly to the Applications menu using the same instructions I gave in my previous posts, but so far I cannot add a new category or a subcategory. You can't remove the search window and the “Favorites” and “Recently Used” categories. I also prefer the Shutdown icon to be at the bottom left area. I still like the modified Applications menu better. The edited Whisker menu in shown in the image in the middle above and it's edited configuration file is below:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE Menu
  PUBLIC '-//freedesktop//DTD Menu 1.0//EN'
  'http://standards.freedesktop.org/menu-spec/menu-1.0.dtd'>
<Menu>
	<Name>Xfce</Name>
	<DefaultAppDirs />
	<DefaultDirectoryDirs />
	<DefaultMergeDirs />
	<Include>
		<Category>X-Xfce-Toplevel</Category>
	</Include>
	<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile>
	<Menu>
		<Name>Preferences</Name>
		<Directory>xfce-settings.directory</Directory>
		<Menu>
			<Name>Screensavers</Name>
			<Directory>xfce-screensavers.directory</Directory>
			<Layout>
				<Merge type="menus" />
				<Filename>abstractile.desktop</Filename>
				<Merge type="files" />
			</Layout>
		</Menu>
		<Layout>
			<Merge type="menus" />
			<Separator />
			<Filename>apturl_mime.desktop</Filename>
			<Filename>mintBackup.desktop</Filename>
			<Filename>mintBackup_mime.desktop</Filename>
			<Filename>blueman-manager.desktop</Filename>
			<Filename>vino-preferences.desktop</Filename>
			<Filename>gnome-disks.desktop</Filename>
			<Filename>mintNanny.desktop</Filename>
			<Filename>mintdrivers.desktop</Filename>
			<Filename>thunar-settings.desktop</Filename>
			<Filename>itweb-settings.desktop</Filename>
			<Filename>im-config.desktop</Filename>
			<Filename>language-selector.desktop</Filename>
			<Filename>mdmsetup.desktop</Filename>
			<Filename>menulibre.desktop</Filename>
			<Filename>nm-connection-editor.desktop</Filename>
			<Filename>openjdk-7-policytool.desktop</Filename>
			<Filename>seahorse.desktop</Filename>
			<Filename>thunar-volman-settings.desktop</Filename>
			<Filename>xscreensaver-properties.desktop</Filename>
			<Menuname>Screensavers</Menuname>
			<Filename>mintInstall_mime.desktop</Filename>
			<Filename>mintInstall.desktop</Filename>
			<Filename>mintsources.desktop</Filename>
			<Filename>synaptic.desktop</Filename>
			<Filename>mintUpdate.desktop</Filename>
			<Filename>mintupload.desktop</Filename>
			<Filename>mintWelcome.desktop</Filename>
			<Merge type="files" />
		</Layout>
	</Menu>
	<Menu>
		<Name>Preferences</Name>
		<Directory>xfce-settings.directory</Directory>
		<Menu>
			<Name>Screensavers</Name>
			<Directory>xfce-screensavers.directory</Directory>
			<Layout>
				<Merge type="menus" />
				<Merge type="files" />
			</Layout>
		</Menu>
		<Layout>
			<Merge type="menus" />
			<Separator />
			<Menuname>Screensavers</Menuname>
			<Merge type="files" />
		</Layout>
	</Menu>
	<Menu>
		<Name>Accessories</Name>
		<Directory>xfce-accessories.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>xfce4-appfinder.desktop</Filename>
			<Filename>file-roller.desktop</Filename>
			<Filename>Thunar-bulk-rename.desktop</Filename>
			<Filename>gcalctool.desktop</Filename>
			<Filename>catfish.desktop</Filename>
			<Filename>gucharmap.desktop</Filename>
			<Filename>gnome-disks.desktop</Filename>
			<Filename>evince.desktop</Filename>
			<Filename>gnome-font-viewer.desktop</Filename>
			<Filename>yelp.desktop</Filename>
			<Filename>gkbd-keyboard-display.desktop</Filename>
			<Filename>menulibre.desktop</Filename>
			<Filename>Thunar-folder-handler.desktop</Filename>
			<Filename>gksu.desktop</Filename>
			<Filename>xfce4-screenshooter.desktop</Filename>
			<Filename>xfce4-taskmanager.desktop</Filename>
			<Filename>gedit.desktop</Filename>
			<Filename>Thunar.desktop</Filename>
			<Filename>tomboy.desktop</Filename>
			<Filename>mintstick.desktop</Filename>
			<Filename>mintstick-format.desktop</Filename>
			<Filename>xfburn.desktop</Filename>
			<Merge type="files" />
		</Layout>
	</Menu>
	<Menu>
		<Name>Development</Name>
		<Directory>xfce-development.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>python2.7.desktop</Filename>
			<Filename>python3.3.desktop</Filename>
			<Merge type="files" />
		</Layout>
	</Menu>
	<Menu>
		<Name>Education</Name>
		<Directory>xfce-education.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>libreoffice-math.desktop</Filename>
			<Merge type="files" />
		</Layout>
	</Menu>
	<Menu>
		<Name>Games</Name>
		<Directory>xfce-games.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Merge type="files" />
		</Layout>
	</Menu>
	<Menu>
		<Name>Graphics</Name>
		<Directory>xfce-graphics.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>gimp.desktop</Filename>
			<Filename>gthumb.desktop</Filename>
			<Filename>gthumb-import.desktop</Filename>
			<Filename>libreoffice-draw.desktop</Filename>
			<Filename>ristretto.desktop</Filename>
			<Filename>simple-scan.desktop</Filename>
			<Merge type="files" />
		</Layout>
	        <Exclude>
                    <Category>Graphics</Category>
                </Exclude>  
        </Menu>
	<Menu>
		<Name>Network</Name>
		<Directory>xfce-network.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>new-launcher.desktop</Filename>
			<Filename>vino-preferences.desktop</Filename>
			<Filename>firefox.desktop</Filename>
			<Filename>icedtea-netx-javaws.desktop</Filename>
			<Filename>pidgin.desktop</Filename>
			<Filename>thunderbird.desktop</Filename>
			<Filename>transmission-gtk.desktop</Filename>
			<Filename>xchat.desktop</Filename>
			<Merge type="files" />
		</Layout>
	        <Exclude>
                   <Category>Network</Category>
                </Exclude> 
        </Menu>
	<Menu>
		<Name>Multimedia</Name>
		<Directory>xfce-multimedia.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>banshee-media-player.desktop</Filename>
			<Filename>banshee.desktop</Filename>
			<Filename>banshee-audiocd.desktop</Filename>
			<Filename>pavucontrol.desktop</Filename>
			<Filename>totem.desktop</Filename>
			<Filename>vlc.desktop</Filename>
			<Filename>xfburn.desktop</Filename>
			<Merge type="files" />
		</Layout>
	        <Exclude>
                   <Category>Audio</Category>
                   <Category>Video</Category>
                   <Category>AudioVideo</Category> 
               </Exclude> 
        </Menu>
	<Menu>
		<Name>Office</Name>
		<Directory>xfce-office.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>xfce4-dict.desktop</Filename>
			<Filename>libreoffice-startcenter.desktop</Filename>
			<Filename>libreoffice-base.desktop</Filename>
			<Filename>libreoffice-calc.desktop</Filename>
			<Filename>libreoffice-draw.desktop</Filename>
			<Filename>libreoffice-impress.desktop</Filename>
			<Filename>libreoffice-math.desktop</Filename>
			<Filename>libreoffice-writer.desktop</Filename>
			<Merge type="files" />
		</Layout>
	        <Exclude>
                   <Category>Office</Category>
                </Exclude> 
        </Menu>
        <Menu>
		<Name>Other</Name>
		<Directory>xfce-other.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>gcr-prompter.desktop</Filename>
			<Filename>signon-ui-browser-process.desktop</Filename>
			<Filename>panel-desktop-handler.desktop</Filename>
			<Filename>gnome-disk-image-mounter.desktop</Filename>
			<Filename>libreoffice-xsltfilter.desktop</Filename>
			<Filename>metacity.desktop</Filename>
			<Filename>mono-runtime.desktop</Filename>
			<Filename>mono-runtime-terminal.desktop</Filename>
			<Filename>nm-applet.desktop</Filename>
			<Filename>openjdk-7-java.desktop</Filename>
			<Filename>gcr-viewer.desktop</Filename>
			<Merge type="files" />
		</Layout>
	</Menu>
	<Menu>
		<Name>System</Name>
		<Directory>xfce-system.directory</Directory>
		<Layout>
			<Merge type="menus" />
			<Filename>apturl_mime.desktop</Filename>
			<Filename>mintBackup_mime.desktop</Filename>
			<Filename>mintBackup.desktop</Filename>
			<Filename>Thunar-bulk-rename.desktop</Filename>
			<Filename>baobab.desktop</Filename>
			<Filename>mintNanny.desktop</Filename>
			<Filename>mintdrivers.desktop</Filename>
			<Filename>gdebi.desktop</Filename>
			<Filename>gkbd-keyboard-display.desktop</Filename>
			<Filename>mdmsetup.desktop</Filename>
			<Filename>mdmflexiserver.desktop</Filename>
			<Filename>Thunar-folder-handler.desktop</Filename>
			<Filename>hplj1020.desktop</Filename>
			<Filename>mintInstall.desktop</Filename>
			<Filename>mintInstall_mime.desktop</Filename>
			<Filename>mintsources.desktop</Filename>
			<Filename>synaptic.desktop</Filename>
			<Filename>xfce4-taskmanager.desktop</Filename>
			<Filename>Thunar.desktop</Filename>
			<Filename>mintUpdate.desktop</Filename>
			<Filename>mintupload.desktop</Filename>
			<Filename>xfce4-terminal.desktop</Filename>
			<Merge type="files" />
		</Layout>
	    <Include>
               <Category>System</Category>
            </Include>
            <Exclude>
               <Category>System</Category>  
               <Filename>Thunar-bulk-rename.desktop</Filename>
               <Filename>xfce4-session-logout.desktop</Filename>
           </Exclude>
        </Menu> 
         
         <Menu>
            <Name>All</Name>
	    <Include>
               <Filename>gimp.desktop</Filename>
               <Filename>transmission-gtk.desktop</Filename>
            </Include>  
        </Menu>
       
        <Layout>
		<Merge type="menus" />
		<Menuname>Preferences</Menuname>
		<Separator />
		<Separator />
		<Menuname>Preferences</Menuname>
		<Separator />
		<Menuname>Accessories</Menuname>
		<Menuname>Development</Menuname>
		<Menuname>Education</Menuname>
		<Menuname>Games</Menuname>
		<Menuname>Graphics</Menuname>
		<Menuname>Network</Menuname>
		<Menuname>Multimedia</Menuname>
		<Menuname>Office</Menuname>
		<Menuname>Other</Menuname>
		<Menuname>System</Menuname>
		<Separator />
		<Merge type="files" />
	</Layout>
</Menu>
EDITED 3-22-14:
Here's how to change the icon of a system category. Open Thunar and go to /usr/share/ . Right click on “desktop-directories”
and select “Open Folder as Root”. Find the file of the category you want to change, for example we will use the
“xfce-graphics.directory”. First make a copy of it by right clicking on it and selecting “Copy” and then paste it in the empty space.
Open the real file and in the line “Icon=applications-graphics”, add the full path to the new icon after “Icon=”. For example, if the
new icon is named “graphics2.png” and is found in “/usr/share/icons/Mint-X/apps/48/ “, then the line will be changed to:
Icon=/usr/share/icons/Mint-X/apps/48/graphics2.png
Save the file.
If you make any new category, it will be assigned the same default icon. See my 5th post to see it. To change it is a little more
involved. First add the new category to the Xfce configuration file. Then open “/usr/share/desktop-directories” as root. Right click
in the empty space and select → Create Document → Empty file. Type the name of the new category using this format:
xfce-NAME.directory.
If the name has more than one word, such as “I Love Xfce”, then it needs to be typed like this with hyphens:
xfce-I-Love-Xfce.directory
Open the file and add these lines:

[Desktop Entry]
Name=
Icon=

Add the name of the new category after “Name=”. It should be the actual name, so no hyphens have to be added here.
So in the example above, just "I Love Xfce" will be added. Add the full path to the icon after “Icon=”.

Icons are found at “/usr/share/icons” and “/usr/share/linuxmint/mintinstall/icons/”, but the latter site has 32x32 pixel icons. You can
also make a custom icon as I do sometimes using GIMP and keep it in “/home/username/Pictures”. I prefer using at least 48x48
pixel icons. Any editing that is done may have to be saved twice sometimes before it is displayed correctly.

This worked for Xfce 16 but in Xfce 17 it is different. For example, to create a custom icon for the ALL category:
As root, go to /usr/share/desktop-directories. Create an xfce-all.directory file. Add these lines to it:

Code: Select all

[Desktop Entry]
Type=Directory
Name=ALL
Icon=xfce-all
In GIMP create a 48x48 pixel icon (can be 32x32 pixels also). Save it as xfce-all.png, and then copy it. Open /usr/share/icons/Mint-X/categories/48 as root. Paste the icon.

For Mint 17.1, a folder named ".icons" must be created in /home/user-name, and the icon must also be added to it, in addition to the location above.

How to add a subcategory to any category:
As an example, a new category named “Favorites” will be added as a subcategory to the Graphics category. These lines will be
added to the Graphics section of the Xfce configuration file:

Code: Select all

<Menu>
   <Name>Favorites</Name>
   <Directory>xfce-favorites.directory</Directory>
   <Include>
       <Category>Favorites</Category>
       <Filename>gimp.desktop</Filename>
   </Include>
</Menu>
The line “<Filename>gimp.desktop</Filename>” is added because at least one app has to be listed in the category before it
will be displayed.

So the Graphics section will look like this:

Code: Select all

<Menu>
  <Name>Graphics</Name>
   <Directory>xfce-graphics.directory</Directory>
   <Include>
       <Category>Graphics</Category>
       <Filename>gimp.desktop</Filename>
  </Include>

  <Menu>
    <Name>Favorites</Name>
     <Directory>xfce-favorites.directory</Directory>
     <Include>
         <Category>Favorites</Category>
         <Filename>gimp.desktop</Filename>
     </Include>
  </Menu>

</Menu>
Then a file named “xfce-Favorites.directory” will have to be created in “/usr/share/desktop-directories” using the previous instructions. You can also add any system category, such as Other, as a subcategory. It is already listed in “desktop-directories”. It will be assigned the default icon for that category, but you can change it.

To change the default icon for an application, go to “/usr/share/applications”. Right click on the app and select “Properties”. Click on
the icon and select a different one. If this doesn't work then go to “/home/username/.locale/share/applications” and look for the app
here. Right click on the app and select “Properties”. I noticed that after selecting a different icon here, the picture of the icon did not
change in this file but it did change in the menu. MenuLibre can also be used to change icons.

I also changed the style of the menu from Mint-X to Xfce in Settings → Appearance
This increases the size of the icons on the panel and darkens the separator lines in the menu.

EDITED 4-2-14:
To change the default Xfce applications menu icon size, go to “/home/user-name/.config/xfce4/xfconf/xfce-perchannel-xml/”
First make a backup copy by right clicking on the “xsettings.xml” file and selecting “Copy”, and then pasting it into the empty
space. Then open the file and go down to the line: <property name="IconSizes" type="empty"/>

and change it to this:

Code: Select all

<property name="IconSizes" type="string" value="gtk-menu=16,16:gtk-button=20,20:panel-applications-menu=16,16:panel-directory-menu=24,24"/>
Increase the two numbers in the section “panel-applications-menu=16,16” to increase the icon size. For example, to change the icon size to the size in the image on the right in the picture above, then change the numbers to 22,22. Save the file and log out and back in or reboot to see the change.

EDITED: Incredibly, for Mint 17 this has been changed. The two numbers in the section "gtk-menu=16,16" need to be increased,
not the section "panel-applications-menu=16,16"


For Xfce 17.1, change all the numbers to 23,23. Change the value in the “gtk-menu=x,x” section to change the icon size.

To change the menu text size go to Settings → Appearance. Click the “Fonts” tab. Click on the font name under “Default Font” and
increase the default size 9 to 10 or higher. Or under “DPI”, increase the default size of 96 to 98 or higher. These are global settings,
so the text size will also increase in other applications.
Last edited by roblm on Fri Apr 06, 2018 2:45 pm, edited 5 times in total.

User avatar
roblm
Level 11
Level 11
Posts: 3632
Joined: Sun Feb 24, 2013 2:41 pm

Re: How to edit the whisker menu? [SOLVED]

Post by roblm » Wed Mar 05, 2014 9:45 pm

At the end of this post is: Update: Mint 18.3 Xfce Applications Menu Editing:


JohnBobSmith,

Here is an update of some more information I got from testing that might be of interest to you or anyone else trying to use this
menu. The menu in the picture in this link has an All category: https://imgur.com/a/mOyHS

Unlike the All categories in the Whisker menu and Cinnamon menu, this one shows almost all the apps at once, so you don't need to do a lot of scrolling. To add it, add these lines of code to the lower section of the menu's configuration file. Open the file by typing this command in the Terminal:
gksudo gedit /usr/share/xfcemint/xfce-applications.menu

Code: Select all

<Menu>
   <Name>All</Name>
    <Directory>xfce-all.directory</Directory>
    <Include>
       <All/> 
    </Include>
 </Menu>

If you want the category to be listed in the position as shown then also add this line to the “Layout” section at the beginning of the
file, above the line “<Merge type="all"/>”:
<Menuname>All</Menuname>

Here are two more menus in the picture below. The menu on the top right is to help new users make the transition from Windows
to Linux Mint easier. It attempts to duplicate the Windows XP classic menu, which is displayed on the top left.

Since gaming is expanding in Linux, the menu on the bottom has a Games category with subcategories to help gamers with lots of
games organize them into their different classes or genre.

xfce windows menu.png

To add it, lines of code will be added to the Games section, between the lines “</Include>” and “</Menu>” below:

Code: Select all

<Menu>
   <Name>Games</Name>
   <Directory>xfce-games.directory</Directory>
   <Include>
       <Category>Games</Category>
   </Include>
</Menu>
Add these lines:

Code: Select all

<Layout>
  <Merge type="menus"/>
  <Merge type="files"/>
</Layout>
 
<Menu>
  <Name>Action</Name>
  <Directory>ActionGames.directory</Directory>
  <Include>
    <Category>ActionGame</Category>
    <Filename>xscreensaver-properties.desktop</Filename>
  </Include>
/Menu>

<Menu>
  <Name>Other</Name>
  <Directory>xfce-other.directory</Directory>
  <Include>
    <Category>Other</Category>
    <Filename>xscreensaver-properties.desktop</Filename>
  </Include>
</Menu>

<Menu>
  <Name>Role Playing</Name>
  <Directory>RolePlayingGames.directory</Directory>
  <Include>
    <Category>RolePlaying</Category>
    <Filename>xscreensaver-properties.desktop</Filename>
  </Include>
</Menu>  

<Menu>
  <Name>Adventure</Name>
  <Directory>AdventureGames.directory</Directory>
   <Include>
    <Category>AdventureGame</Category>
    <Filename>xscreensaver-properties.desktop</Filename>
  </Include>
</Menu>
  
<Menu>
  <Name>Simulation</Name>
  <Directory>SimulationGames.directory</Directory>
  <Include>
    <Category>Simulation</Category>
    <Filename>xscreensaver-properties.desktop</Filename>
   </Include>
</Menu>

<Menu>
  <Name>Cards</Name>
  <Directory>CardGames.directory</Directory>
  <Include>
    <Category>CardGame</Category>
    <Filename>xscreensaver-properties.desktop</Filename>
  </Include>
</Menu>
 
<Menu>
  <Name>Sports</Name>
  <Directory>SportsGames.directory</Directory>
  <Include>
    <Category>SportsGame</Category>
    <Filename>xscreensaver-properties.desktop</Filename>
  </Include>
</Menu>

<Menu>
  <Name>Strategy</Name>
  <Directory>StrategyGames.directory</Directory>
  <Include>
    <Category>StrategyGame</Category>
    <Filename>xscreensaver-properties.desktop</Filename>
  </Include>
</Menu>
The line “<Filename>xscreensaver-properties.desktop</Filename>” appears is each game subsection because the category will
not be displayed unless one app is added. If a real game app is added in the future, then this line can be removed.

EDITED 3-9-14:
Here's the menu I decided on for now, in the image on the left below. I'm a minimalist and prefer the most compact menu
possible, removing anything I don't use and I like to be able to find any app quickly with the least amount of mouse movements
and scrolling. I place very frequently used apps on the panel, which are File Manager, Firefox, LibreOffice Writer and Banshee.
In the lower part of the menu I place frequently used apps. With the new All category showing all the apps at once, after hiding
unused apps, I don't need most of the other categories.

xfce-whisker-menu.png


Update: Mint 18.3 Xfce Applications Menu Editing:

The edited compacted Applications menu shown in the picture above was for Mint 16 and required a fair amount of manual editing of the configuration file /usr/share/xfcemint/xfce-applications.menu to achieve. This update will explore whether the updated menu editor that comes with Xfce 18.3 is able to get a similar result without the need for a lot of manual editing.

These are the steps I took after a new installation. The Applications menu is first added to the panel by right clicking on the panel and selecting Panel > Add New Item. It will be added to the end of the panel on the right side. Right click on it’s icon and select Move. As the mouse cursor is moved along the panel to the left, a red vertical line will appear at different positions along the panel, where the icon can be released. See the menu on the left in the picture below.

xfce-app-menu1.jpeg

Another way to move an item on the panel is to right click the panel and select Panel > Panel Preferences. Click the Items tab. Click on the item at the bottom to highlight it and then keep clicking the UP arrow while watching the item move on the panel to the left side.

Adding an app to the desktop or panel is a little different when using the Whisker menu vs the Applications menu. With the Whisker menu, you can right click on the app and select Add to Panel or Add to Desktop. Or you can left click and hold on an app and then drag it to the desktop or panel and release.

With the Applications menu, there is no right click function. The app can only be dragged to the desktop or panel and released. On the panel you will see a vertical red line at the positions where the app can be added. Once it is added, it can be moved to a different location by right clicking on it and selecting Move.

After creating a new app desktop launcher, right click on it and select Properties > Permissions. Mark the box next to Allow this file to run as a program. If you forget to do that, then you will see this message when you first click on the launcher to execute the app:
Untrusted Application launcher
The desktop file “Name-of-app” is in an insecure location
and not marked as executable. If you do not trust this
program, click Cancel.
Click the Mark Executable button to remove that message.
Any desktop launcher can be copied to the panel by dragging and dropping it.

The Xfce developers must think that everyone has 20/20 vision. The menu fonts and icons are too small. The same goes for the fonts used for the menu button and any other buttons for open windows on the panel and the clock. To remedy this, open the menu and go to Settings > Appearance > Fonts and increase the font size. I went from 9 to 11. This doesn’t affect the clock but it can be changed separately by right clicking on it, selecting Properties, and clicking the button next to Font:. I changed the size from 9 to 14. I also want a plain 12 hour clock, without it telling me if its AM or PM, which should be quite obvious. So I click the button next to Format:, select Custom, and type: %l:%M

I also changed the theme. A major gripe I have with the Mint-X themes is when dragging and dropping files to the main folders in the /home directory, from another source such as a USB drive. There is no visual indicator to tell you if the correct spot is touched, so sometimes the files are not copied to a folder. I must open the folder to be sure. I switched to an Xfce theme, the particular one was Xfce-b5. Now there is a black outline shown around the folder when dragging files to it and the menu background is changed from white to a more attractive light gray.

Next, increase the menu icon size by going to Settings > Settings Editor. Click on xsettings and then the New button. In the pop-up window, next to Property, type /Gtk/IconSizes. Next to Type, select String. Next to Value, type gtk-menu=24,24

The default setting is gtk-menu=16,16. You can test other values. Click on the IconSizes line and then the Edit button. The changes are shown in the middle menu in the picture above.

Sometimes changes made to the menu and panel are not visible until the panel is restarted, even some changes using the Menu Editor. Use the command xfce4-panel --restart (or xfce4-panel -r) in the Terminal to do that. It’s best to leave the Terminal window open while settings are tested. Once a command is typed, it is stored in the Terminal’s history cache, so you don’t need to retype the command over again. Just press the UP ARROW key to display the most recent command and keep pressing the key to see older commands. Type history to see a list of all previous commands typed. To use one of those commands , just type ! and the number next to the command. To erase the Terminal history, type history -c.

The menu editor that comes with Xfce 18.3 is improved. Not only can categories be moved up or down in the menu but applications within a category can be moved out of the category by using the UP and DOWN ARROW buttons at the bottom left.

I prefer to have a Favorite apps section at the bottom of the menu for frequently used apps, so I open the Menu Editor, click on the arrow to the left of the System category to expand it and then highlight Xfce-terminal. I click the Down ARROW button several times to move it just above the Log-out button.
Since there is no option to open the Menu Editor when right clicking the Application menu, I want to have the Menu Editor icon at the bottom. This is done by expanding the Settings category and moving Menu Editor downward. I repeat these steps for moving Screenshot, Transmission and GIMP.

When you are moving an app with the direction ARROWS, the other categories should not be expanded, unless the app is being moved into another category. Then the app will move right past the category in one step. If the category is expanded, then the app has to be moved past all the other apps in the category, which can take a lot more time.

The alternate way to add apps at the bottom or other position on the menu is manually copying them. To do this, click the app you want to copy. On the right side, copy the Command that executes that app. Then click the icon and select Browse Icons to see the name of the app icon. Then click in the lower left area, such as the Log Out icon. At the top, click the + button and select Add Launcher. On the right side, paste the app Command you just copied. Click on New Launcher and change it’s name and then click the curved arrow. Click the icon and select Browse Icons and find the apps icon. Click the Save Launcher button at the top.

Next I will add an ALL category to the menu, which lists all the apps, similar to the one in the Whisker menu. Here some manual configuration is necessary. Open the File Manager and go to /etc/xdg. Right click on the menus folder and select Open as Root. Right click on the xfce-applications.menu file and select Copy. Then right click in the empty space and select Paste. Now you have a backup copy. Open the original file and go down to the bottom. Add these lines just above the last line that says </Menu:

Code: Select all

<Menu>
       <Name>All</Name>
        <Directory>xfce-all.directory</Directory>
        <Include>
            <All/> 
        </Include>
 </Menu>
So the bottom section will now look like this:

Code: Select all

    <Menu>
        <Name>Other</Name>
        <Directory>xfce-other.directory</Directory>
        <OnlyUnallocated/>
        <Include>
            <All/>
        </Include>
    </Menu>

    <Menu>
        <Name>All</Name>
        <Directory>xfce-all.directory</Directory>
        <Include>
            <All/>
        </Include>
    </Menu>

</Menu>
Save the file and then close the File Manager window that is using the root account and go back to /home/your-user-name. If hidden folders and files are not showing, then click View > Show Hidden Files or press Ctrl+H. Go to /.local/share/desktop-directories. Right click in the empty space and select New Document. Name it xfce-all.directory. Open the file and add these lines:

Code: Select all

[Desktop Entry]
Version=1.0
Type=Directory
Name=All
Icon=applications-other
NoDisplay=false
Categories=X-XFCE;X-Xfce-Toplevel;
StartupNotify=false
Terminal=false
Save the file. Now the All category should appear in the menu. If it doesn’t, then open the Menu Editor and the All category should be listed at the bottom on the left side. Move it upwards with the UP ARROW, just above the Accessories category. Now it should be visible. If you want to, you can change it’s name to ALL, like I did.

I experienced one problem sometimes after adding the All category. When using the Menu Editor to hide or unhide apps, a message similar to this appeared:
Failed to load the applications menu
Error on line 420 char 47. Document ended unexpectedly
with element still open - ‘Layout’ was the last element opened
I checked the applications menu the messages referred to, which is found at /home/your-user-name/.config/menus but could not find any error on the specified lines in any error messages. After that message appears, the menu can’t be opened. You have to Log out and back in or use the command to restart the Xfce panel. The Terminal can be opened by right clicking on the desktop and selecting Open in Terminal or pressing Ctrl+Alt+T.

After some more testing, I think the problem came from changes being made and saved too quickly. After clicking the button to Hide or Unhide an app, wait 2 to 3 seconds before clicking the Save Launcher button. Then wait 2 to 3 seconds before making another change.
EDITED: Those error messages can appear even if the All category is not created, but usually less often.

EDITED:
If the problem described above still occurs, then use this command to open the /etc/xdg/menus/xfce-applications.menu file:

Code: Select all

gksudo xed /etc/xdg/menus/xfce-applications.menu
Remove the lines that were added for the All category above and add these lines:

Code: Select all

<Menu>
    <Name>All</Name>
    <Directory>xfce-all.directory</Directory>
    <Include>
       <Category>Settings</Category>  
       <Category>System</Category>
       <Category>Office</Category>
       <Category>AudioVideo</Category>
       <Category>Network</Category>
       <Category>Game</Category>
       <Category>Graphics</Category>
       <Category>Utility</Category>   
    </Include>
</Menu>
End of editing.

The expanded ALL category is shown in the picture below:

Image


Next I removed unneeded categories and apps in the menu. The Lock Screen app can be removed because it can be executed by pressing the Ctrl+Alt+L keys at the same time, but the Screen Locker app has to be enabled. The only app I use in the Graphics category is GIMP. After it was moved to the bottom Favorites section of the menu, then the Graphics category could be hid. The same applied to the Internet and Office categories. I added LibreOffice to the panel. Unneeded separator lines are removed by clicking the Delete button.

Here is where the Applications menu has an advantage over the Whisker menu. In the Whisker menu, if you add an app to the Favorites category, such as GIMP, and then hide the Graphics category, then the app will disappear from the Favorites category. This didn’t happen to the apps I moved to the bottom of the Applications menu.

Finally I shortened the names of GIMP Image Editor to GIMP, Xfce Terminal to Terminal and changed the category Multimedia to it’s previous name, Sound & Video. In the menu, select the app on the left and click on it’s name on the right. Make the change and then click on the curved arrow to the right. I also added a Separator line below the Log Out icon to give a little more separation from the panel, by clicking on the Log Out button and then clicking the + button and selecting Add Separator.

Lastly the Log Out icon was changed and renamed Shutdown. Open the Menu Editor and click on the Log Out icon. On the right side, click on the icon and select Browse Files > Other Locations > Computer and go to
/usr/share/icons/Mint-Y/actions/32 and select the system-shutdown.png icon. This icon is square. The round red system-shutdown icon I used in Xfce 16 is not available for Xfce 18.3.

The changes are shown in the menu on the right in the picture above.

The menu editor still needs improvement in one area. Multiple changes can’t be made and saved, like the Cinnamon Menu Editor can. After each change, you must click the Save launcher button at the top or click on another app or category and then there will be a pop-up message asking to save the change.


UPDATE:

Additional changes have been made to category and app icons in the menu, the background color of the menu and panel, and the network and sound icons in the panel’s system tray area. The changes can be seen in the bottom menu and panel in this picture:

Image


Changing menu application icons:

Any icon can be used and it can be any pixel size. Open the Menu Editor and on the left side click on the app icon you want to change. On the right side, click on the icon and select either Browse icons or Browse Files. For Browse Files, go to /usr/share/icons/Mint-X/apps/48. The number 48 stands for the pixel size of the icons in that folder, which is 48x48. Or you can select any custom icons in the Picture folder.

If you need to frequently open the Mint-X folder, then it can be added as a shortcut in the list of folders in the File Manager. Then when the Menu Editor is used to Browse Files, the Mint-X folder will be listed in the left column, which will speed up the icon search process. To create the shortcut, open the File Manager and click View > Side Pane. Mark the checkbox next to Shortcuts. Then go to /usr/share/icons. Right click on the Mint-X folder and select Send To > Side Pane (Create Shortcut).

Changing menu category icons:

You can use most of the icons In the Browse icons selection. For the Browse files selection, the pixel size of the icons should match the size being used in the menu. The default size is 16. If you followed the instructions given earlier for increasing the icon size, then check the setting made in Settings > Settings Editor, under xsettings > Gtk IconSizes > gtk-menu=
A 24 pixel size (gtk-menu=24,24) should work for most desktop PCs. This corresponds to the Smaller icon size setting in the Whisker menu. For very high resolution screens, a 32 pixel size may be needed, which corresponds to the Small size setting in the Whisker menu. After a change is saved in the Menu Editor, then that setting is stored in the
/home/your-user-name/.local/share/desktop-directories folder in a file that has the name of the category, such as xfce-graphics.directory for the Graphics category. The file for any custom made category that is created using the Menu Editor will be named a little differently. For example, menulibre-favorites.directory for a Favorites category.

If you open that file, the name of the icon being used is next to the line Icon=. The name should not include the full path to the icon’s location. For example, the icon for the Graphics category is named applications-graphics, without the .png extension, so the line Icon=applications-graphics is used. The full path to the icon’s location is /usr/share/icons/Mint-X/categories/24/applications-graphics.png. If the icon you select does not appear in the menu, then check in the desktop-directories folder to see if the full path is listed instead of just the icon name. Often that misconfiguration occurs. You will need to manually change the Icon= line. If the icon still does not appear in the menu, then use the command to restart the panel.

You can also use a custom icon, such as the penguin icon I used for the ALL category. Let’s assume the menu is using 24x24 pixel icons. The default icon used for the All (I renamed it ALL) category is named applications-other. Your custom icon in the Pictures folder should be changed to that name, and should have the same 24x24 pixel size. Right click on the Pictures folder and select Open as Root. Right click on the custom icon and select Copy. While staying in the Root account window, click File Systems on the left and go to /usr/share/icons/Mint-X/categories/24. Then right click on the icon applications-other.png and select Rename. Name it applications-otherxxx.png. Then paste the copied icon. Open the Menu Editor and for the All category icon, go to the location of the applications-other icon and select it. After saving the change, if the custom icon does not appear in the menu, then go to the desktop-directories folder and open the file xfce-all.directory. Check if the icon name next to the line Icon= is just applications-other and not the full path. You may need to restart the panel.

Or you can use these commands to make the changes:
Change the name of the default icon in /usr/share/icons/Mint-X/categories/24

Code: Select all

sudo mv /usr/share/icons/Mint-X/categories/24/applications-other.png /usr/share/icons/Mint-X/categories/24/applications-other-old.png
Then copy the new icon in Pictures to the location above. Change your-user-name to your actual user name:

Code: Select all

sudo cp /home/your-user-name/Pictures/applications-other.png /usr/share/icons/Mint-X/categories/24
Here are the most common categories and their icon names:

Code: Select all

Accessories		 applications-accessories
Graphics		 applications-graphics
Internet		 applications-internet
Multimedia		 applications-multimedia
Office			 applications-office
Settings		 preferences-desktop
System			 applications-system
EDITED: Using a custom icon with a custom name is more complicated. Open the File Manager and check that Hidden Files are visible. If not, then click View > Show Hidden Files or press Ctrl+H. The icon must be added to the /home/your-user-name/.icons folder. If it doesn’t exist, then create it. Then open the Menu Editor and select the category whose icon you want to change. Click on it’s icon and select Browse Files. In the next Select an image window, right click in the empty space and mark the checkbox next to Show Hidden Files. Then click the .icons folder and select the custom icon. Save the change by clicking the Save Launcher button.

Open the menu and check if the new icon is visible. Usually it is not. To correct this, go to /home/your-user-name/.local/share/desktop-directories and open the file for the category whose icon you are changing. Usually there is a misconfiguration by the desktop manager and the full path to the icon's location is listed after Icon=, such as Icon=/home/your-user-name/.icons/new-icon-name.png. This should be changed to Icon=new-icon-name, without the .png extension. END OF EDITING:

This topic has more info on creating a custom icon. See the section Making Custom Icons in my first post: viewtopic.php?f=206&t=185952

Changing the menu background and panel color:

The color of the bottom menu and panel in the picture above now has a Minty green tint added to the basic gray color. One minor problem is that the color in the System tray area didn’t change. The color will also be seen in the toolbars of other open apps. To make the change, the configuration file of the Theme being used needs to be edited. The themes are found in /usr/share/themes. I am using the xfce4-b5 theme. First use this command to make a backup copy:

Code: Select all

sudo cp /usr/share/themes/xfce4-b5/gtk-2.0/gtkrc /usr/share/themes/xfce4-b5/gtk-3.0/gtk-rc.old
EDITED: that should be:

Code: Select all

sudo cp /usr/share/themes/xfce-b5/gtk-2.0/gtkrc /usr/share/themes/xfce-b5/gtk-3.0/gtk-rc.old
Then use this command to open it for editing:

Code: Select all

gksudo xed /usr/share/themes/xfce4-b5/gtk-2.0/gtk-rc
EDITED: that should be:

Code: Select all

gksudo xed /usr/share/themes/xfce-b5/gtk-2.0/gtk-rc

This line affects the background color of the menu and panel: bg[NORMAL] = "#dddbde"
I changed the color code to: "#b9bfbb"

This line affects the font color: fg[NORMAL] = "#ffffff"

These codes represent the HTML color code. You can get them from an online site such as this:
https://htmlcolorcodes.com/color-picker/

Or you can get them using GIMP. Open the app and if the Toolbox is not showing, then click Tools > New Toolbox. Click on the black rectangle at the bottom. If you type the code b9bfbb in the window next to HTML notation, and click the eyedropper button just to the right, then you will see the new menu and panel color I used, next to Current:.
First select the basic color in the narrow color selector column. Then click in the larger color selector window to the left to fine tune the desired color. The selected color will show next to Current:. Then copy the values in the HTML notation window.

Another way to change the panel color is to right click the panel and select Panel > Panel Preferences and then the Appearance tab. Next to Style, select Solid color. Then a Color button will appear below. When clicked, the color wheel can be used in a similar way to the method above. However, the selected color only affects the panel, but it includes the System tray area.

For the Mint-X theme, the /usr/share/themes/Mint-X/gtk-2.0/gtkrc file is edited. First use this command to make a backup:

Code: Select all

sudo cp /usr/share/themes/Mint-X/gtk-2.0/gtkrc /usr/share/themes/Mint-X/gtk-2.0/gtkrc.old
Then use this command to open the gtkrc file for editing:

Code: Select all

gksudo xed /usr/share/themes/Mint-X/gtk-2.0/gtkrc
In this line, change the panel background color by changing the code in the section bg_color:#d6d6d6

gtk_color_scheme = "bg_color:#d6d6d6\nselected_bg_color:#9ab87c\nbase_color:#F7F7F7" # Background, base.

In this line, change the font color of the panel, by changing the code in the section fg_color:#212121

gtk_color_scheme = "fg_color:#212121\nselected_fg_color:#f5f5f5\ntext_color:#212121" # Foreground, text.


Changing the network and sound icons in the panel’s system tray area:

These two icons will be changed to more vibrant, colorful ones. When using a dark theme, such as Mint-Y, Mint-Y-Dark or Mint-Y-Darker, the default icons will be black and not very visible. This is for a wired network only.
The bottom panel in the picture above shows the new custom icons used when the network is connected and sound output is above 70%. The short panel section above the full panel shows the icons used when the network is disconnected and sound is muted.

A 24X24 pixel icon must be used. The default icons are located in /usr/share/icons/Mint-X/status/24

The icon used for a connected network is: nm-adhoc.png
The icon used for a disconnected network is: network-offline-symbolic.png
The icon used when the sound output is above 70% is: audio-volume-high-panel.png
The icon used when the sound is muted is: audio-volume-muted-panel.png

First open the File Manager and go to /usr/share/icons/Mint-X/status. Right click on the folder 24 and select Open as Root. Then right click in the empty space and select Paste, to create a backup. Close the Root account window.

The replacement icon should be renamed to one of the four above. Then use this command to rename the icon in folder 24 that you want to change:

Code: Select all

sudo mv /usr/share/icons/Mint-X/status/24/icon-name /usr/share/icons/Mint-X/status/24/icon-name-old.png
Then use this command to copy the new icon in the Pictures folder to /usr/share/icons/Mint-X/status/24

Code: Select all

sudo cp /home/your-user-name/Pictures/icon-name /usr/share/icons/Mint-X/status/24
There are also slightly different looking icons for low and medium sound outputs:
audio-volume-medium-panel.png and audio-volume-low-panel.png

If the sound output volume drops below 70%, then the default icon will be used. Or you can use the same replacement icon that was used for audio-volume-high-panel.png

You can download my icons to use, if you wish, from imgur at this link: https://imgur.com/a/Kmzw6

If you are using a dark theme, then these network icons will be look better: https://imgur.com/a/XGSzR

UPDATE: Replacing the wireless network icon:

These 5 icons are used to display the wireless signal strength in /usr/share/icons/Mint-X/status/24

Code: Select all

nm-signal-00.png 		For no signal.
nm-signal-25.png		For a weak signal, between 0 and 25% strength.
nm-signal-50.png		For a fair signal, between 25 and 50% strength.
nm-signal-75.png		For a good signal, between 50 and 75% strength.
nm-signal-100.png		For an excellent signal, over 75% strength.
The picture below shows the default wireless and sound icons on the left side and the new custom icons on the right side:

Image

You can download my custom icons from imgur at this link: https://imgur.com/a/u6fur

These icons look better when using a dark theme: https://imgur.com/a/JgKe3

After downloading, extracting and renaming the icons, add them to the Pictures folder. Right click on the Pictures folder, while it is visible on the right side, and select Open as Root. Copy the 5 replacement icons, all at the same time. Click on File System on the left side and go to /usr/share/icons/Mint-X/status/24. Right click on the 5 default icons named above and rename them one at a time, adding xxx to their names. For example, nm-signal-00.png will be renamed
nm-signal-00xxx.png. Then Paste the copied new icons. Close the File Manager and restart the panel with the xfce4-panel --restart command.


UPDATE - Adding a Mugshot menu item

When you click the Mugshot icon on the top left corner of the Whisker menu, then the Mugshot window opens, which is used to edit the user profile. If you change the icon to a picture of yourself, then that same picture will be used for the Mugshot icon. The menu on the left in the picture below shows an edited Whisker menu:

Image

The face you see is Clem Lefebvre, the founder and lead developer of the Mint project. The Mugshot window is seen at the top. This is the same window seen when you click on the About Me app.
A similar feature can be added to the Applications menu. However, the picture can be made larger for a better image quality. This is seen in the middle menu in the picture above. So if the categories in the menu are using 24x24 pixel icons, then a 48x48 icon added to /usr/share/icons/Mint-X/categories/24 will be displayed as a larger icon in the menu. This can’t be done with the Whisker menu. The menu on the right is using a 64x64 pixel icon added to folder 24.

To do this, first open the Menu Editor and click the + button at the top and select Add Directory. Change the name to your real name. Then click the + button again and select Add Launcher. Next to Command, type /usr/bin/mugshot. Change the name to Mugshot.
You need a 48x48 pixel picture of yourself, or larger if you prefer. You can decrease the size of your picture by opening it in GIMP. Click Tools > Transform Tools > Crop to remove the background around the face. Try to get a square size. You can check the size after each change is made by clicking Image > Image Properties.

Then click Image > Scale Image. Decrease the size to 48x48 pixels.

Click File > Export As… . Name the picture applications-java.png (I’ll explain why later). An Export button will need to be clicked 3 times. When closing GIMP, there will be a message about saving the image before closing. Click Discard Changes.
Open the File Manager and right click on the Pictures folder and select Open as Root. Copy the applications-java.png icon. Then click File System on the left side and go to /usr/share/icons/Mint-X/categories/24. Any unused icon can be renamed. I selected the applications-java.png icon simply because it has a short name. Right click on it and select Rename and name it applications-javaxxx.png. Paste the icon you just copied. Save and close the File Manager.

Open the Menu Editor and click on the new category that has your name. Move it to the top of the Menu. Click the icon and go to /usr/share/icons/Mint-X/categories/24 and select the applications-java.png icon.
Click on the Mugshot launcher you created. Change it’s icon to the same applications-java.png icon, but you can select it from the Pictures folder.

Open the menu to see if a larger icon with your face is displayed next to the new category. If not, then go to
/home/your-user-name/.local/share/desktop-directories. Open the file menulibre-your-name.directory. There should be a line icon=applications-java. If the full icon path is shown, then change it. Use the command to restart the panel and check the menu again. Click the Mugshot launcher and click the icon to change it to the same applications-java.png icon in Pictures.

A potential glitch can occur where a second Mugshot launcher appears in the menu at the bottom. Open the Menu Editor and the launcher should be at the bottom on the left side. Move it upwards using the UP ARROW button until it is inside the category you created, with your name on it. You will have to expand that category first, so that the first Mugshot launcher is visible. Don’t try to remove one of them or both will disappear. You have two options. Leave both launchers, or try to remove one by going to /home/your-user-name/.config/menus and opening the xfce-applications.menu file. You will see this section at the top:

Code: Select all

                    <Layout>
			<Merge type="menus" />
			<Filename>menulibre-mugshot.desktop</Filename>
			<Filename>menulibre-mugshot.desktop</Filename>
			<Merge type="files" />
		    </Layout>

Remove the second <Filename>menulibre-mugshot.desktop</Filename> line, if it exists.


UPDATE: Adding the Places plugin:

One panel plugin that may be useful to some users is the Places plugin, which is used to access folders, documents, and removable media. If you have a File Manager launcher on the panel as I do, then this plugin just duplicates some of it’s function, except for one feature. It also keeps a list of the most recently opened files, so that they can be clicked for quicker access. See the left menu in the picture below:

Image

The Places plugin must be added to the panel and then it can be moved to the left, next to the menu button, but it can’t be added directly to the menu, as is found in the Cinnamon and MATE menus. However, a Places launcher can be added to the menu, with a command that will activate the plugin when clicked.

To create the Places menu launcher, open the menu editor and click on an icon on the left side, where you want the new launcher positioned on the menu. Then click the + button and select Add Launcher. For the Name, you can use Places or Recent Files, as I used, since I would only use it to access recently used files quicker. Next to Command, type xfce4-popup-places

If you want to use a green folder icon, then click the icon and select Browse icons and select the folder icon. See the middle menu in the picture above.

Now the plugin’s panel launcher can be made very narrow and invisible, so it won’t take up any panel space. This is done by right clicking on it and selecting Properties. Next to Show, select Label Only but don’t type anything in the Label window. The plugin will be invisible but when you move the cursor over it, it will show as a narrow light vertical bar, which can be clicked on to edit or remove the plugin. See the red arrow in the right menu in the picture above.


Changing the desktop icon text color:

If you switch to a light colored desktop background, then the light text color of the desktop icons will be less visible. The 3 desktop sections in the picture below use a light background wallpaper, which is available in the menu under the Desktop app:

Image

When looking at the background on the left, the icon text is obviously more difficult to read, so a darker text would be helpful. There are two different methods to do this, each giving a different effect. Go to /home/your-user-name and open the .gtkrc-xfce file (a hidden file). Change the line fg[NORMAL] = "#efefef" to fg[NORMAL] = "#000000". That color code is for black text but you can use other color codes. Logout and back in. The result is the middle background in the picture above.

The other method is done by not editing that file but disabling it by renaming it, such as .gtkrc-xfcexxx. Logout and back in. The effect is seen in the background on the right in the picture above.


Menu Favorites category:

To make the menu more compact, a Favorites category can be created with the Menu Editor and apps added to it by using the Up and Down ARROW buttons. Click on the icon, select Browse Icons... and select the starred icon. The category won’t be visible in the menu until the first app is added to it. All other apps can only be added with the category expanded:

Image


Adding a Show All Apps launcher:

If you decide to use a very compact menu like I do, then you will have hidden some menu categories and many apps. These apps won’t show in the created ALL category either. The disadvantage to using this menu is when needing to use an infrequently used app, such as Disks or Software Manager. This requires opening the Menu Editor, making an app visible and then making it not visible again after running it. Another quicker method can be used, which is to create a launcher that opens the /usr/share/applications folder when clicked. That folder lists all the available apps on the system. Even though the folder is owned by root, any app can be clicked on and it will be executed without needing to type your password, just the same as if it was clicked on in the menu.

To do this, create a new launcher and for the Command use: thunar /usr/share/applications. Then add the launcher to any category or place in the menu that you desire. In the menu on the left, in the picture below, I named it Show All Apps and used the starred icon. In the menu on the right, I added it to the ALL category:

Image

You may want it to replace the ALL category, which shows the apps in one long column, so some scrolling may be needed. The new launcher will probably show all the apps onto the screen using many columns, as seen in the picture below:

Image


Please do not add a new post to this topic. Since the topic is old, a forum moderator would then probably lock it. Then I would be unable to add any more updates. If you have a question, then contact me with a Private Message.


Updated info for editing the Mint 18.3 Cinnamon menu and panel can be found in my last post in this topic:
viewtopic.php?f=208&t=124153

Updated info for creating a customized menu for Mint 19.1 MATE, that is similar to Xfce’s Applications menu, has been added to this topic:
viewtopic.php?f=206&t=185952
Last edited by roblm on Fri Mar 01, 2019 9:28 am, edited 134 times in total.

User avatar
JohnBobSmith
Level 4
Level 4
Posts: 338
Joined: Wed Nov 06, 2013 5:42 pm
Location: Canada

Re: How to edit the whisker menu? [SOLVED]

Post by JohnBobSmith » Thu Mar 06, 2014 1:00 pm

Thanks for all your research roblm! I will be able to make good use of it. :)
Image
If you want to change the world, start by changing yourself.
Success is often 1% inspiration and 99% perspiration.
You get one shot at life, so live to the maximum, not the minimum.

Post Reply

Return to “Software & Applications”