On Fri, 17 Sep 2004, Kamin Whitehouse wrote:

> 
> Is there any way to run Ion without the tabs/titlebar
> at the top of each frame?  
> 
> If not, is the best way to do this is to write a new
> drawing engine?  Ideally, I'd like to remove the
> tabs/titlebar and add a switch-indicator when
> switching between screens/frames/desktops.  Where
> would I start?

If you're using the latest ion3 snapshot you might find this goes part way 
to what you're looking for:

The following uses one of ion's lua hooks to hide the tab-bar for frames
where there are 0 or 1 windows, and show the tab-bar in frames containing
2 or more windows, when arguably tabs are `necesary'. It works on frames
on one of the new panews's, but leaves windows on floatws's alone.

I put the following code in cfg_ionws.lua, although I think you could put 
it in its own file and just load it.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
function show_only_necessary_tabs_in_frame(f)
        local fp=f.frame
        if obj_typename(fp)=="WFrame" then
            local t_hid=fp:is_tabbar_hidden()
            local lt_two=fp:lcount(1)<2
            if (t_hid and (not lt_two)) or ((not t_hid) and lt_two) then
                --io.stderr:write("flip enaged\n")
                fp:toggle_tabbar()
            end
        end
end

function dst_setup_hook()
    local hk=ioncore.get_hook("frame_managed_changed_hook")
    hk:add(show_only_necessary_tabs_in_frame)
end

dst_setup_hook() 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I find it works well for me, although I use a style with more vivid 
colours & slightly wider borders than the usual schemes because on frames 
with no tab there's only the border colour to tell you things like which 
frame has focus. (If you want a copy of the style please mail me.)

I haven't posted this anywhere because due to the development process 
refining the ion3 api's and function names it has needed adjusting for 
each new snapshot. When ion3 is completed I'll try and package it 
properly.

HTH

-- 
__cheers, dave____________________________________________
www.inf.ed.ac.uk/people/staff/David_Tweed.html
tel: +44 131 651 3447  fax: +44 131 651 3435
X wrote a book about this, which Y was carrying around for
a long time with little discernible effect -- John Baez

Reply via email to