Back to rankings

cococry/ragnar

C

Minimal, flexible & user-friendly X tiling window manager

window-managerx11linuxi3tiling-window-manager
Star Growth
Stars
1.2k
Forks
28
Weekly Growth
Issues
14
5001k
Feb 2024Nov 2024Sep 2025Jul 2026
README

Ragnar logo

Ragnar

Ragnar is a feature-rich, straight-to-the-point dynamic window manager for X11.

Ragnar is designed to work as both a foundation for full desktop environments and as a minimal daily-driver window manager. The project stays compact at roughly 5,000 lines of code while still providing core window manager features such as:

  • IPC support
  • External configuration
  • Tiling layouts
  • EWMH and ICCCM support
  • Reparenting-based window decoration
  • Runtime configuration reloads

Since version 2.0, Ragnar uses the XCB API to communicate with the X server. XCB provides a lower-level alternative to Xlib and gives Ragnar more direct control over X11 interactions.

Ragnar screenshot


Installation

Installing Ragnar involves two steps.

1. Install build dependencies

Install the following dependencies:

xcb-util
xcb-proto
xcb-util-keysyms
xcb-util-cursor
xcb-util-wm
xorg-server
xorg-xinit
mesa
libconfig

2. Install Ragnar

Run the installation script from the project root:

./install.sh

Technical Overview

Window Management

Ragnar uses reparenting to manage client windows. This allows the window manager to create and control decorations around client windows.

Client windows are stored in a doubly linked list. For tiling, Ragnar does not use a tree-based layout system. Instead, it provides preset layouts with predictable structure. This keeps window placement simple and avoids requiring the user to manually decide where each new window should appear.

Layouts can still be adjusted at runtime by changing the size of master and slave areas through keybindings.

IPC

Ragnar includes an abstracted IPC API for plugin development and external control.

The IPC system communicates through a socket using binary data. This allows external programs to interact with the window manager in a structured way.

Configuration

Ragnar uses libconfig to load an external configuration file:

~/.config/ragnarwm.cfg

The configuration is loaded on startup and can be reloaded while the window manager is running, typically through a keybinding.


Code Structure

funcs.h

Contains documented function declarations used throughout the window manager.

This file does not contain callback functions triggered by keybindings.

keycallbacks.h

Contains documented definitions of callback functions that can be assigned to keybindings in the configuration file.

ragnar.c

The main translation unit of the window manager.

It contains the core implementation, including:

  • The application loop
  • Event handling
  • Window management logic
  • Layout calculations
  • System-level window manager behavior

structs.h

Contains shared structures and function declarations used across the codebase.

config.h / config.c

Handles loading and parsing the Ragnar configuration file through libconfig.

ipc/socket.h / ipc/socket.c

Implements socket handling for IPC clients.

Related repositories
nikitabobko/AeroSpace

AeroSpace is an i3-like tiling window manager for macOS

SwiftMIT Licensei3wmmacos
nikitabobko.github.io/AeroSpace/guide
21.9k597
ianyh/Amethyst

Automatic tiling window manager for macOS à la xmonad.

SwiftMIT Licensewindow-managerxmonad
ianyh.com/amethyst/
16.2k526
lwouis/alt-tab-macos

Windows alt-tab on macOS

SwiftGNU General Public License v3.0alt-tabwindow-manager
alt-tab.app
16.1k786
polybar/polybar

A fast and easy-to-use status bar

C++MIT Licensepolybarlinux
polybar.github.io
15.3k728
glzr-io/glazewm

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

Rustcrates.ioGNU General Public License v3.0i3wmwindow-manager
12.4k403
awesomeWM/awesome

awesome window manager

LuaGNU General Public License v2.0awesomewmlua
awesomewm.org
6.9k625
klange/toaruos

Complete, independent operating system built by humans.

CUniversity of Illinois/NCSA Open Source Licenseoperating-systemtoaruos
toaruos.org
6.8k540
nextapps-de/winbox

WinBox is a modern HTML5 window manager for the Web.

JavaScriptnpmApache License 2.0windowwindowmanager
6.4k215
adi1090x/polybar-themes

A huge collection of polybar themes with different styles, colors and variants.

ShellGNU General Public License v3.0polybarpolybar-themes
6.2k426
qtile/qtile

:cookie: A full-featured, hackable tiling window manager written and configured in Python (X11 + Wayland)

PythonPyPIMIT Licenseqtilewindow-manager
qtile.org
5.3k735
pop-os/shell

Pop!_OS Shell

TypeScriptnpmGNU General Public License v3.0tilinggnome-shell-extension
5.3k300
RamonUnch/AltSnap

Maintained continuation of Stefan Sundin's AltDrag

CGNU General Public License v3.0windowsdesktop
5k166