It's alright. My solution in that post is for Compiz, not for standard workstations. There's actually a simple way to do it using the standard desktop system. There's a group of objects in Conky called ${desktop},${desktop_name}, and ${desktop_number} that you can use. This actually simplifies everything very quickly. The Conky can exist on all 4 desktops, and you just have to tell it to have no content when it's on a desktop that you don't want it shown. One Conky, 4 different desktops, 4 different configurations. Or, as many or as few as you wish.
Then it becomes an if_match structure, plain and simple.
Code:
${if_match ${desktop(/_name/_number)}=1}
<Insert All Code You Wish On Desktop 1, As You Want It.>
${else}${if_match ${desktop(/_name/_number)}=2}
<Insert All Code You Wish On Desktop 2, As You Want It, If you don't want anything, leave this empty.>
${else}${if_match ${desktop(/_name/_number)}=3}
<Insert All Code You Wish On Desktop 3, As You Want It, If you don't want anything, leave this empty.>
${else}${if_match ${desktop(/_name/_number)}=4}
<Insert All Code You Wish On Desktop 4, As You Want It, If you don't want anything, leave this empty.>
${else}
${endif}${endif}${endif}${endif}
And you're done. One Conky, 4 configurations, 4 desktops. The ones you don't want shown are simply empty. The only reason the Compiz one is so complicated is due to the fact that Compiz doesn't have desktops, just one ultra wide, tiled desktop that it wraps around a 3D Cube or flips around. So, the if_match structure needs to grab a command line result and grep/awk/sed the hell out of it to get a number to compare it to. Not a problem for any other standard 2D window manager. They have desktops, and they can be measured by Conky with a definite variable.
*EDIT* Now that I have thought about it a bit, another option comes to mind. I don't know if Desktops are the same as X Window Displays or not in Conky, but there is a runtime switch that lets you put Conky on your desired X Window Display. If, and I do stress IF, Conky believes that your Desktop number is the same as your X Window Display Number, then you just change your launch script of choice to include:
Code:
conky -X (Display#) -c ~/Path/To/Your/Script
I know for certain that will put a specific conky on a specific MONITOR, but I don't know if that will also mean Desktops. Technically, it is a different animal, but perhaps Conky doesn't know better. I only have one display, and I only use one desktop, so I can't really test this myself. Might be an idea for you though!
Bookmarks