You've perfectly arranged your windows.
Code in the middle, terminal to the left, browser to the right.
You're flying through your task, deep in the zone.
But then it happens: you press alt-tab
and it focuses the wrong window.
No matter, alt-shift-tab
, alt-tab-tab
.
Dammit, wrong window again.
Why is this so hard!?
No more!
With twm, you can move focus by pressing direction keys.
Duh!
alt-right
to move focus to the right.
alt-left
to go to the left.
Impossible to get wrong.
Vim shortcuts?
alt-h/j/k/l
also work.
You can also swap adjacent windows with alt-shift-<dir key>
.
Download the twm installer (.msi) or portable executable (.exe) from the releases page.
The installer makes twm autostart with Windows (can be disabled in in the system tray later) and adds it to PATH
.
twm can be configured by a TOML file that must be placed at %APPDATA%\twm\twm.toml
.
You can also use another path by setting the TWM_CONFIG_PATH
environment variable.
If the config file does not exist, twm uses the (self-explanatory) default config:
disable_drop_shadows = false
disable_rounded_corners = false
draw_focus_border = false
[hotkeys]
alt-left = "focus window left"
alt-down = "focus window down"
alt-up = "focus window up"
alt-right = "focus window right"
alt-shift-left = "swap window left"
alt-shift-down = "swap window down"
alt-shift-up = "swap window up"
alt-shift-right = "swap window right"
alt-h = "focus window left"
alt-j = "focus window down"
alt-k = "focus window up"
alt-l = "focus window right"
alt-shift-h = "swap window left"
alt-shift-j = "swap window down"
alt-shift-k = "swap window up"
alt-shift-l = "swap window right"
alt-1 = "focus desktop left"
alt-2 = "focus desktop right"
alt-shift-q = "close window"
ctrl-alt-shift-q = "terminate window"
alt-shift-r = "reload"
twm can add styling to make navigation easier. Simply enable any of the following config values:
disable_drop_shadows = true
disable_rounded_corners = true
draw_focus_border = true
# RRGGBB border colors
focused_border_color = "#999999" # light gray
unfocused_border_color = "#333333" # dark gray
Maybe you guessed that twm stands for tiling window manager... and that would be correct! I would like to add BSP-tree (binary space partitioning) tiling in the future. Until then, I recommend using FancyZones (part of PowerToys) to tile your windows.
Alternatively, check out komorebi, an almost fully fledged tiling window manager for Windows. (I say "almost" because there is no tree-based tiling like you might be used to from i3 or yabai.)
All that is required for building twm is CMake and Visual Studio 2022 or newer. Once both are installed, clone this repository and all its submodules using the following command:
> git clone --recursive https://github.com/Tom94/twm
Then, use CMake as follows:
> cmake . -B build
> cmake --build build --config Release -j
Afterwards, you can either run twm.exe
or you can create an installer with
> cpack --config build/CPackConfig.cmake
GPL 3.0