refactor/kvconf 3462c76

README.md RawHistoryFolder

[!WARNING] Early alpha, but I use it every day. Developed and tested mostly on AMD CPUs and GPUs. NVIDIA support is incomplete and untested. Expect bugs and breaking config changes.

Why NeferWL

I wanted a compositor I would never have to think about. It takes the newest Wayland protocols and kernel features as they land, gives games the whole GPU, and otherwise stays out of sight.

It is small on purpose, and it will stay small. No blur, no shadows, no rounded corners, no themes. No built-in bar or wallpaper either: bring your own, any layer-shell client works.

Animations are short, cheap and off by default (experimental, animations = on).

About 40–80 MB of RAM with two 4K monitors, and almost no CPU while the screen does not change. See Performance.

OK, but why Go?

Most Wayland compositors are written in C (wlroots, Sway, Mutter), C++ (KWin, Hyprland, gamescope) or Rust (niri, COSMIC). The usual objection to Go is the garbage collector. It is a fair one, so here is how NeferWL deals with it, and why Go turns out to fit a compositor well.

A compositor is a concurrency problem

A compositor sits in the middle of many independent streams that never stop: keyboard and pointer events, client requests and buffer commits, one vblank and page-flip cycle per monitor, frame fences from the GPU, presentation feedback, screen captures, config reloads, hotplug, idle and lock state. None of them should wait on another. A slow client must not delay a flip, and rendering must not delay input.

Go has this built in. Goroutines are cheap, channels carry messages between them, and the runtime spreads them over every CPU core. NeferWL follows one idiom everywhere: each piece of state has one owner goroutine, and others talk to it over channels.

  • Input runs on its own thread, reads libinput and sends events to core.
  • Core owns windows, workspaces and focus. It turns input and client events into layouts and scenes.
  • The Wayland server owns client connections. It sends client events and surface content, and receives commands back.
  • Each output owns its DRM state, renders its scenes with Vulkan, commits frames and reports flips and presentation times.
  • Capture, config, idle, sessions and leases each run in their own goroutine.

About 35 channels connect them, all created in one place, so the full data flow is easy to read. There is no mutex on window state, no lock ordering to get wrong, and the race detector checks every test. When CAP_SYS_NICE is granted, the input and output goroutines lock their OS thread and request real-time scheduling, so a busy CPU cannot delay a cursor move or a flip.

Keeping the garbage collector out of the way

  • The hot path does not allocate. Frame callbacks, presentation reports, DRM flips, Vulkan submissions and surface updates reuse memory owned by the goroutine that handles them. make check runs allocation guards that fail the build when one of these paths starts allocating.
  • The GC has almost nothing to collect. Client buffers live in shared and GPU memory, not on the Go heap, so the live heap is a few megabytes. Playing a 4K HDR video with 65 tiled subsurfaces committing every frame, GC takes under 9 % of a process that itself takes 13 % of a core. See Performance.
  • No cgo. NeferWL builds with CGO_ENABLED=0. libwayland, Vulkan and libinput are loaded at runtime through purego with fixed-arity calls: no reflection, no allocation at the boundary.
  • Work only when something changes. Damage tracking redraws only what changed, surfaces hidden behind opaque ones are skipped, and an idle output does nothing.
  • Tuned on real hardware. Under VRR, cursor moves ride on the game's next frame instead of forcing their own refresh, and game frames keep a short gap after each flip so the panel does not fall back to its slowest rate.

A pleasure to work on

A full build takes seconds, and tests, race detection, profiling and formatting come with the language. I also like bringing more tools to the Go ecosystem. NeferWL grew its own libraries along the way, and other Go projects can use them:

Features

Display and games

  • Direct scanout: eligible fullscreen buffers go straight to the display, without composition.
  • VRR and tearing: enabled by default for supported fullscreen use (render.vrr, render.tearing). Tearing requires direct scanout and a client request.
  • Explicit sync: client fences go to the GPU and KMS. Enabled by default, with no flag to set.
  • HDR: HDR10 on capable displays, with configurable brightness for SDR content.
  • Multi-monitor: separate workspaces and fractional scale per output. Workspaces move when a monitor is unplugged and return when it reconnects.
  • Hidden apps rest: a window you cannot see (another workspace, a hidden stash, scrolled off screen, under a fullscreen window) gets frame callbacks once per second and the suspended state. Browsers and games stop drawing frames nobody sees. A window being captured keeps its output's refresh rate.
  • X11 apps: Steam and other X11 clients run through xwayland-satellite. Wine can run natively on Wayland.

