heya guys id like to add a show desktop icon near the clock, how can i do that?
Well - If you are using either OpenBox or I3 - there isnt a reason for such a beast as you have the ability to use the mod+1-0 keys to switch desktops. Above and beyond that, that is something you will either have to code yourself or do a search with polybar + other criteria for that.
You would need to create a custom module for jgmenu - like these user contributed modules.
polybar doesn’t accept window manager commands though, so you would have to script something - maybe with xdotool or wmctrl.
If you’re using Openbox, super+d will display the desktop.
‘wmctrl’ is good for this? Can’t remember the exact command, but should be googlable.
Or picking up on the point that @Dobbie03 made, run the command ‘xdotool key super+d’
In your polybar config file, try the following:
[module/foo] type = custom/text content = show desktop click-left = "xdotool key super+d >/dev/null 2>&1 &"