Skip to content
/ zwm Public

A minimal tiling window manager for Linux written in Zig

License

Notifications You must be signed in to change notification settings

zuranthus/zwm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

███████╗██╗    ██╗███╗   ███╗
╚══███╔╝██║    ██║████╗ ████║
  ███╔╝ ██║ █╗ ██║██╔████╔██║
 ███╔╝  ██║███╗██║██║╚██╔╝██║
███████╗╚███╔███╔╝██║ ╚═╝ ██║
╚══════╝ ╚══╝╚══╝ ╚═╝     ╚═╝

Zwm is a dwm-inspired minimal tiling window manager for X implemented in Zig programming language.

My main goals for creating Zwm are learning Zig and implementing a minimal window manager for personal use that is easier to hack than dwm. Both goals are work in progress :)

Current state

  • Basic tiling layout
  • Workspaces (tags)
  • Focus and window management commands
  • Spawn process command
  • Customizable config file
  • Hot reloading with persisted state (requires a script)
  • Support for external status bar, like Polybar
  • Floating windows
  • Fullscreen windows
  • ICCCM and EWMH support
  • "Urgency"/"Demands attention" window state
  • Multi-monitor support
  • Support for adding new layouts
  • More built-in layouts: fullscreen, 3-column, ...
  • Iron out issues with focus, window management, and general UX

Installation

You will need at least git and zig installed.

git clone https://github.com/zuranthus/zwm.git
cd zwm
sudo zig build install -p /usr/local

Configuration

Modify src/config.zig before building and installing.

Usage

The easiest way is to start zwm with startx by adding exec zwm to ~/.xinitrc.

Hot Reloading

It is possible to restart zwm while keeping windows and their workspace distribution intact. This makes updating zwm binary a quick and painless process.

Enabling hot reloading is easy: use the following script in ~/.xinitrc instead of a simple exec zwm

while :
do
  zwm
  [[ $? == 42 ]] || break;
done

Now if you build and install a new zwm build, restart zwm with Mod + Shift + Q (configurable in src/config.zig). Voilà: you are running the new build and all windows are alive and in their workspaces.

About

A minimal tiling window manager for Linux written in Zig

Topics

Resources

License

Stars

Watchers

Forks

Languages