Skip to content

'Tabs on top' again and 'How to hide tab bar' again #32

@suedi

Description

@suedi

revisiting #10 and #11

When using altyo in standalone mode like I do, tab bar at bottom is a bit annoying
even more so when you fill the terminal with text and you are used to look at the
bottom text line in a terminal. It gets kind of cluttery.

Since you added a config option: Tab bar mode
I'm thinking it would be trivial to add a hot-key accel
for hiding and unhiding tab bar, am I right?

I really would like tab bar on top but realize that would be a bigger code change
and possibly would produce space between tab bar and window (uggly?)
so would settle on a hot-key for hiding and unhiding tab bar, toggling that is.

If you do not like it could you please give some pointers how I would go about adding
it meself?

So I guess my questions are

  1. Would it be trivial to add
  2. Do you like the idea
  3. Pointers to where in code one could add it if you aint got time

EDIT 1

I did a really ugly proof of concept hack in altyo_window.vala

added an hotkey accel to "About", Ctrl+k, via settings menu ( right click and settings )

hijacked that accel in code this.add_window_accel("altyo_about" ... at line 2408

changed code to

this.add_window_accel("altyo_about", _("About"), _("About"), Gtk.Stock.ABOUT,"",()=>{
            this.hvbox_display_mode=1;
            this.conf.set_integer("window_hvbox_display_mode", 1);
            this.save_configuration();
            this.reconfigure();
            this.search_update();
            // this.ShowAbout(); 
        });

If I have a altyo --standalone running with several tabs visible ( window_hvbox_display_mode=0 )
and hit Ctrl+k tabs bar is hidden ( window_hvbox_display_mode=1 )

Uggly - yes, Hacky - very much so,
but proves it could be done!

EDIT 2
then I tried

this.add_window_accel("altyo_about", _("About"), _("About"), Gtk.Stock.ABOUT,"",()=>{
    if(this.hvbox_display_mode==1) {
        this.hvbox_display_mode=0;
    }
    else  {
        this.hvbox_display_mode=1;
    }
    this.search_update();
    // this.ShowAbout(); 
});

Now I can toggle between visible and hidden tab bar. :-)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions