Note
Awc is unmaintained. Give niri a try instead.
A Wayland compositor using wlroots written in Swift.
It is heavily inspired, conceptually as well as code-wise, from XMonad.
Awc uses Dhall as language for its configuration.
It automatically loads a configuration located under
$XDG_CONFIG_DIRS/awc/config.dhall
, typically ~/.config/awc/config.dhall
,
on startup.
Following is an empty config that uses all the defaults:
let Types = env:AWC_TYPES in Types.Config::{=}
That's probably a pretty boring configuration, as it doesn't define any keybindings and hence it's not possible to switch any windows or to do anything. You likely want to override the keybindings with some actions:
let mod = Types.Modifier.Logo
in Types::Config{
, keyBindings =
[ { mods = [ mod ]
, key = Types.Key.Sym "j"
, action = Types.Action.FocusDown
}
, { mods = [ mod ]
, key = Types.Key.Sym "k"
, action = Types.Action.FocusUp
}
, { mods = [ mod, Types.Modifier.Shift ]
, key = Types.Key.Sym "Return"
, action = Types.Action.Execute "kitty"
}
]
}
For a list of available actions, see Sources/awc_config/Dhall/Types.dhall.
A sample configuration can be found here.
Note that reloading the configuration when running Awc currently doesn't affect all settings (e.g. border width).
In general, awc maintains an order of views per workspace. The views of one workspace are split into three different parts:
- the views before the focused view (up)
- the focused view
- the views after the focused view (down)
Per convention, the first view is the main view. Some layouts (e.g.
TwoPane
) treat the main view specially, for example by always showing
it.
Uses all available space to show the focused view.
Splits the available space vertically by a configurable ratio. Shows the main view (first view in stack) on the left. All remaining views are tiled horizontally on the right.
Splits the available space vertically by a configurable ratio. Shows the main view (first view in stack) on the left and the focused view on the right. If the main view is also the focused view, the next view down the stack is shown on the right.
Wraps another layout and limits the number of views to a configured amount.
Wraps another layout and scales the focused view by a configured factor if it's not the main view.
Rotates another layout by 90 degrees. For example, a rotated TwoPane
splits the available space vertically instead of horizontally.
Reflects another layout either horizontally or vertically. For example, a
horizontally reflected TwoPane
shows the main view on the right and the
focused view on the left.
Awc builds upon wlroots, the same library that is used by Sway. It also
implements a lot of wlroots protocols such as wlr-input-inhibitor
. That
means that quite a few tools work with Awc as well, such as grim, swaybg
, swaylock or waybar.
Install the following dependencies and then run make
.
- Rust
- Swift 5.3 (or newer)
- GLESv2
- libdrm
- libinput
- pixman
- pkg-config
- wayland
- wayland-protocols
- wlroots (>= 0.14.0)
- xcb
- xkbcommon
- openssl
There is a variety of other Wayland compositors if you don't like Awc. Following are listed a few (without any claim to completeness):
GNOME and KDE also work well with Wayland. See also wlroot's project list.
Awc is released under the Apache License, Version 2.0. See LICENSE
or http://www.apache.org/licenses/LICENSE-2.0.html for details.
Design-wise, Awc is heavily inspired by XMonad (e.g. zippers, layouts), which is:
Copyright (c) 2007,2008 Spencer Janssen Copyright (c) 2007,2008 Don Stewart
and released under a BSD license.