The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Reduce space used by stacking containers titlebars

asked 2014-07-13 20:31:07 +0000

mikedmcfarland gravatar image

I am setting up i3 to fit my needs, and many of my layouts include stacking containers as children of a horizontal container. I end up having a couple of windows within each stacked container.

The space taken up by the title bar for each windows is a waste, since I don't personally use it. I am looking for a way to remove it entirely.

I attempted new_winow 1pixel. Which doesn't actually help, since the titles show up when in a stacked container.

I also tried to use a tabbed container instead. This is manageable, however I really want the behavior of moving vertically to access the next window in the container. I traverse across sections of the screen horizontally, and switch between windows within a container vertically. A tabbed layout makes accessing both completely horizontal.

So is there a way to remove the stacked window titles at the top of stacked containers? A means to remove title bars entirely? Or a means to have tabbed layouts get traversed by vertical movement : visually look like stacks, but functionally act like tabs?

If there really isn't a way through standard configuration, I imagine this would be possible via scripting, since I have no need for both stacks and tabs, I could make a context sensitive bindsym $mod+Left that examines the current tree, and acts differently depending on the container. I'd love any similar examples/resources on how to approach that, it certainly seems possible via the API.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-07-14 07:10:45 +0000

Adaephon gravatar image

updated 2014-07-14 07:14:18 +0000

There is no way to remove the title bars in stacked or tabbed layouts.

But there are two ways I can think of to work around this:

  1. Reduce font size

    The size of the titlebar depends entirely on the font size. If you are thinking of using 1pixel borders anyway and have no need of the titlebar, you can just use font size 0:

    font "pango:SomeFont 0"

    This makes the title bars only a few pixels high. It uses much less space while still keeping an indicator that there are several windows in a tabbed container.

  2. Use tabbed layout but change focus bindings

    You can restrict focus from moving outside the current parent container

    force_focus_wrapping yes

    With this enabled focus will wrap to the other side of the container instead of leaving it. In order to leave the container, you'll have to focus it instead of the window with focus parent first, before focusing right or left. To simplify matters you could bind one pair of keys for focusing inside a container and another to focus the parent and than in any direction (You can bind multiple commands to a key without needing a script). For example (modified default configuration):

    bindsym $mod+j focus parent; focus left bindsym $mod+k focus left bindsym $mod+l focus right bindsym $mod+semicolon focus parent; focus right

    This keeps title bars but saves space by using tabbed layout, while making it feel like stacked layout.

    Note that movement is not restricted by force_focus_warpping. Also focusing orthogonally to the container orientation (up/down in tabbed and horizontal containers, left/right in stacked and vertical containers) will not be restricted.

edit flag offensive delete link more

Comments

I'd like to just add that I opened a [feature request](https://github.com/i3/i3/issues/1311) for something like this recently, and it was considered too complex to implement with too little benefit. That's fine by me, since i3 is pretty great as it is.

ANOKNUSA gravatar imageANOKNUSA ( 2014-07-15 00:41:06 +0000 )edit

Thanks, reducing the font size actually worked out pretty well. I can live with a little loss of space.

mikedmcfarland gravatar imagemikedmcfarland ( 2014-08-23 01:48:04 +0000 )edit
0

answered 2014-07-15 01:03:48 +0000

ANOKNUSA gravatar image

updated 2014-07-15 01:12:57 +0000

One workaround is to use as few nested containers as possible, which is probably good practice anyway. For example, you can have one container with two or three stacked windows, and then vertically arrange windows outside and below it. You can move windows between those containers as necessary. This would at least get rid of the "nested indicator" titlebars that only exist to tell you "There are windows here!"

Another is to use the shelve and pull scripts from my GitHub repository. These scripts allow you to apply a mark to a container via dmenu, move it to a unique workspace named after the mark, and then move it back to the current workspace when desired.

edit flag offensive delete link more

Comments

That link is broken FYI

mikedmcfarland gravatar imagemikedmcfarland ( 2014-08-23 01:46:53 +0000 )edit

Question Tools

Stats

Asked: 2014-07-13 20:31:07 +0000

Seen: 466 times

Last updated: Jul 15 '14