Skip to main content

Xubuntu / Xfce sync whisker menu favourites

Sidebar

I use a dual monitor setup. For each monitor I have a panel, and each panel has a whisker menu. I found that the favourites section of each of these panels is not synchronised. To fix this, I wrote a simple script.

I use a dual monitor setup. For each monitor I have a panel, and each panel has a whisker menu. I found that the favourites section of each of these panels is not synchronised. To fix this, I wrote a simple script.

First, you have to decide which whisker config to keep.

$ cd ~/.config/xfce4/panel/
$ ls
whiskermenu-1.rc  whiskermenu-9.rc

The favourites menu is stored at the top of each file, like this:

$ head -n1 whiskermenu-1.rc
favorites=firefox.desktop,google-chrome.desktop,hexchat.desktop,exo-file-manager.desktop,libreoffice-writer.desktop,libreoffice-calc.desktop,exo-terminal-emulator.desktop

Find the one you want to keep. From this point on, replace whiskermenu-1.rc with the config you want to keep and whiskermenu-9.rc with the one you want to ditch.

The script is as simple as this:

#! /bin/bash

rm -f ~/.config/xfce4/panel/whiskermenu-9.rc
cp ~/.config/xfce4/panel/whiskermenu-1.rc ~/.config/xfce4/panel/whiskermenu-9.rc
xfce4-panel -r

If you save that to /usr/local/bin/syncwhisker, then you can use “syncwhisker” in the terminal to keep your menus the same.

Comments

Leave comment

Shown publicly next to your comment. Leave blank to show as "Anonymous".
Optional, to notify you if rubenwardy replies. Not shown publicly.
Max 1800 characters. You may use plain text, HTML, or Markdown.