You are not logged in.
Pages: 1
How to change the icon of the "show desktop" panel item? Panel version is 4.12.1
Offline
From https://git.xfce.org/xfce/xfce4-panel/t … top.c#n107:
image = xfce_panel_image_new_from_source ("user-desktop");
It uses the icon "user-desktop". Replace this icon in your current icon theme.
Remember to "gtk-update-icon-cache </path/to/icon/theme/root>" to refresh the cache after you make any icon changes.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks. Alternatively would it also be possible by a gtkrc user style?
Offline
I'm not sure. At first glance (see section on stock images), it looks like it might be possible, but I think this would only work with gtk stock images, but user-desktop is not considered a gtk stock image.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
As I was playing around with genmon I thought why not make a show desktop:
#!/bin/bash
cmd="if [ $(wmctrl -m | awk '/showing the desktop/ {print $7}') == 'OFF' ]; then wmctrl -k on; else wmctrl -k off; fi"
echo "<img>/usr/share/icons/gnome/22x22/apps/preferences-desktop-display.png</img>"
echo "<click>bash -c '$cmd'</click>"
exit 0
Now while the <click> command works, it's showing a strange behaviour:
After the 1st click (and a successful toggle) you have to wait until the "Period (s)" of genmon is over before another click will toggle the desktop again.
Running the bash command repeatedly in a shell does not show this behaviour.
Alternatively running e.g. "<click>xcalc</click>" I can start as many xcalcs as I click during "Period (s)" as expected.
genmon is v-3.4.0
Offline
With genmon, your cmd is only evaluated once every period - so no matter how many times you click on it, it will always carry the same result (which is why it only works once). You are trying to use it as a toggle launcher, which it is not.
In this case, why not just create a launcher so that the if statement is executed every time you click the button?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I see. A launcher it is now.
Even if <click> was actually evaluated on the very click genmon has higher purposes. Good to know how it's doing its job though.
Offline
Pages: 1
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 540.72 KiB (Peak: 542 KiB) ]