Windows and workspaces

  • Cascade tiling (default): an original layout. Columns fill the screen side by side, then continue in a new band below; scroll bands vertically and switch workspaces sideways. See Cascade.
  • Other layouts: scroll horizontally, as in PaperWM and niri, or keep columns on screen in a fixed spiral. Choose per output or workspace.
  • Overview: cmd+o or a four-finger swipe up shows live workspace previews. Select a window with the keyboard, touchpad or mouse.
  • Stash: cmd+s toggles a floating strip of windows set aside for the current workspace. cmd+shift+s moves a window into or out of it.
  • Workspaces: numbered workspaces appear as needed. Named workspaces can start commands and place their windows in predefined columns.

Desktop integration

Bring your own desktop UI: any layer-shell client, such as Noctalia or Waybar, works. No built-in bar, launcher or notifications; input methods like fcitx5 work through their standard protocols. For capture and idle management, see nefercap and neferafk.

Configuration is a flat key = value file that reloads on save. A JSON state file exposes outputs, workspaces and windows to scripts. See Desktop integration.

Install

Arch Linux

Choose an AUR package:

paru -S neferwl-bin   # latest release, pre-built for x86_64 and aarch64
paru -S neferwl-git   # latest main, built from source

Or install from a checkout with Go 1.27:

make install   # build a package from HEAD and install it with pacman

make pkg builds the package without installing it.

Ubuntu 24.04 and later

Download the .deb for your architecture (amd64 or arm64) and checksums.txt from Releases, then install it with apt, which pulls the runtime dependencies:

sha256sum -c --ignore-missing checksums.txt
sudo apt install ./neferwl_<version>_amd64.deb

Optional tools:

sudo apt install foot fuzzel xdg-desktop-portal-gtk xdg-desktop-portal-wlr

X11 apps need xwayland-satellite 0.7 or later, which you may have to build. The package is tested on Ubuntu 24.04 and 26.04; Debian with the same library packages should work but is untested.

What the packages provide

The Arch and Debian packages provide:

  • neferwl with CAP_SYS_NICE for real-time scheduling.
  • A NeferWL session for display managers such as Ly, GDM and SDDM.
  • neferwl-session, which starts neferwl.service and manages graphical-session.target so desktop services start and stop with the session.

Running neferwl --session directly also exports the display environment to D-Bus and systemd user services. See Desktop integration for session setup.

Copy /usr/share/doc/neferwl/config.example to ~/.config/neferwl/config to start from the example config.

Other distributions

Download a linux_amd64 or linux_arm64 archive from Releases and verify it against checksums.txt. To build locally, run make bin; the binary is bin/neferwl.

Hardware support

NeferWL requires Linux, atomic KMS and a Vulkan 1.3 device that can export images as dmabufs. It reports an error at startup if these requirements are not met.

GPU Status
AMD Developed and tested on radv
NVIDIA Untested; explicit sync is implemented, but support is incomplete
Intel Untested

Reports from NVIDIA and Intel users are welcome.

Configuration

The default file is $XDG_CONFIG_HOME/neferwl/config, or ~/.config/neferwl/config.

keyboard.layout = fr
terminal.auto-open = first
startup = waybar

output.DP-1 = 3840x2160@144
output.DP-1.scale = 1.5

layout.max-columns = 3

# Start and place an editor and terminal when this workspace is opened.
workspace.dev.monitor = DP-1
workspace.dev.column.1 = 67%, code --new-window
workspace.dev.column.2 = 33%, foot
bind.cmd+d = workspace dev

See Configuration for all keys, actions and default bindings, or examples/config for commented defaults.

  • Use one key = value per line; # starts a comment.
  • Missing keys use defaults. Invalid lines warn and keep that key's default; other lines still apply.
  • Save to reload. The log lists changed keys.
  • Use neferwl --config <path> to select a file, or neferwl validate-config [path] to check it without starting the compositor.

Default configuration

These values apply without a config file. Empty values use the system setting; terminal uses $TERMINAL, then foot. No startup commands or named workspaces are configured by default. cmd means Super.

# Keyboard and commands
keyboard.layout =
keyboard.variant =
keyboard.options =
keyboard.repeat-rate = 25
keyboard.repeat-delay = 600
keyboard.cmd = super
terminal =
terminal.auto-open = first
xwayland = xwayland-satellite

