pub struct AutoSwitchRule {
pub app_id: String,
pub profile_name: String,
pub device_id: Option<String>,
pub layer_id: Option<usize>,
}Expand description
Auto-profile switching rule based on window focus
Defines automatic profile switching when specific applications gain focus. Rules are evaluated in order with first-match-wins semantics.
Fields§
§app_id: StringApplication identifier to match (e.g., “org.alacritty”, “firefox”, “*”)
- “*” acts as wildcard matching any app (useful for default profile)
- Can match prefix (e.g., “org.mozilla.” matches any Firefox window)
- Can match suffix (e.g., “.firefox” matches Firefox app)
profile_name: StringProfile name to activate when this app has focus
device_id: Option<String>Device ID to apply profile to (vendor:product format)
If None, applies to all devices. Use this for per-device auto-switching.
layer_id: Option<usize>Layer ID to activate (0 = base, 1+ = additional layers)
If None, uses profile’s default layer (typically base layer 0).
Trait Implementations§
Source§impl Clone for AutoSwitchRule
impl Clone for AutoSwitchRule
Source§fn clone(&self) -> AutoSwitchRule
fn clone(&self) -> AutoSwitchRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AutoSwitchRule
impl Debug for AutoSwitchRule
Source§impl<'de> Deserialize<'de> for AutoSwitchRule
impl<'de> Deserialize<'de> for AutoSwitchRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AutoSwitchRule
impl PartialEq for AutoSwitchRule
Source§impl Serialize for AutoSwitchRule
impl Serialize for AutoSwitchRule
impl StructuralPartialEq for AutoSwitchRule
Auto Trait Implementations§
impl Freeze for AutoSwitchRule
impl RefUnwindSafe for AutoSwitchRule
impl Send for AutoSwitchRule
impl Sync for AutoSwitchRule
impl Unpin for AutoSwitchRule
impl UnsafeUnpin for AutoSwitchRule
impl UnwindSafe for AutoSwitchRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more