labwc/README.md

233 lines
8 KiB
Markdown
Raw Normal View History

2019-05-12 21:44:41 +01:00
# labwc
2022-04-21 21:27:41 +01:00
<h3 align="center">[<a
href="https://labwc.github.io/">Website</a>] [<a
2022-06-22 21:12:54 +01:00
href="https://github.com/labwc/labwc-scope#readme">Scope</a>] [<a
href="https://web.libera.chat/gamja/?channels=#labwc">IRC&nbsp;Channel</a>] [<a
2022-04-21 21:27:41 +01:00
href="NEWS.md">Release&nbsp;Notes</a>]</h3>
2020-09-01 19:45:36 +01:00
- [1. What is this?](#1-what-is-this)
- [2. Build and Installation](#2-build-and-installation)
- [3. Configuration](#3-configuration)
- [4. Theming](#4-theming)
- [5. Usage](#5-usage)
- [6. Integration](#6-integration)
- [7. Scope](#7-scope)
2020-09-01 19:45:36 +01:00
## 1. What is this?
Labwc stands for Lab Wayland Compositor, where lab can mean any of the
following:
2021-11-13 22:28:01 +00:00
- sense of experimentation and treading new ground
2021-12-05 10:13:34 -05:00
- inspired by BunsenLabs and ArchLabs
2021-11-13 22:28:01 +00:00
- your favorite pet
2020-11-01 22:21:24 +00:00
Labwc is a [wlroots]-based window-stacking compositor for [wayland], inspired by
[openbox].
2020-07-07 21:45:44 +01:00
It is light-weight and independent with a focus on simply stacking windows well
and rendering some window decorations. It takes a no-bling/frills approach and
says no to features such as icons (except window buttons), animations,
decorative gradients and any other options not required to reasonably render
common themes. It relies on clients for panels, screenshots, wallpapers and so
on to create a full desktop environment.
2019-05-12 21:44:41 +01:00
Labwc tries to stay in keeping with [wlroots] and [sway] in terms of general
approach and coding style.
2021-04-10 08:27:47 +01:00
Labwc only understands [wayland-protocols] &amp; [wlr-protocols], and it cannot
be controlled with dbus, sway/i3-IPC or other technology. The reason for this is
that we believe that custom IPCs and protocols create a fragmentation that
hinders general Wayland adoption.
2021-04-10 08:27:47 +01:00
In order to avoid reinventing configuration and theme syntax, the [openbox] 3.6
specification is used. This does not mean that labwc is an openbox clone but
rather that configuration files will look and feel familiar.
2021-02-26 19:18:52 +00:00
Labwc supports the following:
- [x] Config files (rc.xml, autostart, environment, menu.xml)
- [x] Theme files and xbm icons
- [x] Basic root-menu and client-menu
- [x] HiDPI
- [x] wlroots protocols such as `output-management`, `layer-shell` and
`foreign-toplevel`
- [x] Optionally xwayland
See [scope] for full details on implemented features.
<a href="https://i.imgur.com/vOelinT.png">
<img src="https://i.imgur.com/vOelinTl.png">
</a>
| video link | date | content
| -------------- | ------------| -------
| [Video (0:18)] | 16-Oct-2021 | SnapToEdge feature
| [Video (1:10)] | 05-Aug-2021 | window gymnastics, theming and waybar
| [Video (3:42)] | 25-Feb-2021 | setting background and themes; xwayland/xdg-shell windows
## 2. Build and Installation
To build, simply run:
2019-05-12 21:44:41 +01:00
2021-03-06 11:45:45 +00:00
meson build/
ninja -C build/
2020-05-30 21:28:17 +01:00
Run-time dependencies include:
- wlroots, wayland, libinput, xkbcommon
- libxml2, cairo, pango, glib-2.0
- xwayland, xcb (optional)
Build dependencies include:
2020-08-17 21:26:03 +01:00
2021-02-19 23:33:21 +00:00
- meson, ninja, gcc/clang
- wayland-protocols
2020-10-07 21:40:53 +01:00
2021-03-15 18:09:36 +00:00
Disable xwayland with `meson -Dxwayland=disabled build/`
2020-12-30 10:29:21 +00:00
For OS/distribution specific details see see [wiki].
2020-09-01 19:45:36 +01:00
## 3. Configuration
For a step-by-step initial configuration guide, see [getting-started]
User config files are located at `${XDG_CONFIG_HOME:-$HOME/.config/labwc/}`
with the following four files being used:
2020-09-01 19:45:36 +01:00
| file | man page
| ------------- | --------
| [rc.xml] | [labwc-config(5)], [labwc-actions(5)]
| [menu.xml] | [labwc-menu(5)]
| [autostart] | [labwc(1)]
| [environment] | [labwc-config(5)]
2020-09-03 21:06:08 +01:00
The example [rc.xml] has been kept simple. For all options and default values,
see [rc.xml.all]
2020-09-01 19:45:36 +01:00
Configuration and theme files are reloaded on receiving SIGHUP
(e.g. `killall -s SIGHUP labwc`)
For keyboard settings, see [environment] and [xkeyboard-config(7)]
## 4. Theming
Themes are located at `~/.local/share/themes/\<theme-name\>/openbox-3/` or
equivalent `XDG_DATA_{DIRS,HOME}` location in accordance with freedesktop XDG
directory specification.
For full theme options, see [labwc-theme(5)] or the [themerc] example file.
For themes, search the internet for "openbox themes" and place them in
`~/.local/share/themes/`. Some good starting points include:
- https://github.com/addy-dclxvi/openbox-theme-collections
- https://github.com/the-zero885/Lubuntu-Arc-Round-Openbox-Theme
- https://bitbucket.org/archlabslinux/themes/
- https://github.com/BunsenLabs/bunsen-themes
## 5. Usage
2020-09-01 19:45:36 +01:00
2021-03-06 11:45:45 +00:00
./build/labwc [-s <command>]
2021-02-17 20:38:16 +00:00
> **_NOTE:_** If you are running on **NVIDIA**, you will need the
> `nvidia-drm.modeset=1` kernel parameter.
2020-09-01 19:45:36 +01:00
If you have not created an rc.xml config file, default bindings will be:
2020-09-11 21:01:47 +01:00
| combination | action
| ------------------------ | ------
| `alt`-`tab` | activate next window
| `super`-`return` | alacritty
| `alt`-`F3` | bemenu
| `alt`-`F4` | close window
| `super`-`a` | toggle maximize
| `alt`-`mouse-left` | move window
| `alt`-`mouse-right` | resize window
| `alt`-`arrow` | move window to edge
2021-10-17 21:36:06 +01:00
| `super`-`arrow` | resize window to fill half the output
| `XF86_AudioLowerVolume` | amixer sset Master 5%-
| `XF86_AudioRaiseVolume` | amixer sset Master 5%+
| `XF86_AudioMute` | amixer sset Master toggle
| `XF86_MonBrightnessUp` | brightnessctl set +10%
| `XF86_MonBrightnessDown` | brightnessctl set 10%-
2021-08-05 22:09:58 +01:00
A root-menu can be opened by clicking on the desktop.
## 6. Integration
2020-09-01 19:45:36 +01:00
Suggested apps to use with labwc:
- Screen shooter: [grim]
- Screen recorder: [wf-recorder]
2021-04-10 09:30:48 +01:00
- Background image: [swaybg]
- Panel: [waybar], [yambar], [lavalauncher], [sfwbar]
2021-04-10 09:30:48 +01:00
- Launchers: [bemenu], [fuzzel], [wofi]
- Output managers: [wlopm], [kanshi], [wlr-randr]
- Screen locker: [swaylock]
2020-09-01 19:45:36 +01:00
See [integration] for further details.
## 7. Scope
2020-05-18 21:01:01 +01:00
A lot of emphasis is put on code simplicity when considering features.
2021-03-18 21:42:37 +00:00
The main development effort is focused on producing a solid foundation for a
stacking compositor rather than adding configuration and theming options.
2022-06-22 21:12:54 +01:00
See [scope] for details.
2021-03-18 21:42:37 +00:00
High-level summary of items which are not intended to be implemented:
2020-09-21 19:51:16 +01:00
2020-11-01 22:21:24 +00:00
- Icons (except window buttons)
- Animations
2021-03-18 21:42:37 +00:00
- Gradients for decoration and menus
- Any theme option not required to reasonably render common themes (it is
amazing how few options are actually required).
[wayland]: https://wayland.freedesktop.org/
[openbox]: http://openbox.org/wiki/Help:Contents
[wlroots]: https://gitlab.freedesktop.org/wlroots/wlroots
[sway]: https://github.com/swaywm
[wayland-protocols]: https://gitlab.freedesktop.org/wayland/wayland-protocols
[wlr-protocols]: https://gitlab.freedesktop.org/wlroots/wlr-protocols
[scope]: https://github.com/labwc/labwc-scope#readme
[wiki]: https://github.com/labwc/labwc/wiki
[getting-started]: https://labwc.github.io/getting-started.html
[integration]: https://labwc.github.io/integration.html
[rc.xml]: docs/rc.xml
2021-08-22 19:26:10 +01:00
[rc.xml.all]: docs/rc.xml.all
[menu.xml]: docs/menu.xml
[autostart]: docs/autostart
[environment]: docs/environment
[themerc]: docs/themerc
[labwc(1)]: https://labwc.github.io/labwc.1.html
[labwc-config(5)]: https://labwc.github.io/labwc-config.5.html
[labwc-menu(5)]: https://labwc.github.io/labwc-menu.5.html
[labwc-environment(5)]: https://labwc.github.io/labwc-environment.5.html
[labwc-theme(5)]: https://labwc.github.io/labwc-theme.5.html
[labwc-actions(5)]: https://labwc.github.io/labwc-actions.5.html
[xkeyboard-config(7)]: https://manpages.debian.org/testing/xkb-data/xkeyboard-config.7.en.html
2021-04-10 09:30:48 +01:00
[grim]: https://github.com/emersion/grim
[wf-recorder]: https://github.com/ammen99/wf-recorder
[swaybg]: https://github.com/swaywm/swaybg
[waybar]: https://github.com/Alexays/Waybar
[yambar]: https://codeberg.org/dnkl/yambar
[lavalauncher]: https://sr.ht/~leon_plickat/LavaLauncher
[sfwbar]: https://github.com/LBCrion/sfwbar
2021-04-10 09:30:48 +01:00
[bemenu]: https://github.com/Cloudef/bemenu
[fuzzel]: https://codeberg.org/dnkl/fuzzel
[wofi]: https://hg.sr.ht/~scoopta/wofi
[wlopm]: https://git.sr.ht/~leon_plickat/wlopm
2022-02-17 19:29:55 +02:00
[kanshi]: https://sr.ht/~emersion/kanshi/
[wlr-randr]: https://sr.ht/~emersion/wlr-randr/
[swaylock]: https://github.com/swaywm/swaylock
2021-04-10 09:30:48 +01:00
[Video (0:18)]: https://github.com/labwc/labwc/pull/76#issue-1028182472
[Video (1:10)]: https://youtu.be/AU_M3n_FS-E
[Video (3:42)]: https://youtu.be/rE1bQjSVJzg