# Appearance and layout
background = #111111
border.width = 2
border.active = #808080
border.inactive = #111111
floating.dim = 0.3
layout.gaps = 0
layout.max-columns = 2
layout.overflow = cascade
layout.presets = 1/3, 1/2, 2/3, 1
stash.width = 80
stash.gap = 2
stash.dim = 0.5
stash.capture = on

# Input
touchpad.natural-scroll = off
touchpad.tap = on
touchpad.accel-speed = 0
touchpad.accel-profile = adaptive
touchpad.left-handed = off
touchpad.scroll-factor = 1
mouse.natural-scroll = off
mouse.accel-speed = 0
mouse.accel-profile = adaptive
mouse.left-handed = off
cursor.hide-after = 5s

# Focus and animations
focus.follow-move = off
animations = off
animations.speed = normal
focus.animation = pulse
focus.effect = screen
focus.strength = 0.04

# Rendering and logging
render.direct-scanout = on
render.tearing = on
render.vrr = on
render.vrr-flip-gap = 1ms
performance.realtime = on
log.level = info
log.debug =

# Launch, close and session
bind.cmd+return = spawn-terminal
bind.ctrl+cmd+space = spawn fuzzel
bind.cmd+q = close-window
bind.ctrl+alt+backspace = quit

# Focus and move
bind.cmd+left = focus-column-left
bind.cmd+right = focus-column-right
bind.cmd+up = focus-window-up
bind.cmd+down = focus-window-down
bind.cmd+h = focus-column-left
bind.cmd+l = focus-column-right
bind.cmd+k = focus-window-up
bind.cmd+j = focus-window-down
bind.cmd+shift+left = move-column-left
bind.cmd+shift+right = move-column-right
bind.cmd+shift+h = move-column-left
bind.cmd+shift+l = move-column-right
bind.cmd+shift+up = move-window-up
bind.cmd+shift+down = move-window-down
bind.cmd+shift+k = move-window-up
bind.cmd+shift+j = move-window-down
bind.cmd+bracketleft = consume-or-expel-window-left
bind.cmd+bracketright = consume-or-expel-window-right

# Resize and window modes
bind.cmd+alt+left = set-column-width -10%
bind.cmd+alt+right = set-column-width +10%
bind.cmd+alt+up = set-window-height -10%
bind.cmd+alt+down = set-window-height +10%
bind.cmd+alt+h = set-column-width -10%
bind.cmd+alt+l = set-column-width +10%
bind.cmd+alt+k = set-window-height -10%
bind.cmd+alt+j = set-window-height +10%
bind.cmd+shift+space = toggle-floating
bind.cmd+r = cycle-column-width
bind.cmd+f = maximize-column
bind.cmd+shift+f = toggle-fullscreen
bind.cmd+s = toggle-stash-visible
bind.cmd+shift+s = toggle-window-stash
bind.cmd+o = toggle-overview
bind.cmd+tab = switch-column-next
bind.cmd+shift+tab = switch-column-prev

# Workspaces
bind.cmd+pageup = focus-workspace-prev
bind.cmd+pagedown = focus-workspace-next
bind.cmd+shift+pageup = move-column-to-workspace-prev
bind.cmd+shift+pagedown = move-column-to-workspace-next
bind.cmd+ctrl+shift+up = move-workspace-prev
bind.cmd+ctrl+shift+down = move-workspace-next
bind.cmd+ctrl+shift+k = move-workspace-prev
bind.cmd+ctrl+shift+j = move-workspace-next
bind.cmd+code:2 = focus-workspace 1
bind.cmd+code:3 = focus-workspace 2
bind.cmd+code:4 = focus-workspace 3
bind.cmd+code:5 = focus-workspace 4
bind.cmd+code:6 = focus-workspace 5
bind.cmd+code:7 = focus-workspace 6
bind.cmd+code:8 = focus-workspace 7
bind.cmd+code:9 = focus-workspace 8
bind.cmd+code:10 = focus-workspace 9
bind.cmd+shift+code:2 = move-column-to-workspace 1
bind.cmd+shift+code:3 = move-column-to-workspace 2
bind.cmd+shift+code:4 = move-column-to-workspace 3
bind.cmd+shift+code:5 = move-column-to-workspace 4
bind.cmd+shift+code:6 = move-column-to-workspace 5
bind.cmd+shift+code:7 = move-column-to-workspace 6
bind.cmd+shift+code:8 = move-column-to-workspace 7
bind.cmd+shift+code:9 = move-column-to-workspace 8
bind.cmd+shift+code:10 = move-column-to-workspace 9

