Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-01-16 02:05:07

simeon9997
Member
Registered: 2025-01-16
Posts: 7
Windows 10Chrome 131.0

How to make a thin "show desktop" button?

I know it's possible to do this with "genmon" since I've read a post in this forum, but I don't understand at all how it works and I would need some extra help since I'm quite new to customizing the xfce panel. I simply want to add a button to show the desktop similar to windows, that is, not square but vertical and thin in xfce 4.18, is this possible?

Offline

#2 2025-01-16 07:55:04

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,815
LinuxFirefox 134.0

Re: How to make a thin "show desktop" button?

Hello and welcome.

I know it's possible to do this with "genmon" since I've read a post in this forum, but I don't understand at all how it works and I would need some extra help since I'm quite new to customizing the xfce panel.

Do you mean you'd need help to get genmon setup do this? Where are you stuck?

Reference thread: https://forum.xfce.org/viewtopic.php?id=13869


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-01-16 15:10:16

simeon9997
Member
Registered: 2025-01-16
Posts: 7
Windows 10Chrome 131.0

Re: How to make a thin "show desktop" button?

ToZ wrote:

Hello and welcome.

I know it's possible to do this with "genmon" since I've read a post in this forum, but I don't understand at all how it works and I would need some extra help since I'm quite new to customizing the xfce panel.

Do you mean you'd need help to get genmon setup do this? Where are you stuck?

Reference thread: https://forum.xfce.org/viewtopic.php?id=13869

Thank you very much for your reply. I have installed genmon and wmctrl as indicated in that thread, and run it in a console:

#/bin/bash
if xprop -root  _NET_SHOWING_DESKTOP|egrep '= 1' ; then 
  wmctrl -k off ; 
else 
  wmctrl -k on ;
fi

But then in the second command that is indicated which is the following:

echo "<img>/path/to/icon.png</img><click>/path/to/above/script</click><tool>Show Desktop Toggle</tool>"

  I don't understand how to fill in this command to run it, and I'm not sure what else needs to be done to have the plugin in the panel. Can you help me to continue?

Offline

#4 2025-01-16 17:23:22

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,815
LinuxFirefox 133.0

Re: How to make a thin "show desktop" button?

Assuming simeon9997 is your computer username. If not, change it in the settings below.

First you need an image file of the thin bar that you want to use. You can create one using your favourite graphics editor, or find an existing one on the internet. For this test, you can use:
showdesktop.png
...right-click this image and save it to your home directory called showdesktop.png.

Save the script from above also to your home directory, name it toggle-desktop.sh, and make it executable.

Then add the genmon plugin to your panel and open its properties page and set the following values:
- Command = echo "<img>/home/simeon9997/showdesktop.png</img><click>/home/simeon9997/toggle-desktop.sh</click><tool>Show Desktop Toggle</tool>"
- Label is unchecked
- Period = 86400
...and click Save.

The image file should be displayed and if you click on it, it should toggle the desktop visibility.

As a next step, you might want to custom create something nicer than a red bar, unless of course, a red bar is what you are looking for.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-01-16 18:42:49

simeon9997
Member
Registered: 2025-01-16
Posts: 7
Windows 10Chrome 131.0

Re: How to make a thin "show desktop" button?

ToZ wrote:

Assuming simeon9997 is your computer username. If not, change it in the settings below.

First you need an image file of the thin bar that you want to use. You can create one using your favourite graphics editor, or find an existing one on the internet. For this test, you can use:
showdesktop.png
...right-click this image and save it to your home directory called showdesktop.png.

Save the script from above also to your home directory, name it toggle-desktop.sh, and make it executable.

Then add the genmon plugin to your panel and open its properties page and set the following values:
- Command = echo "<img>/home/simeon9997/showdesktop.png</img><click>/home/simeon9997/toggle-desktop.sh</click><tool>Show Desktop Toggle</tool>"
- Label is unchecked
- Period = 86400
...and click Save.

The image file should be displayed and if you click on it, it should toggle the desktop visibility.

As a next step, you might want to custom create something nicer than a red bar, unless of course, a red bar is what you are looking for.

I did it! I should mention that the second full command has more characters than genmon allows, so I had to rename the image file to "tgd.png" so that the full command can be written. I modified the color to my liking and this was the result: https://imgbb.com/xL8zWc5.  But another question has come to me, is it possible to slim down other buttons like the pulse audio or power manager using genmon?

Offline

#6 2025-01-16 23:32:27

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,815
LinuxFirefox 134.0

Re: How to make a thin "show desktop" button?

simeon9997 wrote:

But another question has come to me, is it possible to slim down other buttons like the pulse audio or power manager using genmon?

What do you mean by "slim down"? By their nature they are square elements. You can change the size via a setting in both Panel Properties > Appearance (fixed icon size)  and a separate setting in the Status Tray plugin Properties (for status notifiers and sys tray items).


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2025-01-18 13:31:37

simeon9997
Member
Registered: 2025-01-16
Posts: 7
LinuxChrome 132.0

Re: How to make a thin "show desktop" button?

ToZ wrote:
simeon9997 wrote:

But another question has come to me, is it possible to slim down other buttons like the pulse audio or power manager using genmon?

What do you mean by "slim down"? By their nature they are square elements. You can change the size via a setting in both Panel Properties > Appearance (fixed icon size)  and a separate setting in the Status Tray plugin Properties (for status notifiers and sys tray items).

I understand, for now the problem raised in this post is solved. I will open another thread for the size of the icons inside the system tray, or or indicator plugin. Thank you very much.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 559.91 KiB (Peak: 576.76 KiB) ]