Install battery applet, and make it work in the panel
This commit is contained in:
parent
ad1707a541
commit
14101dc7db
13 changed files with 89 additions and 5 deletions
30
applets/cosmic-applet-battery/src/upower_kbdbacklight.rs
Normal file
30
applets/cosmic-applet-battery/src/upower_kbdbacklight.rs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
//! # DBus interface proxy for: `org.freedesktop.UPower.KbdBacklight`
|
||||
//!
|
||||
//! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data.
|
||||
//! Source: `Interface '/org/freedesktop/UPower/KbdBacklight' from service 'org.freedesktop.UPower' on system bus`.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
default_service = "org.freedesktop.UPower",
|
||||
interface = "org.freedesktop.UPower.KbdBacklight",
|
||||
default_path = "/org/freedesktop/UPower/KbdBacklight"
|
||||
)]
|
||||
trait KbdBacklight {
|
||||
/// GetBrightness method
|
||||
fn get_brightness(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// GetMaxBrightness method
|
||||
fn get_max_brightness(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// SetBrightness method
|
||||
fn set_brightness(&self, value: i32) -> zbus::Result<()>;
|
||||
|
||||
/// BrightnessChanged signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn brightness_changed(&self, value: i32) -> zbus::Result<()>;
|
||||
|
||||
/// BrightnessChangedWithSource signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn brightness_changed_with_source(&self, value: i32, source: &str) -> zbus::Result<()>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue