Skip to content
budRich edited this page Jul 13, 2023 · 10 revisions

NAME

i3fyra - An advanced, simple grid-based tiling layout

SYNOPSIS

i3fyra --show|-s CONTAINER
i3fyra --float|-a
i3fyra --hide|-z CONTAINER
i3fyra --layout|-l LAYOUT [--array ARRAY]
i3fyra --move|-m DEST [--conid|-n CON_ID] [--speed|-p INT]
i3fyra --orientation ORIENTATION
i3fyra --clear-virtuals
i3fyra [--verbose] [--dryrun] [--force|-f] 
i3fyra --help|-h
i3fyra --version|-v 

The layout consists of four containers:

  A B
  C D

A container can contain one or more windows. The internal layout of the containers doesn't matter. By default the layout of each container is tabbed.

A is always to the left of B and D. And always above C. B is always to the right of A and C. And always above D.

This means that the containers will change names if their position changes.

The size of the containers are defined by the three splits: AB, AC and BD.

Container A and C belong to one family.
Container B and D belong to one family.

The visibility of containers and families can be toggled. Not visible containers are placed on the scratchpad.

The visibility is toggled by either using --show or --hide. But more often by moving a container in an impossible direction,(see examples below).

The i3fyra layout is only active on one workspace. That workspace can be set with the environment variable: i3FYRA_WS, otherwise the workspace active when the layout is created will be used.

The benefit of using this layout is that the placement of windows is more predictable and easier to control. Especially when using tabbed containers, which are very clunky to use with default i3.

examples

If containers A,B and C are visible but D is hidden or none existent, the visible layout would looks like this:

  A B
  C B

If action: --move up would be executed when container B is active and D is hidden. Container D would be shown. If action would have been: --move down, D would be shown but B would be placed below D, this means that the containers will also swap names. If action would have been --move left the active window in B would be moved to container A. If action was --move right, A and C would be hidden:

  B B
  B B

If we now --move left, A and C would be shown again but to the right of B, the containers would also change names, so B becomes A, A becomes B and C becomes D:

  A B
  A D

If this doesn't make sense, check out this demonstration on youtube: https://youtu.be/kU8gb6WLFk8

OPTIONS

--array              ARRAY       | ARRAY should be the output of `i3list`  
--clear-virtuals                 | clear/reset virtual positions  
-n, --conid          CON_ID      | window with **CON_ID** will be used instead of active window  
--dryrun                         | don't execute wm commands  
-a, --float                      | toggle floating state of a window  
-f, --force                      | ignore virtual positioning.  
-h, --help                       | print help and exit  
-z, --hide           CONTAINER   | Hide target containers if visible.  
-l, --layout         LAYOUT      | update the size of the layout  
-m, --move           DEST        | move window/create container  
--orientation        ORIENTATION | short description  
-s, --show           CONTAINER   | Show target container.  
-p, --speed          INT         | distance in px a floating windows will be moved  
--verbose                        | print more stuff to stderr  
-v, --version                    | louder output  

--array ARRAY

Use --array ARRAY to improve speed when i3fyra is executed from a script that already have the array, f.i. i3run and i3Kornhe.

-a, --float

Autolayout. If current window is tiled: floating enabled If window is floating, it will be put in a visible container. If there is no visible containers. The window will be placed in a hidden container. If no containers exist, container 'A'will be created and the window will be put there.

-l, --layout LAYOUT

AB is point on the X axis, calculated from the left side if INT is positive, from the right side if it is negative. AC and BD is on Y axis from the top if INT is positive, from the bottom if it is negative. The whole argument needs to be quoted. Example:

`i3fyra --layout 'AB=-300 BD=420'

LAYOUT argument can also be the word 'redo', if it is, the last layout appended will be restored.

-m, --move DEST

DEST can either be the name of a container (A|B|C|D), or it's position relative to the current container with a direction:[l|left] [r|right][u|up][d|down] If the container doesnt exist it is created. If argument is a direction and there is no container in that direction, Connected container(s) visibility is toggled. If current window is floating or not inside ABCD, normal movement is performed. Distance for moving floating windows with this action can be defined with the --speed option. Example: $ i3fyra --speed 30 -m r Will move current window 30 pixels to the right, if it is floating.

-s, --show CONTAINER

If it doesn't exist, it will be created and current window will be put in it. If it is visible, nothing happens.

ENVIRONMENT

I3FYRA_WS

Workspace to use for i3fyra. If not set, the firs workspace that request to create the layout will be used.

I3FYRA_MAIN_CONTAINER

This container will be the chosen when a container is requested but not given. When using the command autolayout (-a) for example, if the window is floating it will be sent to the main container, if no other containers exist. Defaults to A.

I3FYRA_ORIENTATION

If set to vertical main split will be AC and families will be AB and CD. Otherwise main split will be AB and families will be AC and BD.

I3_KING_PID_FILE

When i3king is running this file contains the pid of the i3king process. It is used by i3fyra to know if i3king is running, if it is, it will try to match windows against the rules when --float option toggles the floating state to tiled.

CONTACT

Send bugs and feature requests to:
/~https://github.com/budlabs/i3ass/issues

COPYRIGHT

Copyright (c) 2017-2023, budRich of budlabs
SPDX-License-Identifier: MIT

Clone this wiki locally