{"id":13897321,"url":"https://github.com/windwp/i3-master-stack","last_synced_at":"2026-03-16T12:32:11.278Z","repository":{"id":43487274,"uuid":"272008781","full_name":"windwp/i3-master-stack","owner":"windwp","description":"I3wm master and stack layout","archived":false,"fork":false,"pushed_at":"2022-02-26T00:16:36.000Z","size":2849,"stargazers_count":53,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-12T22:50:28.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/windwp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-13T12:55:40.000Z","updated_at":"2024-10-10T12:36:06.000Z","dependencies_parsed_at":"2022-09-22T23:51:06.004Z","dependency_job_id":null,"html_url":"https://github.com/windwp/i3-master-stack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windwp%2Fi3-master-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windwp%2Fi3-master-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windwp%2Fi3-master-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windwp%2Fi3-master-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/windwp","download_url":"https://codeload.github.com/windwp/i3-master-stack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221815401,"owners_count":16885168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T18:03:31.159Z","updated_at":"2026-03-16T12:32:11.217Z","avatar_url":"https://github.com/windwp.png","language":"Python","readme":"# FEATURE\n\n master and stack layout in i3\n```\n| ------ | ----- |\n|        |       |\n| Master | Stack |\n|        |       |\n| ------ | ----- |\n```\n\n* implement master and stack layout like dwm in i3\n\n* open first terminal in floating mode and default position \n    \u003e you don't need to open the first terminal full screen.\n    \u003e It will better if the terminal is display floating center on your screen\n    \u003e when you open another window it will change to tilling mode .\n\n    ![first terminal display](./screenshot/first_terminal.png)\n* swap from any window to master with shorcut `$mod+m`\n* move from any window to master with shorcut `$mod+shift+m`\n\n    ![swap master ](./screenshot/swap_master.gif)\n\n* swallow instance \n    \u003e this version is focus on i3 master and it is different to another swallow version \n    \u003e because it will try to restore the original position when you move the swallow instance\n\n    ![swallow vifm](./screenshot/swallow_vifm.gif)\n# Dependencies\n\n1. python3\n2. [i3ipc-python](https://github.com/altdesktop/i3ipc-python)\n3. xdotool\n4. xprop\n5. xdo \n\n\n# Install\n\n Install python 3 and install i3ipc libary\n\n `pip3 install i3ipc`\n\n Install xdotool xprop and xdo\n\n download this script and put it to your i3 config folder and run\n\n```bash\ncd ~/.config/i3/\n\ngit clone https://github.com/windwp/i3-master-stack.git\n\n```\n## Run with i3\n\n put it to your i3 config\n\n```bash\n exec --no-startup-id  $HOME/.config/i3/i3-master-stack/i3_master\n # swap to master node\n bindsym $mod+m nop swap master \n # go to master node\n bindsym $mod+shift+m nop go master \n # enable/disable master layout in current workspace\n bindsym $mod+alt+m nop master toggle \n\n ```\n reload i3 and testing layout\n\n## Run from terminal\n```bash\ncd ~/.config/i3/i3-master-stack\npython3 ./i3_master_layout.py\n ```\n you can run it use bash file [i3_master](./i3_master)\n```bash\n ./i3_master\n ```\n\n# Config\n\nrun script first and it will create a config file \n\n`$HOME/.config/i3/i3_master.ini`\n\n``` ini\n[config]\nterminal = 'Alacritty'\nscreenWidth = 1300\nscreenHeight = 800\nposX = 310\nposY = 160\nswallow = true\n\n; different size between master and slave (unit : ppt)\nmasterSizePlus = 14  \n\n; new instance on master will change to master\nslaveStack = true  \n```\n\n\u003e Note:  Use `xdotool selectwindow getwindowgeometry`  change size and get a good postion on floating window\n\n\n# File manager with swallow \n\n if your file manager is not working with the swallow function. You need to add scripts. \n \u003eExample vifm\n * Copy file [swallow](./swallow) to folder `$HOME/.config/vifm/scripts/`.\n * Edit /vifmrc \n    ```\n    filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm\n            \\ {View in feh}\n            \\ swallow feh %f,\n            \\ {View in gpicview}\n            \\ gpicview %c,\n            \\ {View in shotwell}\n            \\ shotwell,\n    ```\n# TODO\n\n- [ ] Swallow when stack have 1 instance is bad\n\n- [ ]  Swallow use xprop and xdotool is slow.\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindwp%2Fi3-master-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindwp%2Fi3-master-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindwp%2Fi3-master-stack/lists"}