On 2004-09-29 12:47:22 +0200, [EMAIL PROTECTED] wrote:

> Now there's only one problem left: I use Xinerama, and osd_cat
> always prints its stuff on the first monitor. Extremely irritating,
> if you're switching workspaces on the _other_ monitor.

I managed to hack around this somewhat by building two separate
osd_cat binaries, osd_cat_0 and osd_cat_1, that are hardcoded to
display on Xinerama screen 0 and 1, respectively. Then the following
code will display the workspace name on the correct screen:

-- Show the name of the new workspace when switching workspaces.
add_to_hook("screen_workspace_switched",
    function(screen, region)
        os.execute("echo '" .. region:name() .. "' |"
                   .. " osd_cat_" .. screen:id()
                   .. " -O 2 -u black -c yellow -p middle -A center -d 1"
                   .. " -f '-*-lucida-*-r-*-*-34-*-*-*-*-*-*-*' -l 1 &")
    end
)

It would of course have been better to implement proper support in
libxosd for multiple Xinerama screens, but I don't have the time right
now.

-- 
Karl Hasselstr�m, [EMAIL PROTECTED]
      www.treskal.com/kalle

Reply via email to