Skip to content

Instantly share code, notes, and snippets.

@not-fl3
Last active October 19, 2022 20:47
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save not-fl3/505256586dbce2d3a8877afc304b1763 to your computer and use it in GitHub Desktop.
Save not-fl3/505256586dbce2d3a8877afc304b1763 to your computer and use it in GitHub Desktop.

I used ion3 and later notion for a while and got used with its tiling style. It looked like this:

ion3

Idea is pretty simple - by default all new windows is adding to current frame as a tab. And current frame may be splitted horisontal/vertical. The Ion3's tiling is static - frames stays splitted even after window is closed. You can think about it as emacs's windows(ion's frame) and buffers(X's window). You can split window whatever you like and put any buffer to any window.

Ion3 was abandoned since 2009 and its successor "notion" did not change it much. My configs from 2008 still works pretty fine :)

I was always intrested in Xmonad project. First of all Xmonad's with Xmobar default theme looks pretty cool and its enough for me to check it. I tried Xmonad (and actually most of the other tiling WMs) many times, but always got back to notion. At this time I decided to take ion's tiling style with me to XMonad.

Tabs in XMonad is working with Tabbed layout, but its only full screen tabs. So we would also need some layout combinators. I found a few ways to do it:

  • XMonad.Layout.SubLayouts

It almost did the job, but there is a bug - after dialog or named scratchpad closes - focus returns to master window. Did not find how to fix it, so lets check another options.

  • XMonad.Layout.Combo

These bindings will move a window into the sublayout that is up/down/left/right of its current position. Note that there is some weirdness in combineTwo, in that the mod-tab focus order is not very closely related to the layout order. This is because we're forced to keep track of the window positions separately, and this is ugly. If you don't like this, lobby for hierarchical stacks in core xmonad or go reimplement the core of xmonad yourself.

At this point I realised that it should be reimplemented in rust and started to seriously consider this option.

  • XMonad.Layout.Mastered

here I found intresting way to work with windows - one master window on the left and any layout on the right. Its definetly not what I am looking for, but also works pretty fine. In the moment of despair to find better options I conisdered to get used to that thing.

  • XMonad.Layout.Groups

Groups did it. With groups its possible to make normal tiling layout like Tall, but with groups instead of windows. And each group will be tabbed layout. Works pretty fine!

  • Vimonad

And I found the link with exectly my thoughts about window managers! vimonad. The problem here - that vimonad is big project abandoned (or at least not updating) since 2013. But most of the code needed to make split layout can be found and moved to xmonad.hs (have not yet done it, so not 100% sure).

So here how it looks now.

xmonad

WIP config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment