Package: tile
tileSyntax and config generator for tiling window managers.TL;DRIf you are usingi3orSwaycheck out theexamplebelow.Installationpip install tileUsageCreateinput_fileusingConceptsbelow.Try it withtile input_fileWrite it to i3 config usingtile --write input_fileWrite it to Sway config usingtile --write --sway input_fileCheck outtile --helpfor more options.ConceptsMapping typestilesupports two types of mappings:Command bindings for WM built-in commands:INPUT:$mod+f->fullscreentoggle

OUTPUT:
bindsym$mod+ffullscreentoggleExec bindings, which are self-explanatoryINPUT:$mod+Return=>xterm

OUTPUT:
bindsym$mod+Returnexec--no-startup-idxtermAlternativesAlternativesexpress the idea that the same action should be bound to multiple key-bindings.For example:INPUT:$mod+h/Left->focusleft

OUTPUT:
bindsym$mod+hfocusleft
bindsym$mod+LeftfocusleftVariablesVariablesare shorter way to write bindings that have a similar structure.E.g.:INPUT:$mod+{f,s}->{fullscreen,split}toggle

OUTPUT:
bindsym$mod+ffullscreentoggle
bindsym$mod+ssplittoggleRange expansionInside variables you can write1-10and it will be expanded to1,2,3....INPUT:$mod+{1-4}->workspace{100-103}OUTPUT:
bindsym$mod+1workspace100bindsym$mod+2workspace101bindsym$mod+3workspace102bindsym$mod+4workspace103Variable referenceYou can reference current value of the variable using@nsyntax, wherenis the variable index.
Every variable is numbered (starting from 0) from left to right. E.g.:foo {bar,{foo,bar}} {0-1} ...
    ^    ^          ^
    0    1          2Use it like this:INPUT:$mod+Control+Shift{8-9,0}->movecontainertoworkspace{8-10};workspace@1

OUTPUT:
bindsym$mod+Control+Shift8movecontainertoworkspace8;workspace8bindsym$mod+Control+Shift9movecontainertoworkspace9;workspace9bindsym$mod+Control+Shift0movecontainertoworkspace10;workspace10Or to avoid repeating long sequences:INPUT:$mod+x->{[instance="calculator"]}scratchpadshow;@0movepositioncenter

OUTPUT:
bindsym$mod+x[instance="calculator"]scratchpadshow;[instance="calculator"]movepositioncenterEmpty valueYou can use empty value insideVariable, denoted by_. E.g.INPUT:$mod+{_,Shift+}h/Left->{focus,move}left

OUTPUT:
bindsym$mod+hfocusleft
bindsym$mod+Leftfocusleft
bindsym$mod+Shift+hmoveleft
bindsym$mod+Shift+LeftmoveleftNestingYou can useAlternativesandVariablesinsideVariableto create many bindings at once.INPUT:
the{{quick,brown},{fox,dog/beast}}=>{xterm,kitty}-eecho{jumps,over}OUTPUT:
bindsymthequickexec--no-startup-idxterm-eechojumps
bindsymthebrownexec--no-startup-idxterm-eechoover
bindsymthefoxexec--no-startup-idkitty-eechojumps
bindsymthedogexec--no-startup-idkitty-eechoover
bindsymthebeastexec--no-startup-idkitty-eechooverAdditional syntaxParenthesisBy default, special characters like space, plus sign, etc. aretokenseparators.INPUT:$mod+p/Print=>scrot

OUTPUT:
bindsym$mod+pexec--no-startup-idscrot
bindsym$mod+Printexec--no-startup-idscrotYou can use parenthesis to modify the behavior:INPUT:($mod+p/Print)=>scrot

OUTPUT:
bindsym$mod+pexec--no-startup-idscrot
bindsymPrintexec--no-startup-idscrotCommentsEmpty lines or lines starting with#will be ignored.INPUT:# This is a commentOUTPUT:ExampleINPUT:$mod+{_,Shift+}{h/Left,j/Down,k/Up,l/Right}->{focus,move}{left,down,up,right}$mod+Control+Shift+{{h/Left,k/Up},{l/Right,j/Down}}->resize{shrink,grow}{width,height}5pxor5ppt$mod+{_,Shift+}{1-9,0}->{_,movecontainerto}workspace{1-10}$mod+Control+Shift{1-9,0}->movecontainertoworkspace{1-10};workspace@1

OUTPUT:
bindsym$mod+hfocusleft
bindsym$mod+Leftfocusleft
bindsym$mod+jfocusdown
bindsym$mod+Downfocusdown
bindsym$mod+kfocusup
bindsym$mod+Upfocusup
bindsym$mod+lfocusright
bindsym$mod+Rightfocusright
bindsym$mod+Shift+hmoveleft
bindsym$mod+Shift+Leftmoveleft
bindsym$mod+Shift+jmovedown
bindsym$mod+Shift+Downmovedown
bindsym$mod+Shift+kmoveup
bindsym$mod+Shift+Upmoveup
bindsym$mod+Shift+lmoveright
bindsym$mod+Shift+Rightmoveright
bindsym$mod+Control+Shift+hresizeshrinkwidth5pxor5ppt
bindsym$mod+Control+Shift+Leftresizeshrinkwidth5pxor5ppt
bindsym$mod+Control+Shift+kresizeshrinkheight5pxor5ppt
bindsym$mod+Control+Shift+Upresizeshrinkheight5pxor5ppt
bindsym$mod+Control+Shift+lresizegrowwidth5pxor5ppt
bindsym$mod+Control+Shift+Rightresizegrowwidth5pxor5ppt
bindsym$mod+Control+Shift+jresizegrowheight5pxor5ppt
bindsym$mod+Control+Shift+Downresizegrowheight5pxor5ppt
bindsym$mod+1workspace1bindsym$mod+2workspace2bindsym$mod+3workspace3bindsym$mod+4workspace4bindsym$mod+5workspace5bindsym$mod+6workspace6bindsym$mod+7workspace7bindsym$mod+8workspace8bindsym$mod+9workspace9bindsym$mod+0workspace10bindsym$mod+Shift+1movecontainertoworkspace1bindsym$mod+Shift+2movecontainertoworkspace2bindsym$mod+Shift+3movecontainertoworkspace3bindsym$mod+Shift+4movecontainertoworkspace4bindsym$mod+Shift+5movecontainertoworkspace5bindsym$mod+Shift+6movecontainertoworkspace6bindsym$mod+Shift+7movecontainertoworkspace7bindsym$mod+Shift+8movecontainertoworkspace8bindsym$mod+Shift+9movecontainertoworkspace9bindsym$mod+Shift+0movecontainertoworkspace10bindsym$mod+Control+Shift1movecontainertoworkspace1;workspace1bindsym$mod+Control+Shift2movecontainertoworkspace2;workspace2bindsym$mod+Control+Shift3movecontainertoworkspace3;workspace3bindsym$mod+Control+Shift4movecontainertoworkspace4;workspace4bindsym$mod+Control+Shift5movecontainertoworkspace5;workspace5bindsym$mod+Control+Shift6movecontainertoworkspace6;workspace6bindsym$mod+Control+Shift7movecontainertoworkspace7;workspace7bindsym$mod+Control+Shift8movecontainertoworkspace8;workspace8bindsym$mod+Control+Shift9movecontainertoworkspace9;workspace9bindsym$mod+Control+Shift0movecontainertoworkspace10;workspace10Backgroundi3is a great windows manager but its config is pretty verbose.
I triedbspwmwith its hotkey daemonsxhkdand I much prefer that syntax.
That's why I wrotetile.