Module config

Module config 

Source
Expand description

Configuration types for the plugin configure() hook.

Return a Configuration from your crate::plugin::Plugin::configure implementation to override compositor configuration values on every config reload. Any field left as None is ignored; the compositor keeps its own value for that field.

The plugins and includes keys cannot be set by plugins.

§Example

use miracle_plugin::config::{BindingAction, Configuration, CustomKeyAction, Gaps, Key, Modifier};

fn configure(&mut self) -> Option<Configuration> {
    Some(Configuration {
        primary_modifier: Some(Modifier::Meta),
        custom_key_actions: Some(vec![CustomKeyAction {
            action: BindingAction::Down,
            modifiers: vec![Modifier::Primary],
            key: Key::new("Return"),
            command: "kitty".to_string(),
        }]),
        inner_gaps: Some(Gaps { x: 5, y: 5 }),
        ..Default::default()
    })
}

Structs§

AnimationDefinition
An animation definition for one animatable event.
BorderConfig
Window border appearance.
BuiltInAnimationPart
A single built-in animation (one phase of an easing sequence).
BuiltInKeyCommandOverride
Override the key binding for a built-in compositor action.
Configuration
Configuration overrides that a plugin may return from [Plugin::configure].
CursorConfiguration
Cursor appearance and focus behaviour.
CustomKeyAction
A custom key binding that runs a shell command.
DragAndDropConfiguration
Drag-and-drop behaviour.
EnvironmentVariable
An environment variable to set in the compositor’s environment.
Gaps
Gaps configuration. Both x (left/right) and y (top/bottom) are in pixels.
HoverClickConfiguration
Hover-click (dwell click) configuration.
Key
An XKB keysym name for use in configuration bindings.
KeyboardConfiguration
Keyboard repeat and layout configuration.
KeymapConfiguration
Keymap (keyboard layout) configuration.
MagnifierConfiguration
Screen magnifier configuration.
MouseConfiguration
Mouse pointer configuration.
OutputFilterConfiguration
Output (display) filter shader.
SimulatedSecondaryClickConfiguration
Simulated secondary (right) click via long-press.
SlowKeysConfiguration
Slow keys (accessibility) configuration.
StartupApp
An application to start on compositor launch.
StickyKeysConfiguration
Sticky keys (accessibility) configuration.
TouchpadConfiguration
Touchpad configuration.
WorkspaceConfig
Workspace configuration entry.

Enums§

AnimationEvent
The compositor event that an animation definition applies to.
AnimationKind
Whether an animation is driven by a built-in effect or a plugin callback.
AnimationPartType
Built-in animation visual effect for one phase of an animation sequence.
BindingAction
The keyboard event phase that triggers a key binding.
CursorFocusMode
Whether focus follows the pointer or requires a click.
EasingFunction
Easing function for animation timing.
Handedness
Mouse button handedness.
Modifier
A keyboard modifier key for use in configuration bindings.
PointerAcceleration
Pointer acceleration profile.
TouchpadClickMode
Touchpad click emulation mode.
TouchpadScrollMode
Touchpad scroll method.