Skip to main content

GuiIpcClient

Struct GuiIpcClient 

Source
pub struct GuiIpcClient { /* private fields */ }
Expand description

Simplified IPC client for the GUI

Implementations§

Source§

impl GuiIpcClient

Source

pub fn new(socket_path: PathBuf) -> Self

Create a new GUI IPC client with the specified socket path

Source

pub async fn connect(&self) -> Result<(), String>

Connect to the daemon

Source

pub async fn get_devices(&self) -> Result<Vec<DeviceInfo>, String>

Get list of available devices

Source

pub async fn list_macros(&self) -> Result<Vec<MacroEntry>, String>

Get list of configured macros

Source

pub async fn start_recording_macro( &self, device_path: &str, name: &str, capture_mouse: bool, ) -> Result<(), String>

Start recording a macro for a device

Source

pub async fn stop_recording_macro(&self) -> Result<MacroEntry, String>

Stop recording a macro

Source

pub async fn delete_macro(&self, name: &str) -> Result<(), String>

Delete a macro by name

Source

pub async fn test_macro(&self, name: &str) -> Result<(), String>

Test a macro execution

Source

pub async fn save_profile(&self, name: &str) -> Result<(String, usize), String>

Save current macros to a profile

Source

pub async fn load_profile(&self, name: &str) -> Result<(String, usize), String>

Load macros from a profile

Source

pub async fn grab_device(&self, device_path: &str) -> Result<(), String>

Grab a device exclusively for input interception

Source

pub async fn ungrab_device(&self, device_path: &str) -> Result<(), String>

Release exclusive access to a device

Source

pub async fn get_device_profiles( &self, device_id: String, ) -> Result<Vec<String>, String>

Get available profiles for a specific device

§Arguments
  • device_id - Device identifier in vendor:product format (e.g., “1532:0220”)
§Returns
  • Ok(Vec<String>) - List of available profile names
  • Err(String) - IPC communication error
Source

pub async fn activate_profile( &self, device_id: String, profile_name: String, ) -> Result<(), String>

Activate a remap profile for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • profile_name - Name of the profile to activate
§Returns
  • Ok(()) - Profile activated successfully
  • Err(String) - IPC communication error
Source

pub async fn deactivate_profile(&self, device_id: String) -> Result<(), String>

Deactivate the current remap profile for a device

§Arguments
  • device_id - Device identifier in vendor:product format
§Returns
  • Ok(()) - Profile deactivated successfully
  • Err(String) - IPC communication error
Source

pub async fn get_active_profile( &self, device_id: String, ) -> Result<Option<String>, String>

Get the currently active profile for a device

§Arguments
  • device_id - Device identifier in vendor:product format
§Returns
  • Ok(Option<String>) - Active profile name or None
  • Err(String) - IPC communication error
Source

pub async fn get_active_remaps( &self, device_path: &str, ) -> Result<Option<(String, Vec<RemapEntry>)>, String>

Get active remaps for a device

§Arguments
  • device_path - Full path to the device (e.g., “/dev/input/event0”)
§Returns
  • Ok(Option<(String, Vec<RemapEntry>)>) - Active profile name and remap entries, or None if no profile active
  • Err(String) - IPC communication error
Source

pub async fn list_remap_profiles( &self, device_path: &str, ) -> Result<Vec<RemapProfileInfo>, String>

List available remap profiles for a device

§Arguments
  • device_path - Full path to the device
§Returns
  • Ok(Vec<aethermap_common::RemapProfileInfo>) - List of available profile info
  • Err(String) - IPC communication error
Source

pub async fn activate_remap_profile( &self, device_path: &str, profile_name: &str, ) -> Result<(), String>

Activate a remap profile for a device

§Arguments
  • device_path - Full path to the device
  • profile_name - Name of the profile to activate
§Returns
  • Ok(()) - Profile activated successfully
  • Err(String) - IPC communication error
Source

pub async fn deactivate_remap_profile( &self, device_path: &str, ) -> Result<(), String>

Deactivate the current remap profile for a device

§Arguments
  • device_path - Full path to the device
§Returns
  • Ok(()) - Profile deactivated successfully
  • Err(String) - IPC communication error
Source

pub async fn get_device_capabilities( &self, device_path: &str, ) -> Result<DeviceCapabilities, String>

Get device capabilities and features

§Arguments
  • device_path - Full path to the device
