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§
- embedded
- Tools to configure the compositor in embedded environments.
- exec
- Tools for spawning programs.
- input
- Tools for configuring input devices.
- io
- Tools for IO operations.
- keyboard
- Tools affecting the keyboard behavior.
- logging
- Tools for modifying the logging behavior of the compositor.
- status
- Knobs for changing the status text.
- tasks
- Tools for async task management.
- theme
- Tools for configuring the look of the compositor.
- timer
- Timers for one-time or repeated actions.
- video
- Tools for configuring graphics cards and monitors.
- xwayland
- Tools for configuring Xwayland.
Macros§
- config
- Declares the entry point of the configuration.
Structs§
Enums§
Functions§
- config_
dir - Returns the Jay config directory.
- get_
default_ workspace_ capture - Returns whether new workspaces are captured by default.
- get_
workspace - Returns the workspace with the given name.
- is_
reload - Returns whether this execution of the configuration function is due to a reload.
- on_
devices_ enumerated - Sets the callback to be called when all devices have been enumerated.
- on_idle
- Sets the callback to be called when the display goes idle.
- quit
- Exits the compositor.
- reload
- Reloads the configuration.
- set_
default_ workspace_ capture - Sets whether new workspaces are captured by default.
- set_
explicit_ sync_ enabled - Enables or disables explicit sync.
- set_
idle - Configures the idle timeout.
- set_
idle_ grace_ period - Configures the idle grace period.
- set_
ui_ drag_ enabled - Enables or disables dragging of tiles and workspaces.
- set_
ui_ drag_ threshold - Sets the distance at which ui dragging starts.
- switch_
to_ vt - Switches to a different VT.
- toggle_
default_ workspace_ capture - Toggles whether new workspaces are captured by default.
- workspaces
- Returns all visible workspaces.