Add Ally X config

This commit is contained in:
Luke D. Jones
2024-07-25 22:51:21 +12:00
parent e4dd485dd4
commit 14acab9a9c
11 changed files with 320 additions and 24 deletions

View File

@@ -74,13 +74,7 @@ async fn main() -> Result<()> {
.format_timestamp(None)
.init();
let supported_properties = match proxy.supported_properties() {
Ok(s) => s,
Err(_e) => {
// TODO: show an error window
Vec::default()
}
};
let supported_properties = proxy.supported_properties().unwrap_or_default();
// Startup
let mut config = Config::new().load();

View File

@@ -191,17 +191,14 @@ pub fn start_notifications(
let enabled_notifications_copy = config.clone();
// GPU Mode change/action notif
tokio::spawn(async move {
let conn = zbus::Connection::system().await.map_err(|e| {
no_supergfx(&e);
e
let conn = zbus::Connection::system().await.inspect_err(|e| {
no_supergfx(e);
})?;
let proxy = SuperProxy::builder(&conn).build().await.map_err(|e| {
no_supergfx(&e);
e
let proxy = SuperProxy::builder(&conn).build().await.inspect_err(|e| {
no_supergfx(e);
})?;
let _ = proxy.mode().await.map_err(|e| {
no_supergfx(&e);
e
let _ = proxy.mode().await.inspect_err(|e| {
no_supergfx(e);
})?;
let proxy_copy = proxy.clone();

View File

@@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-06-09 00:20+0000\n"
"POT-Creation-Date: 2024-07-25 10:03+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"