Credits

A script for BE::Shell by and . The script displays the current workspace number inside a monitor icon.The archive includes a monitor icon you can resize, and other ones already scaled ( 60 x 60, 48 x 48, 32 x 32 ).

Instructions

Download the archive, extract the folder, and move it to your be.shell scripts dir ( on kubuntu: ~/.kde4/share/apps/be.shell/scripts/ , while on certain distributions the path might be ~/.kde4/share/apps/be.shell/scripts/ ) If the scripts folder is missing, create it.

Open a terminal inside the same dir of the script, and give it permissions to be executable: chmod +x workspace.sh

Create an applet in your be.shell's config, with the following attributes: [workspace] Exec=/home/YourUser/.kde/share/apps/be.shell/scripts/workspace/workspace.sh PollInterval=1000 Type=Label

Remember: the path in Exec must be the same where you placed the script!

Add the applet to the Applets list of a panel of your choice.

Reload the config

Further options are available through the script: you can change font color, padding, or the icon. You can also resize the monitor.png icon to the size you prefer( with gimp or converseen). Just remember to edit the other variables, as explained in the workspace script.In case you use it in a panel with other applets, edit you BE::Shell's theme, adding:

#NameOfTheApplet { padding-left: 10px /* just as an example*/ padding-right: 10px /* same as over*/ }

Have already tried it, but it starts counting desktop from 0.I've thought it might be elaborated whithin a variable( or an if condition)to start from 1, but did not worked (the "number" is a string).So i've chosen to use qdbus.

Are you referring to his calendar script ?Or another?I heard him telling about the idea to use the fifo onefor his workspace indicator, dunno if he already did it(didn't hear him since sunday, if my memory isn't fooling me).

The problem is that using the xprop command, i have to wait a long timeuntil the script displays the right desktop number. About the fifo: how to use it exaclty? By importing the fifo.daemon inside the workspace script ( and i guess the previous code should be included in a function)?

Or - by creating a tmp file, and a control cycle which recursively checkif the variable is the same (if it's the case just reads the file), andif it's not prints the variable to the output and to the file?This should be the approach that Rob used in the calendar script i mentionedabove.

you don't have to wait at all using this.xprop just sits there and waits until you change the desktop and the property changes.

then it prints the new desktop which you use to update the label and then you restart the xprop call for the next round (you could also add a small delay to catch the user scrolling through his desktops)

if you source the be.fifo.daemon corpus into your script, you only have to implement "daemon_func" as what is actually running and get a complete daemon which you can start and stop (and it also creates a fifo to be addressed from be.shell), yes.

Another thing i wanted to ask you,i remembered just today, after a question from Lars.I know this is not a feature request topic on the BE::Shell forum, but...

Anyway: is it possible to have a label with an additional exec?I mean: one that is updated by a script, and has an associated actionwhen clicked. Would be the holy grail to create custom appletsfor kiddies like me!

I know that can be done with buttons ( the qdbus calls for icons/tooltipand Menu/MenuUpdater entries AFAIK) but it's slow.

I've read your conv with Rob about the calendar.From that i've tried to import(with source) the FiFo.daemon,incorporating all previous code into the daemon_func() function,and linking the fifo in the config, but ofc (doubts) this won't work.Yet nothing that launch the script every tot mins. So nothingthat updates the FiFo (but i don't know much about how a FiFo issupposed to work).

Sorry for being redundant with the same question,but i'm not sure how this procedure has to be done.