Skip to content

playfairs/YaWC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

106 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YaWC - Yet another Wayland Compositor

YaWC is a personal manual Wayland compositor spread amongst a group of friends trying to make a desktop which fits their needs.

Nix flake

Nix is stupid when it comes to submodules, so you may need to append “‘git+file:..?dir=..’”.

An example being:

nix develop 'git+file:..?dir=..'

to enter a devshell from this directory.

Building

Prerequisites

This project will require the following packages to build:

  • pipewire
  • seatd
  • libdisplay-info
  • alsa-lib
  • jack2
  • udev
  • pixman
  • libxkbcommon
  • libinput
  • libgbm

These can also be fetched by entering a nix development environment using:

nix develop

Running build system

After you have the build prerequisites, run:

cargo build --release

Which can also be shorthanded to:

cargo b -r

Runtime

This segment includes various different things.

Dependencies

There are certain dependencies you may need to install for some things to work with respective features enabled:

  • fontconfig
  • udev
  • OpenGL
  • x11 (for xwayland)
  • libxkbcommon

Environment Variables

There are certain environment variables which can be used by and for YaWC.

What we look for

VariableUse CaseReference
YAWC_XWAYLAND_SCALEEvidently - it changes Xwayland scaling./src/state.rs
YAWC_NO_VULKANSkips Vulkan for X11./src/x11.rs
YAWC_DISABLE_10BITSkips 10-bit Color for udev rendering./src/udev.rs
YAWC_DRM_DEVICESpecify DRI device e.g /dev/dri/card1./src/udev.rs
YAWC_GLES_DISABLE_INSTANCINGDisables gles instancing./src/udev.rs
YAWC_DISABLE_DIRECT_SCANOUTDisables Direct Scanout./src/udev.rs
YAWC_CONFIG_PATHSpecify config file path./src/config/mod.rs

What is set by us

These only apply when running in a udev instance, so all can be found in `./src/udev.rs`.

VariableValueUse Case
XDG_CURRENT_DESKTOPYaWCIdentify that it is us as the desktop
XDG_SESSION_DESKTOPYaWCIdentify that it is us as the desktop
XDG_SESSION_TYPEwaylandIdentify that it is a Wayland instance
QT_QPA_PLATFORMwayland;xcbGet QT apps to attempt to load QT’s Wayland plugin, fallback to xcb
ELECTRON_OZONE_PLATFORM_HINTwaylandHint to Electron that our session is Wayland
GTK_BACKENDwaylandFor GTK3.0-or-later to know we are wayland

You can add more of these using your configuration file:

env {
    MY_ENV_NAME "VARIABLE_CONTENT"
}

Licensing

The start of this project was created with the help of Anvil, the example compositor which Smithay uses to test, which was MIT.

The project state as it stands today is under AGPL-v3.0.

About

Yet Another Wayland Compositor

Resources

License

Stars

Watchers

Forks

Contributors

Languages