§Returns
  • Ok(DeviceCapabilities) - Device capabilities including button count, hat switch, analog stick
  • Err(String) - IPC communication error
Source

pub async fn get_active_layer( &self, device_id: &str, ) -> Result<Option<usize>, String>

Get the currently active layer for a device

§Arguments
  • device_id - Device identifier in vendor:product format (e.g., “1532:0220”)
§Returns
  • Ok(Option<usize>) - Active layer ID (Some) or None if no layer active
  • Err(String) - IPC communication error
Source

pub async fn set_layer_config( &self, device_id: &str, layer_id: usize, name: String, mode: LayerMode, ) -> Result<(), String>

Set layer configuration for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • layer_id - Layer ID to configure
  • name - Human-readable layer name
  • mode - Layer activation mode (Hold or Toggle)
§Returns
  • Ok(()) - Layer configuration updated successfully
  • Err(String) - IPC communication error
Source

pub async fn activate_layer( &self, device_id: &str, layer_id: usize, mode: LayerMode, ) -> Result<(), String>

Activate a layer for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • layer_id - Layer ID to activate
  • mode - Layer activation mode (Hold or Toggle)
§Returns
  • Ok(()) - Layer activated successfully
  • Err(String) - IPC communication error
Source

pub async fn list_layers( &self, device_id: &str, ) -> Result<Vec<LayerConfigInfo>, String>

List all configured layers for a device

§Arguments
  • device_id - Device identifier in vendor:product format
§Returns
  • Ok(Vec<LayerConfigInfo>) - List of layer configurations
  • Err(String) - IPC communication error
Source

pub async fn set_analog_dpad_mode( &self, device_id: &str, mode: &str, ) -> Result<(), String>

Set D-pad emulation mode for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • mode - D-pad mode: “disabled”, “eight_way”, or “four_way”
§Returns
  • Ok(()) - D-pad mode set successfully
  • Err(String) - IPC communication error
Source

pub async fn get_analog_dpad_mode( &self, device_id: &str, ) -> Result<String, String>

Get D-pad emulation mode for a device

§Arguments
  • device_id - Device identifier in vendor:product format
§Returns
  • Ok(String) - D-pad mode: “disabled”, “eight_way”, or “four_way”
  • Err(String) - IPC communication error
Source

pub async fn set_analog_deadzone_xy( &self, device_id: &str, x_percentage: u8, y_percentage: u8, ) -> Result<(), String>

Set per-axis analog deadzone for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • x_percentage - X-axis deadzone percentage (0-100)
  • y_percentage - Y-axis deadzone percentage (0-100)
§Returns
  • Ok(()) - Per-axis deadzone set successfully
  • Err(String) - IPC communication error
Source

pub async fn get_analog_deadzone_xy( &self, device_id: &str, ) -> Result<(u8, u8), String>

Get per-axis analog deadzone for a device

§Arguments
  • device_id - Device identifier in vendor:product format
§Returns
  • Ok((u8, u8)) - X and Y deadzone percentages (0-100 each)
  • Err(String) - IPC communication error
Source

pub async fn set_analog_outer_deadzone_xy( &self, device_id: &str, x_percentage: u8, y_percentage: u8, ) -> Result<(), String>

Set per-axis outer deadzone (max clamp) for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • x_percentage - X-axis outer deadzone percentage (0-100)
  • y_percentage - Y-axis outer deadzone percentage (0-100)
§Returns
  • Ok(()) - Per-axis outer deadzone set successfully
  • Err(String) - IPC communication error
Source

pub async fn get_analog_outer_deadzone_xy( &self, device_id: &str, ) -> Result<(u8, u8), String>

Get per-axis outer deadzone for a device

§Arguments
  • device_id - Device identifier in vendor:product format
§Returns
  • Ok((u8, u8)) - X and Y outer deadzone percentages (0-100 each)
  • Err(String) - IPC communication error
Source

pub async fn set_led_color( &self, device_id: &str, zone: LedZone, red: u8, green: u8, blue: u8, ) -> Result<(), String>

Set LED color for a specific zone

§Arguments
  • device_id - Device identifier in vendor:product format
  • zone - LED zone to configure (Logo, Keys, Thumbstick, All, Global)
  • red - Red component (0-255)
  • green - Green component (0-255)
  • blue - Blue component (0-255)
§Returns
  • Ok(()) - Color set successfully
  • Err(String) - IPC communication error