# Monitors and scale
bind.cmd+ctrl+left = focus-monitor-left
bind.cmd+ctrl+right = focus-monitor-right
bind.cmd+ctrl+h = focus-monitor-left
bind.cmd+ctrl+l = focus-monitor-right
bind.cmd+ctrl+shift+left = move-workspace-to-monitor-left
bind.cmd+ctrl+shift+right = move-workspace-to-monitor-right
bind.cmd+ctrl+shift+h = move-workspace-to-monitor-left
bind.cmd+ctrl+shift+l = move-workspace-to-monitor-right
bind.cmd+code:13 = scale-up
bind.cmd+code:12 = scale-down

Per-output defaults (replace <name> with a connector such as DP-1):

output.<name> = preferred
output.<name>.scale = 1
output.<name>.transform = normal
output.<name>.primary = off
output.<name>.offset = 0
output.<name>.hdr = off
output.<name>.sdr-brightness = 203

Outputs are arranged automatically unless .right-of, .left-of, .above or .below is set. Per-output layouts inherit layout.*; named workspaces inherit their output's layout and size, use the focused output unless .monitor is set, and have no predefined columns. Media keys have no default bindings.

See Configuration for accepted values and workspace options.

Automatic terminal

The command comes from terminal, then $TERMINAL, then foot.

terminal.auto-open Behaviour
first Open once on the initial numbered workspace
all Open on each visible empty workspace without predefined slots
off Do not open automatically

--no-terminal disables automatic opening for one run; spawn-terminal still works. Launched programs inherit $SHELL, $EDITOR and $VISUAL.

Documentation

  • Configuration: keys, actions, bindings and HDR.
  • Desktop integration: sessions, clipboard, input methods, X11 apps and scripting.
  • Session locking: external lockers, recovery and security limits.
  • Screen capture: protocols, indicator, executable allowlist and portals.
  • Headless mode: screenshots, input scripts and input-method testing without a screen.
  • Performance: rendering, frame pacing, profiling and reference measurements.

Contributing

Open an issue and wait for acceptance before sending a pull request, including for bug fixes. Pull requests without an accepted issue are closed.

Before submitting, run make check, make race, make mocks-check and staticcheck ./.... See AGENTS.md for repository rules.

License

GNU General Public License v3.0.

