# i3-instant-layout
Automatic 'list based' layouts for the [i3](https://i3wm.org) window manager
## Animated summary
![Demo of i3-instant-layout](https://github.com/TyberiusPrime/i3-instant-layout/raw/master/docs/_static/i3-instant-layout_demo.gif "i3-instant-layout demo")
## Description
This python program drags i3 into the 'managed layouts
tiling window manager world' kicking and screaming.
What it does is apply a window layout to your current workspace,
like this one:
-------------
| | 2 |
| |-----|
| 1 | 3 |
| |-----|
| | 4 |
-------------
The big advantage here is that it needs no 'swallow' definitions whatsoever,
it's 'instant' - just add milk, eh, press the button.
## Get started
i3-instant-layout depends xdotool which can be installed by your package manager (e.g. `sudo apt-get install xdotool` on Debian or Ubuntu)
To get started, install with `pip install i3-instant-layout`, or if you prefer, [pipx](https://github.com/pipxproject/pipx)
and add this to your i3 config:
`bindsym $mod+Escape exec "i3-instant-layout --list | rofi -dmenu -i | i3-instant-layout -` (or use the interactive menu of your choice).
## Further information
Call `i3-instant-layout --help` for full details, or
`i3-instant-layout --desc` for the full list of supported layouts (or see below).
## Helpful tips
### How to sort windows
Your current active window is what the tiler will consider the 'main window'.
To get the other windows in the right order for your layout of choice,
first enable the vStack or hStack layout, sort them,
and the proceed to your layout of choice.
### Border styles
i3-instant-layout must unmap/map the windows (ie. hide them temporarily) for i3
to place them at the right location.
Unfortunatly that appears to consume the border style.
Work around this with a line like this in your i3 config:
```
for_window [class="^.*"] border pixel 1
```
## Available layouts
Layout: vStack
Aliases: ['1col', '1c']
One column / a vertical stack.
---------
| 1 |
---------
| 2 |
---------
| 3 |
---------
--------------------------------------------------------------------------------
Layout: hStack
Aliases: ['1row', '1r']
One row / a horizontal stack
-------------
| | | |
| 1 | 2 | 3 |
| | | |
-------------
--------------------------------------------------------------------------------
Layout: v2Stack
Aliases: ['2col', '2c', '2v']
Two columns of stacks
-------------
| 1 | 4 |
-------------
| 2 | 5 |
-------------
| 3 | 6 |
-------------
--------------------------------------------------------------------------------
Layout: h2Stack
Aliases: ['2row', '2r', '2h']
Two rows of stacks
-------------------
| 1 | 2 | 3 |
-------------------
| 4 | 5 | 6 |
-------------------
--------------------------------------------------------------------------------
Layout: v3Stack
Aliases: ['3col', '3c', '3v']
Three columns of stacks
-------------------
| 1 | 3 | 5 |
-------------------
| 2 | 4 | 6 |
-------------------
--------------------------------------------------------------------------------
Layout: h3Stack
Aliases: ['3row', '3r', '3h']
Three rows of stacks
-------------------
| 1 | 2 | 3 |
-------------------
| 4 | 5 | 6 |
-------------------
| 7 | 8 | 9 |
-------------------
--------------------------------------------------------------------------------
Layout: max
Aliases: ['maxTabbed']
One large container, in tabbed mode.
---------------
| |
| 1,2,3,4, |
| |
---------------
--------------------------------------------------------------------------------
Layout: mainLeft
Aliases: ['ml', 'mv', 'MonadTall']
One large window to the left at 50%,
all others stacked to the right vertically.
-------------
| | 2 |
| |-----|
| 1 | 3 |
| |-----|
| | 4 |
-------------
--------------------------------------------------------------------------------
Layout: mainRight
Aliases: ['mr', 'vm', 'MonadTallFlip']
One large window to the right at 50%,
all others stacked to the right vertically.
-------------
| 2 | |
|-----| |
| 3 | 1 |
|-----| |
| 4 | |
-------------
--------------------------------------------------------------------------------
Layout: MainMainVStack
Aliases: ['mmv']
Two large windows to the left at 30%,
all others stacked to the right vertically.
-------------------
| | | 3 |
| | |-----|
| 1 | 2 | 4 |
| | |-----|
| | | 5 |
-------------------
--------------------------------------------------------------------------------
Layout: MainVStackMain
Aliases: ['mvm']
Two large windows at 30% to the left and right,
a vstack in the center
-------------------
| | 3 | |
| |-----| |
| 1 | 4 | 2 |
| |-----| |
| | 5 | |
-------------------
--------------------------------------------------------------------------------
Layout: matrix
Aliases: []
Place windows in a n * n matrix.
The matrix will place swallow-markers
if you have less than n*n windows.
N is math.ceil(math.sqrt(window_count))
--------------------------------------------------------------------------------
Layout: VerticalTileTop
Aliases: ['vtt']
Large master area (66%) on top,
horizontal stacking below
--------------------------------------------------------------------------------
Layout: VerticalTileBottom
Aliases: ['vtb']
Large master area (66%) on bottom,
horizontal stacking above
--------------------------------------------------------------------------------
Layout: NestedRight
Aliases: ['nr']
Nested layout, starting with a full left half.
-------------------------
| | |
| | 2 |
| | |
| 1 |-----------|
| | | 4 |
| | 3 |-----|
| | |5 | 6|
-------------------------
--------------------------------------------------------------------------------
Layout: SmartNestedRight
Aliases: ['snr']
Nested layout, starting with a full left half,
but never going below 1/16th of the size.
2 windows
-------------------------
| | |
| | |
| | |
| 1 | 2 |
| | |
| | |
| | |
-------------------------
5 windows
-------------------------
| | |
| | 2 |
| | |
| 1 |-----------|
| | | 4 |
| | 3 |-----|
| | | 5 |
-------------------------
6 windows
-------------------------
| | |
| | 2 |
| | |
| 1 |-----------|
| | 3 | 4 |
| |-----|-----|
| | 5 | 6 |
-------------------------
7 windows
-------------------------
| | | |
| | 2 | 3 |
| | | |
| 1 |-----------|
| | 4 | 5 |
| |-----|-----|
| | 6 | 7 |
-------------------------
15 windows
-------------------------
| | 2 | 4 | 6 |
| 1 |-----|-----|-----|
| | 3 | 5 | 7 |
|-----------|-----------|
| 8 | A | C | E |
|-----|-----|-----|-----|
| 9 | B | D | F |
-------------------------
Falls back to matrix layout above 16 windows.
--------------------------------------------------------------------------------
Layout: mainCenter
Aliases: ['mc', 'vmv']
One large window in the midle at 50%,
all others stacked to the left/right vertically.
-------------------
| 2 | | 5 |
|-----| |-----|
| 3 | 1 | 6 |
|-----| |-----|
| 4 | | 7 |
-------------------
--------------------------------------------------------------------------------
Raw data
{
"_id": null,
"home_page": "https://github.com/TyberiusPrime/i3-instant-layout",
"name": "i3-instant-layout",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Florian Finkernagel",
"author_email": "tyberius_prime@coonabibba.de",
"download_url": "https://files.pythonhosted.org/packages/1c/fc/c38ec93a82136af851d0af2f0d7aec6fee0b8acfb867f3e7a12a1fe5172d/i3-instant-layout-0.1.12.tar.gz",
"platform": "Linux",
"description": "# i3-instant-layout\n\n\nAutomatic 'list based' layouts for the [i3](https://i3wm.org) window manager\n\n## Animated summary\n![Demo of i3-instant-layout](https://github.com/TyberiusPrime/i3-instant-layout/raw/master/docs/_static/i3-instant-layout_demo.gif \"i3-instant-layout demo\")\n\n\n## Description\n\nThis python program drags i3 into the 'managed layouts\ntiling window manager world' kicking and screaming.\n\nWhat it does is apply a window layout to your current workspace,\nlike this one:\n\n -------------\n | | 2 |\n | |-----|\n | 1 | 3 |\n | |-----|\n | | 4 |\n -------------\n\nThe big advantage here is that it needs no 'swallow' definitions whatsoever,\nit's 'instant' - just add milk, eh, press the button.\n\n## Get started\ni3-instant-layout depends xdotool which can be installed by your package manager (e.g. `sudo apt-get install xdotool` on Debian or Ubuntu)\n\nTo get started, install with `pip install i3-instant-layout`, or if you prefer, [pipx](https://github.com/pipxproject/pipx)\nand add this to your i3 config: \n`bindsym $mod+Escape exec \"i3-instant-layout --list | rofi -dmenu -i | i3-instant-layout -` (or use the interactive menu of your choice).\n\n\n## Further information\n\nCall `i3-instant-layout --help` for full details, or \n`i3-instant-layout --desc` for the full list of supported layouts (or see below).\n\n\n## Helpful tips\n\n### How to sort windows\nYour current active window is what the tiler will consider the 'main window'.\n\nTo get the other windows in the right order for your layout of choice,\nfirst enable the vStack or hStack layout, sort them,\nand the proceed to your layout of choice.\n\n### Border styles\n\ni3-instant-layout must unmap/map the windows (ie. hide them temporarily) for i3 \nto place them at the right location.\nUnfortunatly that appears to consume the border style.\nWork around this with a line like this in your i3 config:\n```\nfor_window [class=\"^.*\"] border pixel 1\n```\n\n\n\n\n## Available layouts\n\nLayout: vStack\n\nAliases: ['1col', '1c']\n\nOne column / a vertical stack.\n\n\t---------\n\t| 1 |\n\t---------\n\t| 2 |\n\t---------\n\t| 3 |\n\t---------\n\n\n--------------------------------------------------------------------------------\n\nLayout: hStack\n\nAliases: ['1row', '1r']\n\nOne row / a horizontal stack\n\n\t-------------\n\t| | | |\n\t| 1 | 2 | 3 |\n\t| | | |\n\t-------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: v2Stack\n\nAliases: ['2col', '2c', '2v']\n\nTwo columns of stacks\n\t\n\t-------------\n\t| 1 | 4 |\n\t-------------\n\t| 2 | 5 |\n\t-------------\n\t| 3 | 6 |\n\t-------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: h2Stack\n\nAliases: ['2row', '2r', '2h']\n\nTwo rows of stacks\n\t\n\t-------------------\n\t| 1 | 2 | 3 |\n\t-------------------\n\t| 4 | 5 | 6 |\n\t-------------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: v3Stack\n\nAliases: ['3col', '3c', '3v']\n\nThree columns of stacks\n\n\t-------------------\n\t| 1 | 3 | 5 |\n\t-------------------\n\t| 2 | 4 | 6 |\n\t-------------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: h3Stack\n\nAliases: ['3row', '3r', '3h']\n\nThree rows of stacks\n\n\t-------------------\n\t| 1 | 2 | 3 |\n\t-------------------\n\t| 4 | 5 | 6 |\n\t-------------------\n\t| 7 | 8 | 9 |\n\t-------------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: max\n\nAliases: ['maxTabbed']\n\nOne large container, in tabbed mode.\n\n\t---------------\n\t| |\n\t| 1,2,3,4, |\n\t| |\n\t---------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: mainLeft\n\nAliases: ['ml', 'mv', 'MonadTall']\n\nOne large window to the left at 50%,\nall others stacked to the right vertically.\n\n\t-------------\n\t| | 2 |\n\t| |-----|\n\t| 1 | 3 |\n\t| |-----|\n\t| | 4 |\n\t-------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: mainRight\n\nAliases: ['mr', 'vm', 'MonadTallFlip']\n\nOne large window to the right at 50%,\nall others stacked to the right vertically.\n\n\t-------------\n\t| 2 | |\n\t|-----| |\n\t| 3 | 1 |\n\t|-----| |\n\t| 4 | |\n\t-------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: MainMainVStack\n\nAliases: ['mmv']\n\nTwo large windows to the left at 30%,\nall others stacked to the right vertically.\n\n\t-------------------\n\t| | | 3 |\n\t| | |-----|\n\t| 1 | 2 | 4 |\n\t| | |-----|\n\t| | | 5 |\n\t-------------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: MainVStackMain\n\nAliases: ['mvm']\n\nTwo large windows at 30% to the left and right,\na vstack in the center\n\n\t-------------------\n\t| | 3 | |\n\t| |-----| |\n\t| 1 | 4 | 2 |\n\t| |-----| |\n\t| | 5 | |\n\t-------------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: matrix\n\nAliases: []\n\nPlace windows in a n * n matrix.\n\nThe matrix will place swallow-markers\nif you have less than n*n windows.\n\nN is math.ceil(math.sqrt(window_count))\n\n\n--------------------------------------------------------------------------------\n\nLayout: VerticalTileTop\n\nAliases: ['vtt']\n\nLarge master area (66%) on top,\nhorizontal stacking below\n\n\n--------------------------------------------------------------------------------\n\nLayout: VerticalTileBottom\n\nAliases: ['vtb']\n\nLarge master area (66%) on bottom,\nhorizontal stacking above\n\n\n--------------------------------------------------------------------------------\n\nLayout: NestedRight\n\nAliases: ['nr']\n\nNested layout, starting with a full left half.\n\n\n\t-------------------------\n\t| | |\n\t| | 2 |\n\t| | |\n\t| 1 |-----------|\n\t| | | 4 |\n\t| | 3 |-----|\n\t| | |5 | 6|\n\t-------------------------\n\n\n--------------------------------------------------------------------------------\n\nLayout: SmartNestedRight\n\nAliases: ['snr']\n\nNested layout, starting with a full left half,\nbut never going below 1/16th of the size.\n\n\t2 windows\n\t-------------------------\n\t| | |\n\t| | |\n\t| | |\n\t| 1 | 2 |\n\t| | |\n\t| | |\n\t| | |\n\t-------------------------\n\n\t5 windows\n\t-------------------------\n\t| | |\n\t| | 2 |\n\t| | |\n\t| 1 |-----------|\n\t| | | 4 |\n\t| | 3 |-----|\n\t| | | 5 |\n\t-------------------------\n\n\t6 windows\n\t-------------------------\n\t| | |\n\t| | 2 |\n\t| | |\n\t| 1 |-----------|\n\t| | 3 | 4 |\n\t| |-----|-----|\n\t| | 5 | 6 |\n\t-------------------------\n\n\t7 windows\n\t-------------------------\n\t| | | |\n\t| | 2 | 3 |\n\t| | | |\n\t| 1 |-----------|\n\t| | 4 | 5 |\n\t| |-----|-----|\n\t| | 6 | 7 |\n\t-------------------------\n\n\n\t15 windows\n\t-------------------------\n\t| | 2 | 4 | 6 |\n\t| 1 |-----|-----|-----|\n\t| | 3 | 5 | 7 |\n\t|-----------|-----------|\n\t| 8 | A | C | E |\n\t|-----|-----|-----|-----|\n\t| 9 | B | D | F |\n\t-------------------------\n\nFalls back to matrix layout above 16 windows.\n\n--------------------------------------------------------------------------------\n\nLayout: mainCenter\n\nAliases: ['mc', 'vmv']\nOne large window in the midle at 50%,\nall others stacked to the left/right vertically.\n\n\t-------------------\n\t| 2 | | 5 |\n\t|-----| |-----|\n\t| 3 | 1 | 6 |\n\t|-----| |-----|\n\t| 4 | | 7 |\n\t-------------------\n\n--------------------------------------------------------------------------------",
"bugtrack_url": null,
"license": "mit",
"summary": "Automatic 'list based' layouts for the i3 window manager",
"version": "0.1.12",
"project_urls": {
"Homepage": "https://github.com/TyberiusPrime/i3-instant-layout"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1cfcc38ec93a82136af851d0af2f0d7aec6fee0b8acfb867f3e7a12a1fe5172d",
"md5": "ad9a66e576403aea8397885498b10c6f",
"sha256": "52c853356af2e23585d8f739f8889552c1a3ba47b00396db9ad9b0ffbca607bb"
},
"downloads": -1,
"filename": "i3-instant-layout-0.1.12.tar.gz",
"has_sig": false,
"md5_digest": "ad9a66e576403aea8397885498b10c6f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 10958,
"upload_time": "2024-08-13T09:04:07",
"upload_time_iso_8601": "2024-08-13T09:04:07.851330Z",
"url": "https://files.pythonhosted.org/packages/1c/fc/c38ec93a82136af851d0af2f0d7aec6fee0b8acfb867f3e7a12a1fe5172d/i3-instant-layout-0.1.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-13 09:04:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TyberiusPrime",
"github_project": "i3-instant-layout",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "i3-instant-layout"
}