Expand description
This crate allows you to configure the Jay compositor.
A minimal example configuration looks as follows:
use jay_config::{config, quit, reload};
use jay_config::input::get_default_seat;
use jay_config::keyboard::mods::ALT;
use jay_config::keyboard::syms::{SYM_q, SYM_r};
fn configure() {
let seat = get_default_seat();
// Create a key binding to exit the compositor.
seat.bind(ALT | SYM_q, || quit());
// Reload the configuration.
seat.bind(ALT | SYM_r, || reload());
}
config!(configure);
You should configure your crate to be compiled as a shared library:
[lib]
crate-type = ["cdylib"]
After compiling it, copy the shared library to $HOME/.config/jay/config.so
and restart
the compositor. It should then use your configuration file.
Note that you do not have to restart the compositor every time you want to reload your
configuration afterwards. Instead, simply invoke the reload
function via a shortcut.
Modules§
- Tools to configure the compositor in embedded environments.
- Tools for spawning programs.
- Tools for configuring input devices.
- Tools for IO operations.
- Tools affecting the keyboard behavior.
- Tools for modifying the logging behavior of the compositor.
- Knobs for changing the status text.
- Tools for async task management.
- Tools for configuring the look of the compositor.
- Timers for one-time or repeated actions.
- Tools for configuring graphics cards and monitors.
Macros§
- Declares the entry point of the configuration.
Structs§
- A PCI ID.
- A workspace.
Enums§
- A planar axis.
- A planar direction.
Functions§
- Returns the Jay config directory.
- Returns whether new workspaces are captured by default.
- Returns the workspace with the given name.
- Returns whether this execution of the configuration function is due to a reload.
- Sets the callback to be called when all devices have been enumerated.
- Sets the callback to be called when the display goes idle.
- Exits the compositor.
- Reloads the configuration.
- Sets whether new workspaces are captured by default.
- Enables or disables explicit sync.
- Configures the idle timeout.
- Switches to a different VT.
- Toggles whether new workspaces are captured by default.
- Returns all visible workspaces.