source
1<h1 align="center">NeferWL</h1>
2
3<p align="center">
4  <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPLv3-blue?style=flat-square" alt="License: GPLv3"></a>
5  <a href="https://github.com/bnema/neferwl"><img src="https://img.shields.io/badge/platform-Linux-blue?style=flat-square" alt="Platform: Linux"></a>
6  <a href="https://github.com/bnema/neferwl/commits/main"><img src="https://img.shields.io/github/last-commit/bnema/neferwl/main?style=flat-square&logo=github" alt="Last commit"></a>
7  <a href="https://github.com/bnema/neferwl/stargazers"><img src="https://img.shields.io/github/stars/bnema/neferwl?style=flat-square&logo=github" alt="GitHub stars"></a>
8</p>
9
10<p align="center">A Wayland compositor that spends its frames on your apps, not on itself.</p>
11
12> [!WARNING]
13> **Early alpha, but I use it every day.** Developed and tested mostly on AMD CPUs and GPUs. NVIDIA support is incomplete and untested. Expect bugs and breaking config changes.
14
15## Why NeferWL
16
17I wanted a compositor I would never have to think about. It takes the newest Wayland protocols and kernel features as they land, gives games the whole GPU, and otherwise stays out of sight.
18
19It is small on purpose, and it will stay small. No blur, no shadows, no rounded corners, no themes. No built-in bar or wallpaper either: bring your own, any layer-shell client works.
20
21Animations are short, cheap and off by default (experimental, `animations = on`).
22
23About 40–80 MB of RAM with two 4K monitors, and almost no CPU while the screen does not change. See [Performance](docs/performance.md).
24
25## OK, but why Go?
26
27Most Wayland compositors are written in C (wlroots, Sway, Mutter), C++ (KWin, Hyprland, gamescope) or Rust (niri, COSMIC). The usual objection to Go is the garbage collector. It is a fair one, so here is how NeferWL deals with it, and why Go turns out to fit a compositor well.
28
29### A compositor is a concurrency problem
30
31A compositor sits in the middle of many independent streams that never stop: keyboard and pointer events, client requests and buffer commits, one vblank and page-flip cycle per monitor, frame fences from the GPU, presentation feedback, screen captures, config reloads, hotplug, idle and lock state. None of them should wait on another. A slow client must not delay a flip, and rendering must not delay input.
32
33Go has this built in. Goroutines are cheap, channels carry messages between them, and the runtime spreads them over every CPU core. NeferWL follows one idiom everywhere: **each piece of state has one owner goroutine, and others talk to it over channels.**
34
35- **Input** runs on its own thread, reads libinput and sends events to core.
36- **Core** owns windows, workspaces and focus. It turns input and client events into layouts and scenes.
37- **The Wayland server** owns client connections. It sends client events and surface content, and receives commands back.
38- **Each output** owns its DRM state, renders its scenes with Vulkan, commits frames and reports flips and presentation times.
39- **Capture, config, idle, sessions and leases** each run in their own goroutine.
40
41About 35 channels connect them, all created in one place, so the full data flow is easy to read. There is no mutex on window state, no lock ordering to get wrong, and the race detector checks every test. When CAP_SYS_NICE is granted, the input and output goroutines lock their OS thread and request real-time scheduling, so a busy CPU cannot delay a cursor move or a flip.
42
43### Keeping the garbage collector out of the way
44
45- **The hot path does not allocate.** Frame callbacks, presentation reports, DRM flips, Vulkan submissions and surface updates reuse memory owned by the goroutine that handles them. `make check` runs allocation guards that fail the build when one of these paths starts allocating.
46- **The GC has almost nothing to collect.** Client buffers live in shared and GPU memory, not on the Go heap, so the live heap is a few megabytes. Playing a 4K HDR video with 65 tiled subsurfaces committing every frame, GC takes under 9 % of a process that itself takes 13 % of a core. See [Performance](docs/performance.md).
47- **No cgo.** NeferWL builds with `CGO_ENABLED=0`. libwayland, Vulkan and libinput are loaded at runtime through [purego](https://github.com/ebitengine/purego) with fixed-arity calls: no reflection, no allocation at the boundary.
48- **Work only when something changes.** Damage tracking redraws only what changed, surfaces hidden behind opaque ones are skipped, and an idle output does nothing.
49- **Tuned on real hardware.** Under VRR, cursor moves ride on the game's next frame instead of forcing their own refresh, and game frames keep a short gap after each flip so the panel does not fall back to its slowest rate.
50
51### A pleasure to work on
52
53A full build takes seconds, and tests, race detection, profiling and formatting come with the language. I also like bringing more tools to the Go ecosystem. NeferWL grew its own libraries along the way, and other Go projects can use them:
54
55- [purego-libwayland](https://github.com/bnema/purego-libwayland): libwayland-server without cgo.
56- [purego-vulkan](https://github.com/bnema/purego-vulkan): Vulkan without cgo, generated from `vk.xml`.
57- [go-wayland-bindings](https://github.com/bnema/go-wayland-bindings): Wayland protocol bindings, generated from the upstream XML.
58- [wlturbo](https://github.com/bnema/wlturbo): a fast Wayland client.
59- [neferclient](https://github.com/bnema/neferclient): a client toolkit on top of them: connection, outputs, surface roles, seat and dmabuf presentation.
60
61## Features
62
63### Display and games
64
65- **Direct scanout:** eligible fullscreen buffers go straight to the display, without composition.
66- **VRR and tearing:** enabled by default for supported fullscreen use (`render.vrr`, `render.tearing`). Tearing requires direct scanout and a client request.
67- **Explicit sync:** client fences go to the GPU and KMS. Enabled by default, with no flag to set.
68- **HDR:** HDR10 on capable displays, with configurable brightness for SDR content.
69- **Multi-monitor:** separate workspaces and fractional scale per output. Workspaces move when a monitor is unplugged and return when it reconnects.
70- **Hidden apps rest:** a window you cannot see (another workspace, a hidden stash, scrolled off screen, under a fullscreen window) gets frame callbacks once per second and the suspended state. Browsers and games stop drawing frames nobody sees. A window being captured keeps its output's refresh rate.
71- **X11 apps:** Steam and other X11 clients run through xwayland-satellite. Wine can run natively on Wayland.
72
73### Windows and workspaces
74
75- **Cascade tiling (default):** an original layout. Columns fill the screen side by side, then continue in a new band below; scroll bands vertically and switch workspaces sideways. See [Cascade](docs/config.md#cascade).
76- **Other layouts:** scroll horizontally, as in PaperWM and niri, or keep columns on screen in a fixed spiral. Choose per output or workspace.
77- **Overview:** `cmd+o` or a four-finger swipe up shows live workspace previews. Select a window with the keyboard, touchpad or mouse.
78- **Stash:** `cmd+s` toggles a floating strip of windows set aside for the current workspace. `cmd+shift+s` moves a window into or out of it.
79- **Workspaces:** numbered workspaces appear as needed. Named workspaces can start commands and place their windows in predefined columns.
80
81### Desktop integration
82
83Bring your own desktop UI: any layer-shell client, such as Noctalia or Waybar, works. No built-in bar, launcher or notifications; input methods like fcitx5 work through their standard protocols. For capture and idle management, see [nefercap](https://github.com/bnema/nefercap) and [neferafk](https://github.com/bnema/neferafk).
84
85Configuration is a flat `key = value` file that reloads on save. A JSON state file exposes outputs, workspaces and windows to scripts. See [Desktop integration](docs/desktop.md).
86
87## Install
88
89### Arch Linux
90
91Choose an AUR package:
92
93```sh
94paru -S neferwl-bin   # latest release, pre-built for x86_64 and aarch64
95paru -S neferwl-git   # latest main, built from source
96```
97
98Or install from a checkout with Go 1.27:
99
100```sh
101make install   # build a package from HEAD and install it with pacman
102```
103
104`make pkg` builds the package without installing it.
105
106### Ubuntu 24.04 and later
107
108Download the `.deb` for your architecture (`amd64` or `arm64`) and `checksums.txt` from [Releases](https://github.com/bnema/neferwl/releases), then install it with apt, which pulls the runtime dependencies:
109
110```sh
111sha256sum -c --ignore-missing checksums.txt
112sudo apt install ./neferwl_<version>_amd64.deb
113```
114
115Optional tools:
116
117```sh
118sudo apt install foot fuzzel xdg-desktop-portal-gtk xdg-desktop-portal-wlr
119```
120
121X11 apps need [xwayland-satellite](https://github.com/Supreeeme/xwayland-satellite) 0.7 or later, which you may have to build. The package is tested on Ubuntu 24.04 and 26.04; Debian with the same library packages should work but is untested.
122
123### What the packages provide
124
125The Arch and Debian packages provide:
126
127- `neferwl` with CAP_SYS_NICE for real-time scheduling.
128- A **NeferWL** session for display managers such as Ly, GDM and SDDM.
129- `neferwl-session`, which starts `neferwl.service` and manages `graphical-session.target` so desktop services start and stop with the session.
130
131Running `neferwl --session` directly also exports the display environment to D-Bus and systemd user services. See [Desktop integration](docs/desktop.md) for session setup.
132
133Copy `/usr/share/doc/neferwl/config.example` to `~/.config/neferwl/config` to start from the example config.
134
135### Other distributions
136
137Download a `linux_amd64` or `linux_arm64` archive from [Releases](https://github.com/bnema/neferwl/releases) and verify it against `checksums.txt`. To build locally, run `make bin`; the binary is `bin/neferwl`.
138
139## Hardware support
140
141NeferWL requires Linux, atomic KMS and a Vulkan 1.3 device that can export images as dmabufs. It reports an error at startup if these requirements are not met.
142
143| GPU | Status |
144| --- | --- |
145| AMD | Developed and tested on radv |
146| NVIDIA | Untested; explicit sync is implemented, but support is incomplete |
147| Intel | Untested |
148
149Reports from NVIDIA and Intel users are welcome.
150
151## Configuration
152
153The default file is `$XDG_CONFIG_HOME/neferwl/config`, or `~/.config/neferwl/config`.
154
155```text
156keyboard.layout = fr
157terminal.auto-open = first
158startup = waybar
159
160output.DP-1 = 3840x2160@144
161output.DP-1.scale = 1.5
162
163layout.max-columns = 3
164
165# Start and place an editor and terminal when this workspace is opened.
166workspace.dev.monitor = DP-1
167workspace.dev.column.1 = 67%, code --new-window
168workspace.dev.column.2 = 33%, foot
169bind.cmd+d = workspace dev
170```
171
172See [Configuration](docs/config.md) for all keys, actions and default bindings, or [examples/config](examples/config) for commented defaults.
173
174- Use one `key = value` per line; `#` starts a comment.
175- Missing keys use defaults. Invalid lines warn and keep that key's default; other lines still apply.
176- Save to reload. The log lists changed keys.
177- Use `neferwl --config <path>` to select a file, or `neferwl validate-config [path]` to check it without starting the compositor.
178
179### Default configuration
180
181<details>
182<summary>All default settings and key bindings</summary>
183
184These values apply without a config file. Empty values use the system setting; `terminal` uses `$TERMINAL`, then `foot`. No startup commands or named workspaces are configured by default. `cmd` means Super.
185
186```text
187# Keyboard and commands
188keyboard.layout =
189keyboard.variant =
190keyboard.options =
191keyboard.repeat-rate = 25
192keyboard.repeat-delay = 600
193keyboard.cmd = super
194terminal =
195terminal.auto-open = first
196xwayland = xwayland-satellite
197
198# Appearance and layout
199background = #111111
200border.width = 2
201border.active = #808080
202border.inactive = #111111
203floating.dim = 0.3
204layout.gaps = 0
205layout.max-columns = 2
206layout.overflow = cascade
207layout.presets = 1/3, 1/2, 2/3, 1
208stash.width = 80
209stash.gap = 2
210stash.dim = 0.5
211stash.capture = on
212
213# Input
214touchpad.natural-scroll = off
215touchpad.tap = on
216touchpad.accel-speed = 0
217touchpad.accel-profile = adaptive
218touchpad.left-handed = off
219touchpad.scroll-factor = 1
220mouse.natural-scroll = off
221mouse.accel-speed = 0
222mouse.accel-profile = adaptive
223mouse.left-handed = off
224cursor.hide-after = 5s
225
226# Focus and animations
227focus.follow-move = off
228animations = off
229animations.speed = normal
230focus.animation = pulse
231focus.effect = screen
232focus.strength = 0.04
233
234# Rendering and logging
235render.direct-scanout = on
236render.tearing = on
237render.vrr = on
238render.vrr-flip-gap = 1ms
239performance.realtime = on
240log.level = info
241log.debug =
242
243# Launch, close and session
244bind.cmd+return = spawn-terminal
245bind.ctrl+cmd+space = spawn fuzzel
246bind.cmd+q = close-window
247bind.ctrl+alt+backspace = quit
248
249# Focus and move
250bind.cmd+left = focus-column-left
251bind.cmd+right = focus-column-right
252bind.cmd+up = focus-window-up
253bind.cmd+down = focus-window-down
254bind.cmd+h = focus-column-left
255bind.cmd+l = focus-column-right
256bind.cmd+k = focus-window-up
257bind.cmd+j = focus-window-down
258bind.cmd+shift+left = move-column-left
259bind.cmd+shift+right = move-column-right
260bind.cmd+shift+h = move-column-left
261bind.cmd+shift+l = move-column-right
262bind.cmd+shift+up = move-window-up
263bind.cmd+shift+down = move-window-down
264bind.cmd+shift+k = move-window-up
265bind.cmd+shift+j = move-window-down
266bind.cmd+bracketleft = consume-or-expel-window-left
267bind.cmd+bracketright = consume-or-expel-window-right
268
269# Resize and window modes
270bind.cmd+alt+left = set-column-width -10%
271bind.cmd+alt+right = set-column-width +10%
272bind.cmd+alt+up = set-window-height -10%
273bind.cmd+alt+down = set-window-height +10%
274bind.cmd+alt+h = set-column-width -10%
275bind.cmd+alt+l = set-column-width +10%
276bind.cmd+alt+k = set-window-height -10%
277bind.cmd+alt+j = set-window-height +10%
278bind.cmd+shift+space = toggle-floating
279bind.cmd+r = cycle-column-width
280bind.cmd+f = maximize-column
281bind.cmd+shift+f = toggle-fullscreen
282bind.cmd+s = toggle-stash-visible
283bind.cmd+shift+s = toggle-window-stash
284bind.cmd+o = toggle-overview
285bind.cmd+tab = switch-column-next
286bind.cmd+shift+tab = switch-column-prev
287
288# Workspaces
289bind.cmd+pageup = focus-workspace-prev
290bind.cmd+pagedown = focus-workspace-next
291bind.cmd+shift+pageup = move-column-to-workspace-prev
292bind.cmd+shift+pagedown = move-column-to-workspace-next
293bind.cmd+ctrl+shift+up = move-workspace-prev
294bind.cmd+ctrl+shift+down = move-workspace-next
295bind.cmd+ctrl+shift+k = move-workspace-prev
296bind.cmd+ctrl+shift+j = move-workspace-next
297bind.cmd+code:2 = focus-workspace 1
298bind.cmd+code:3 = focus-workspace 2
299bind.cmd+code:4 = focus-workspace 3
300bind.cmd+code:5 = focus-workspace 4
301bind.cmd+code:6 = focus-workspace 5
302bind.cmd+code:7 = focus-workspace 6
303bind.cmd+code:8 = focus-workspace 7
304bind.cmd+code:9 = focus-workspace 8
305bind.cmd+code:10 = focus-workspace 9
306bind.cmd+shift+code:2 = move-column-to-workspace 1
307bind.cmd+shift+code:3 = move-column-to-workspace 2
308bind.cmd+shift+code:4 = move-column-to-workspace 3
309bind.cmd+shift+code:5 = move-column-to-workspace 4
310bind.cmd+shift+code:6 = move-column-to-workspace 5
311bind.cmd+shift+code:7 = move-column-to-workspace 6
312bind.cmd+shift+code:8 = move-column-to-workspace 7
313bind.cmd+shift+code:9 = move-column-to-workspace 8
314bind.cmd+shift+code:10 = move-column-to-workspace 9
315
316# Monitors and scale
317bind.cmd+ctrl+left = focus-monitor-left
318bind.cmd+ctrl+right = focus-monitor-right
319bind.cmd+ctrl+h = focus-monitor-left
320bind.cmd+ctrl+l = focus-monitor-right
321bind.cmd+ctrl+shift+left = move-workspace-to-monitor-left
322bind.cmd+ctrl+shift+right = move-workspace-to-monitor-right
323bind.cmd+ctrl+shift+h = move-workspace-to-monitor-left
324bind.cmd+ctrl+shift+l = move-workspace-to-monitor-right
325bind.cmd+code:13 = scale-up
326bind.cmd+code:12 = scale-down
327```
328
329Per-output defaults (replace `<name>` with a connector such as `DP-1`):
330
331```text
332output.<name> = preferred
333output.<name>.scale = 1
334output.<name>.transform = normal
335output.<name>.primary = off
336output.<name>.offset = 0
337output.<name>.hdr = off
338output.<name>.sdr-brightness = 203
339```
340
341Outputs are arranged automatically unless `.right-of`, `.left-of`, `.above` or `.below` is set. Per-output layouts inherit `layout.*`; named workspaces inherit their output's layout and size, use the focused output unless `.monitor` is set, and have no predefined columns. Media keys have no default bindings.
342
343See [Configuration](docs/config.md) for accepted values and workspace options.
344
345</details>
346
347### Automatic terminal
348
349The command comes from `terminal`, then `$TERMINAL`, then `foot`.
350
351| `terminal.auto-open` | Behaviour |
352| --- | --- |
353| `first` | Open once on the initial numbered workspace |
354| `all` | Open on each visible empty workspace without predefined slots |
355| `off` | Do not open automatically |
356
357`--no-terminal` disables automatic opening for one run; `spawn-terminal` still works. Launched programs inherit `$SHELL`, `$EDITOR` and `$VISUAL`.
358
359## Documentation
360
361- [Configuration](docs/config.md): keys, actions, bindings and HDR.
362- [Desktop integration](docs/desktop.md): sessions, clipboard, input methods, X11 apps and scripting.
363- [Session locking](docs/session-lock.md): external lockers, recovery and security limits.
364- [Screen capture](docs/capture.md): protocols, indicator, executable allowlist and portals.
365- [Headless mode](docs/headless.md): screenshots, input scripts and input-method testing without a screen.
366- [Performance](docs/performance.md): rendering, frame pacing, profiling and reference measurements.
367
368## Contributing
369
370Open an issue and wait for acceptance before sending a pull request, including for bug fixes. Pull requests without an accepted issue are closed.
371
372Before submitting, run `make check`, `make race`, `make mocks-check` and `staticcheck ./...`. See [AGENTS.md](AGENTS.md) for repository rules.
373
374## License
375
376[GNU General Public License v3.0](LICENSE).

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 25

Tags 10

↑↓ moveenter openesc close