GithubHelp home page GithubHelp logo

zuranthus / zwm Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 147 KB

A minimal tiling window manager for Linux written in Zig

License: MIT License

Zig 100.00%
tiling-window-manager zig linux window-manager x11

zwm's Introduction

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

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.