]> git.decadent.org.uk Git - ion3.git/blobdiff - mod_statusbar/mod_statusbar.lua
[svn-upgrade] Integrating new upstream version, ion3 (20070608)
[ion3.git] / mod_statusbar / mod_statusbar.lua
index 81db1a4f435e58ed1eef335b8476ebadc74a062c..1eec051e8bbefb629b4c3bc5f22992d4636088e6 100644 (file)
@@ -233,6 +233,7 @@ function mod_statusbar.rcv_statusd_err(str)
     end
 end
 
+local tried_to_launch=false
 
 --DOC
 -- Load modules and launch \file{ion-statusd} with configuration 
@@ -243,6 +244,8 @@ function mod_statusbar.launch_statusd(cfg)
         return
     end
     
+    tried_to_launch=true
+    
     local mods=get_modules()
     
     -- Load modules
@@ -253,9 +256,10 @@ function mod_statusbar.launch_statusd(cfg)
     end
 
     -- Lookup ion-statusd
-    local statusd=ioncore.lookup_script("ion-statusd")
+    local statusd_script="ion-statusd"
+    local statusd=ioncore.lookup_script(statusd_script)
     if not statusd then
-        ioncore.warn(TR("Could not find %s", script))
+        ioncore.warn(TR("Could not find %s", statusd_script))
         return
     end
 
@@ -267,7 +271,7 @@ function mod_statusbar.launch_statusd(cfg)
     local cfg=mod_statusbar.cfg_statusd(cfg or {})
     local params=""
     table.foreach(mods, function(k) params=params.." -m "..k end)
-    local cmd=statusd.." -q -c "..cfg..params
+    local cmd=statusd.." -c "..cfg..params
     
     local rcv=coroutine.wrap(mod_statusbar.rcv_statusd)
     local rcverr=mod_statusbar.rcv_statusd_err
@@ -298,8 +302,8 @@ end
 --   Variable & Type & Description \\
 --   \var{template} & string & The template; see
 --                             Section \ref{sec:statusbar}. \\
---   \var{pos} & string & Position: \code{"tl"}, \code{"tr"}, 
---                        \code{"bl"} or \code{"br"}
+--   \var{pos} & string & Position: \codestr{tl}, \codestr{tr}, 
+--                        \codestr{bl} or \codestr{br}
 --                        (for the obvious combinations of 
 --                        top/left/bottom/right). \\
 --   \var{screen} & integer & Screen number to create the statusbar on. \\
@@ -350,6 +354,6 @@ package.loaded["mod_statusbar"]=true
 dopath('cfg_statusbar', true)
 
 -- Launch statusd if the user didn't launch it.
-if statusd_pid<=0 then
+if not tried_to_launch then
     mod_statusbar.launch_statusd()
 end