..

window manager #1

on may 15th the idea of blogging about the development of personal projects came up. creating a window manager was an idea that arose after a few months of experimenting with new distros (void, arch and now openSUSE).
arch gave me an idea of what freedom of choice would be like in terms of what is running on my computer.

i had never used window managers until the beginning of this year and i think about memory management in a conscious way (since 1 of the pcs with arch is a macbook air 2014 with 4gb of ram) and all the possible optimization i can do - which sometimes becomes too much (hehe).

so with an existing prototype (first commit 15/05/2023) - which already used the xcb library - i then developed a “second version” (which doesn’t count as a second version because the “first version” didn’t have many features).

i spent 2 weeks using the library again and trying to create something functional and some interesting challenges came up. i decided that this window manager should come with several integrated layout modes and so on:

layouts:

  • floating (still needs a lot of work)
  • tiling (i’m focused on this one for now)

modes:

  • normal (NORMAL_MODE) - this is the only and default floating mode.
  • max/monocle (MONOCLE_MODE). *¹
  • h-stack (STACKING_MODE) - with settings for the orientation and position of the master window. *²
  • v-stack (STACKING_MODE) - with setting for the orientation and position of the master window. *³

there are also shortcuts for: cycle between workspaces, cycle between clients (*⁴), spawning a terminal and closing the window manager.

note: all current features may be buggy. i haven’t yet created unit tests (i plan to do so soon) and am starting to better structure this current code base.

this is a personal development project that’s been fun to think about and execute - i see it as the first real attempt at a project that may be public.
it’s not my focus yet as i first need to tweak and polish all the existing code and this transition between “toy project” and public window manager will take time.

the photos below show some of the progress and features mentioned.

monocle mode *¹ - max/monocle mode

h-stack mode *² - horizontal stacking mode (master-top)

v-stack mode *³ - vertical stacking mode (master-left)

cycle between clients *⁴ - cycle between clients #1

cycle between workspaces *⁴ - cycle between clients #2