Skip to content
forked from kewuaa/kwm

A window manager based on River Wayland compositor

License

Notifications You must be signed in to change notification settings

gnuunixchad/kwm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

394 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My build of kwm - kewuaa's Window Manager

A window manager based on River Wayland Compositor, written in Zig

tile

grid

monocle

scroller

For changes I've made, check patches

Requirements

  • Zig 0.15
  • River Wayland compositor 0.4.x (with river-window-management-v1 protocol)

Features

Multiple layout: tile, grid, monocle, scroller, floating

Tag: base tags not workspaces (supports separate window layouts for each tag)

Rule support: regex rule match

Bindings: bindings in different mode such as default, passthrough orelse your custom mode

Rich window state: swallow, maximize, fullscreen, fakefullscreen

With simple status bar: dwm like bar

build

zig build -Doptimize=ReleaseSafe

It will try to find config.zig as config file. If not found, will create it from config.def.zig as backup.

You can use -Dconfig to specify custom config file path, -Dbar to enable/disable status bar, default is true, -Doptimize to specify build mode.

configuration

Make your custom modifications in config.zig.

usage

Run kwm in your river init file or run with river -c kwm.

You could see all bindings in config.zig. It should be noted that the quit action only quit the kwm but not quit river session. It allow you restart kwm directly. If you want to quit river session, try to use Ctrl+Alt+Delete.

You could remap keyboard keys(e.g. swap CapsLock with Escape) by setting the XKB layout rules before starting river:

export XKB_DEFAULT_OPTIONS=caps:swapescape,altwin:swap_alt_win

For all options available see man 7 xkeyboard-config

How I run kwm with river

Read status from a fifo(to restart the status command without restarting kwm)

// config.zig
.status = .{ .fifo = "/run/user/1000/damblocks.fifo" },

Add below in ~/.config/river/init

/usr/local/bin/kwm &

# Start kwm with damblocks, a line generator with signaling support I wrote
# https://codeberg.org/unixchad/damblocks
# https://github.com/gnuunixchad/damblocks
${HOME}/.local/bin/damblocks --fifo &
killall -q mpc
${HOME}/.local/bin/damblocks-mpdd

And run

exec ssh-agent river --no-xwayland
# (in case a software doesn't support wayland, I use xwayland-satellite)

To restart the bar script

nohup damblocks --fifo >/dev/null 2>&1 &

Thanks to these reference project

License

The source code in this project is released under the GPL-3.0

About

A window manager based on River Wayland compositor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Zig 100.0%