Source

pub async fn get_led_color( &self, device_id: &str, zone: LedZone, ) -> Result<Option<(u8, u8, u8)>, String>

Get LED color for a specific zone

§Arguments
  • device_id - Device identifier in vendor:product format
  • zone - LED zone to query
§Returns
  • Ok(Option<(u8, u8, u8)>) - RGB color tuple if set, None if not set
  • Err(String) - IPC communication error
Source

pub async fn get_all_led_colors( &self, device_id: &str, ) -> Result<HashMap<LedZone, (u8, u8, u8)>, String>

Get all LED colors for a device

§Arguments
  • device_id - Device identifier in vendor:product format
§Returns
  • Ok(HashMap<LedZone, (u8, u8, u8)>) - Map of zones to RGB colors
  • Err(String) - IPC communication error
Source

pub async fn set_led_brightness( &self, device_id: &str, zone: Option<LedZone>, brightness: u8, ) -> Result<(), String>

Set LED brightness for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • zone - LED zone (None = global brightness)
  • brightness - Brightness percentage (0-100)
§Returns
  • Ok(()) - Brightness set successfully
  • Err(String) - IPC communication error
Source

pub async fn get_led_brightness( &self, device_id: &str, zone: Option<LedZone>, ) -> Result<u8, String>

Get LED brightness for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • zone - LED zone (None = global brightness)
§Returns
  • Ok(u8) - Brightness percentage (0-100)
  • Err(String) - IPC communication error
Source

pub async fn set_led_pattern( &self, device_id: &str, pattern: LedPattern, ) -> Result<(), String>

Set LED pattern for a device

§Arguments
  • device_id - Device identifier in vendor:product format
  • pattern - LED pattern (Static, Breathing, Rainbow, RainbowWave)
§Returns
  • Ok(()) - Pattern set successfully
  • Err(String) - IPC communication error
Source

pub async fn get_led_pattern( &self, device_id: &str, ) -> Result<LedPattern, String>

Get LED pattern for a device

§Arguments
  • device_id - Device identifier in vendor:product format
§Returns
  • Ok(LedPattern) - Current LED pattern
  • Err(String) - IPC communication error
Source

pub async fn send_focus_change( &self, app_id: String, window_title: Option<String>, ) -> Result<(), String>

Send focus change event to daemon for auto-profile switching

§Arguments
  • app_id - Application identifier (e.g., “org.alacritty”, “firefox”)
  • window_title - Optional window title (may be empty on some compositors)
§Returns
  • Ok(()) - Focus event acknowledged by daemon
  • Err(String) - IPC communication error
Source

pub async fn get_analog_calibration( &self, device_id: &str, layer_id: usize, ) -> Result<AnalogCalibrationConfig, String>

Get analog calibration for a device and layer

§Arguments
  • device_id - Device identifier (e.g., “32b6:12f7”)
  • layer_id - Layer ID (0=base, 1, 2, …)
§Returns
  • Ok(AnalogCalibrationConfig) - Calibration settings
  • Err(String) - IPC communication error
Source

pub async fn set_analog_calibration( &self, device_id: &str, layer_id: usize, calibration: AnalogCalibrationConfig, ) -> Result<(), String>

Set analog calibration for a device and layer

§Arguments
  • device_id - Device identifier (e.g., “32b6:12f7”)
  • layer_id - Layer ID (0=base, 1, 2, …)
  • calibration - New calibration settings
§Returns
  • Ok(()) - Calibration updated successfully
  • Err(String) - IPC communication or validation error
Source

pub async fn subscribe_analog_input( &self, device_id: &str, ) -> Result<(), String>

Subscribe to real-time analog input updates for a device

§Arguments
  • device_id - Device identifier (vendor:product format)
§Returns
  • Ok(()) - Subscription successful
  • Err(String) - IPC communication error
Source

pub async fn unsubscribe_analog_input( &self, device_id: &str, ) -> Result<(), String>

Unsubscribe from analog input updates

§Arguments
  • device_id - Device identifier (vendor:product format)
§Returns
  • Ok(()) - Unsubscription successful
  • Err(String) - IPC communication error
Source

pub async fn get_macro_settings(&self) -> Result<MacroSettings, String>

Get global macro settings

Source

pub async fn set_macro_settings( &self, settings: MacroSettings, ) -> Result<(), String>

Set global macro settings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSync for T
where T: Sync,

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,