mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Try to implement slash bar functionality - part 1
This commit is contained in:
@@ -50,6 +50,10 @@ impl StdConfig for Config {
|
||||
}
|
||||
}
|
||||
|
||||
fn file_name(&self) -> String {
|
||||
CFG_FILE_NAME.to_owned()
|
||||
}
|
||||
|
||||
fn config_dir() -> std::path::PathBuf {
|
||||
let mut path = dirs::config_dir().unwrap_or_default();
|
||||
|
||||
@@ -62,10 +66,6 @@ impl StdConfig for Config {
|
||||
}
|
||||
path
|
||||
}
|
||||
|
||||
fn file_name(&self) -> String {
|
||||
CFG_FILE_NAME.to_owned()
|
||||
}
|
||||
}
|
||||
|
||||
impl StdConfigLoad1<Config461> for Config {}
|
||||
|
||||
@@ -35,14 +35,10 @@ fn main() -> Result<()> {
|
||||
let is_rog_ally = prod_family == "RC71L";
|
||||
|
||||
// tmp-dir must live to the end of program life
|
||||
let _tmp_dir = match tempfile::Builder::new()
|
||||
let _tmp_dir = tempfile::Builder::new()
|
||||
.prefix("rog-gui")
|
||||
.rand_bytes(0)
|
||||
.tempdir()
|
||||
{
|
||||
Ok(tmp) => tmp,
|
||||
Err(_) => on_tmp_dir_exists().unwrap(),
|
||||
};
|
||||
.tempdir().unwrap_or_else(|_| on_tmp_dir_exists().unwrap());
|
||||
|
||||
let args: Vec<String> = args().skip(1).collect();
|
||||
|
||||
@@ -76,13 +72,10 @@ fn main() -> Result<()> {
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
let supported_properties = match dbus.proxies().platform().supported_properties() {
|
||||
Ok(s) => s,
|
||||
Err(_e) => {
|
||||
// TODO: show an error window
|
||||
Vec::default()
|
||||
}
|
||||
};
|
||||
let supported_properties = dbus.proxies().platform().supported_properties().unwrap_or_else(|_e| {
|
||||
// TODO: show an error window
|
||||
Vec::default()
|
||||
});
|
||||
|
||||
// Startup
|
||||
let mut config = Config::new().load();
|
||||
|
||||
Reference in New Issue
Block a user