Content-type: text/html Manpage of rbworkspace

rbworkspace

Section: Misc. Reference Manual Pages (Februar 20, 2004)
Updated:
Index Return to Main Contents

 

ABOUT

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.  

SYNOPSIS


rbworkspace [-h] [-dkftm] [-l] [script]
 

OPTIONS

--help
-h displays this small help
--daemon
-d start rbworkspace as a daemon to run in background. this will create a pidfile which could be used to kill the process.
--fifo
-f create and use a fifofile. look at the fifo section
--kill
-k kill a running rbworkspace instance and exit.
--load
-l load a rubyscript to change the action which is called on workspace-changes
--timeout
-t set the given timeout
--mode
-m runs rbworkspace in one of these modes:

"change" -> action is called every ws-change "timeout" -> action is called every x seconds "off" -> no action is called

 

ACTIONS

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.rb

this 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 :)  

FIFO

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.fifo

commands:

   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

echo "quit" > ~/.rbworkspace.fifo
 

AUTHOR

rbworkspace was written 2003 by mathias gumz <gumz at cs.uni-magdeburg.de>


 

Index

ABOUT
SYNOPSIS
OPTIONS
ACTIONS
FIFO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 19:35:01 GMT, February 20, 2004