Content-type: text/html
rbworkspace is a small ruby-script that could run in background and will recognize any workspacechanges. if the workspace changes it will fire an action to do some stuff which is completly free. the defaultaction is to display current workspace via osd_cat on the screen, but one could do anything as an action.
rbworkspace [-h] [-dkftm] [-l] [script]
"change" -> action is called every ws-change "timeout" -> action is called every x seconds "off" -> no action is called
examples / description for such a action-script
-- action.rb -----------------------------------------
modules RBWS
def action(number, name, count)
`echo #{number + 1}/#{count}`
end
end
-- end of action.rb ----------------------------------
to use this do a:
rbworkspace -l action.rbthis will then echo the current workspace to the shell where rbworkspace was started from. see the both commited actionscripts too for do a lot more than just echoing text :)
a fifo-file is created on demand to control rbworkspace. with this facility one is able to load new modules, to change the mode and to stop and exit rbworkspace by sending commands to this fifo just through "echo" or whatever. this file is placed at
~/.rbworkspace.fifocommands:
exit | quit : quit rbworkspace
load action : loads the current action
mode : set the mode to one of
"change" -> action each workspacechange
"timeout" -> action each amount of secs
"off" -> no actions at all
timeout secs : set the timeout in "timeout"-mode
eg:
echo "load bgperws.rb" > ~/.rbworkspace.fifo
-> load a bgperws.rb - action that changes bg on each
workspace
rbworkspace was written 2003 by mathias gumz <gumz at cs.uni-magdeburg.de>