labwc/README.md

193 lines
7.2 KiB
Markdown
Raw Normal View History

2019-05-12 21:44:41 +01:00
# labwc
2020-09-01 19:45:36 +01:00
- [1. What is this?](#1-what-is-this)
- [2. Build](#2-build)
- [3. Install](#3-install)
- [4. Configure](#4-configure)
- [5. Run](#5-run)
- [6. Integrate](#6-integrate)
- [7. Roadmap](#7-roadmap)
- [8. Contribute](#7-contribute)
2020-09-01 19:45:36 +01:00
## 1. What is this?
Labwc stands for Lab Wayland Compositor, with lab indicating a sense of experimentation and treading new ground.
2020-11-01 22:21:24 +00:00
It is a wlroots-based stacking compositor aiming to be light-weight and independent, with a focus on simply stacking windows well and rendering some window decorations. It relies on clients for wall-paper, panels, screenshots, and so on to create a full desktop environment.
2020-07-07 21:45:44 +01:00
Labwc tries to stay in keeping with wlroots and sway in terms of general approach and coding style.
2019-05-12 21:44:41 +01:00
In order to avoid re-inventing configuration & theme syntax, [openbox-3.4] specification is used. This does not mean that labwc is an openbox clone but rather that configuration files will look and feel familiar.
2021-04-10 08:27:47 +01:00
| 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
2021-04-10 08:27:47 +01:00
2021-04-10 09:30:48 +01:00
<a href="https://raw.githubusercontent.com/wiki/johanmalm/labwc/images/scrot3.png">
<img src="https://raw.githubusercontent.com/wiki/johanmalm/labwc/images/scrot3x.png" width="256px" height="179px">
</a>
2021-02-26 19:18:52 +00:00
So far, labwc supports the following:
- [x] Config files (rc.xml, autostart, environment)
- [x] Theme files and xbm icons
- [x] Damage tracking to reduce CPU usage
- [x] A basic root-menu (configured with menu.xml)
- [x] HiDPI
- [x] wlr-output-management protocol
- [x] layer-shell protocol
- [x] foreign-toplevel protocol (e.g. to integrate with panels and bars)
- [x] Optionally xwayland
2020-09-01 19:45:36 +01:00
## 2. Build
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
2020-11-01 22:21:24 +00:00
Dependencies include:
2020-08-17 21:26:03 +01:00
2021-02-19 23:33:21 +00:00
- meson, ninja, gcc/clang
- wlroots (master)
2021-03-15 18:09:36 +00:00
- wayland (>=1.19)
- wayland-protocols
- libinput (>=1.14)
2020-08-17 21:26:03 +01:00
- libxml2
2020-11-01 22:21:24 +00:00
- cairo, pango, glib-2.0
2020-10-07 21:40:53 +01:00
- xkbcommon
2021-02-19 23:33:21 +00:00
- xwayland, xcb (optional)
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 further details see [wiki/Build].
2020-09-01 19:45:36 +01:00
## 3. Install
2021-03-08 21:21:21 +00:00
See [wiki/Install](https://github.com/johanmalm/labwc/wiki/Install).
## 4. Configure
2020-09-01 19:45:36 +01:00
2021-04-10 09:30:48 +01:00
Labwc uses the files listed below for configuration and theming.
2020-09-03 21:06:08 +01:00
| file | user over-ride location | man page
| ------------- | ----------------------------------------------- | --------
| [rc.xml] | ~/.config/labwc/ | [labwc-config(5)], [labwc-actions(5)]
| [menu.xml] | ~/.config/labwc/ | [labwc-menu(5)]
| [autostart] | ~/.config/labwc/ | [labwc(1)]
| [environment] | ~/.config/labwc/ | [labwc-environment(5)]
| [themerc] | ~/.local/share/themes/\<theme-name\>/openbox-3/ | [labwc-theme(5)]
2020-09-01 19:45:36 +01:00
2021-08-22 19:26:10 +01:00
The example [rc.xml] has been kept simple. For all options and default values, see [rc.xml.all]
Configuration and theme files are re-loaded on receiving SIGHUP (e.g. `killall -SIGHUP labwc`)
For keyboard settings, see [environment] and [xkeyboard-config(7)]
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. Run
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
Click on the background to launch a menu.
2020-09-01 19:45:36 +01:00
2021-08-07 09:59:50 +01:00
If you have not created an rc.xml config file, default binds will be:
2020-09-11 21:01:47 +01:00
| combination | action
| ------------------------ | ------
| `alt`-`tab` | activate next window
| `alt`-`escape` | exit
| `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
## 6. Integrate
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]
2021-04-10 09:30:48 +01:00
- Launchers: [bemenu], [fuzzel], [wofi]
- Output managers: [kanshi], [wlr-randr]
- Screen locker: [swaylock]
2020-09-01 19:45:36 +01:00
## 7. Roadmap
2020-05-18 21:01:01 +01:00
A lot of emphasis is put on code simplicy when considering features.
2021-03-18 21:42:37 +00:00
The main development effort if focused on producing a solid foundation for a
stacking compositor rather than adding configuration and theming options.
See [acceptance criteria] for details.
2021-03-18 21:42:37 +00:00
High-level summary of items which are not inteded 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
2021-04-10 08:14:33 +01:00
- Any theme option not required to reasonably render common themes (it's amazing
how few options are actually required).
## 8. Contribute
Let's try to stick to this [coding style]
2021-04-10 08:27:47 +01:00
[openbox-3.4]: https://github.com/danakj/openbox
[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://raw.githubusercontent.com/johanmalm/labwc/master/docs/labwc.1.scd
[labwc-config(5)]: https://raw.githubusercontent.com/johanmalm/labwc/master/docs/labwc-config.5.scd
[labwc-menu(5)]: https://raw.githubusercontent.com/johanmalm/labwc/master/docs/labwc-menu.5.scd
[labwc-environment(5)]: https://raw.githubusercontent.com/johanmalm/labwc/master/docs/labwc-environment.5.scd
[labwc-theme(5)]: https://raw.githubusercontent.com/johanmalm/labwc/master/docs/labwc-theme.5.scd
2021-07-09 21:34:23 +01:00
[labwc-actions(5)]: https://raw.githubusercontent.com/johanmalm/labwc/master/docs/labwc-actions.5.scd
[xkeyboard-config(7)]: https://manpages.debian.org/testing/xkb-data/xkeyboard-config.7.en.html
[wiki/Build]: https://github.com/johanmalm/labwc/wiki/Build
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
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
[kanshi]: https://github.com/emersion/kanshi.git
[wlr-randr]: https://github.com/emersion/wlr-randr.git
[swaylock]: https://github.com/swaywm/swaylock
2021-04-10 09:30:48 +01:00
[acceptance criteria]: https://github.com/johanmalm/labwc/wiki/Acceptance-criteria
[complete]: https://github.com/johanmalm/labwc/wiki/Minimum-viable-product-complete-items
[outstanding]: https://github.com/johanmalm/labwc/wiki/Minimum-viable-product-outstanding-items
[Video (0:18)]: https://user-images.githubusercontent.com/21316711/137605766-67196fb0-c147-4114-a8f7-1651580c2572.mp4
[Video (1:10)]: https://youtu.be/AU_M3n_FS-E
[Video (3:42)]: https://youtu.be/rE1bQjSVJzg
[coding style]: https://git.sr.ht/~sircmpwn/cstyle