diff --git a/src/file_builders/monado_config_v0.rs b/src/file_builders/monado_config_v0.rs index 8f182ab..7e68982 100644 --- a/src/file_builders/monado_config_v0.rs +++ b/src/file_builders/monado_config_v0.rs @@ -166,7 +166,9 @@ pub struct MonadoConfigV0 { impl Default for MonadoConfigV0 { fn default() -> Self { Self { - _schema: Some("https://monado.pages.freedesktop.org/monado/config_v0.schema.json".to_string()), + _schema: Some( + "https://monado.pages.freedesktop.org/monado/config_v0.schema.json".to_string(), + ), tracker_roles: vec![], } } diff --git a/src/gpu_profile.rs b/src/gpu_profile.rs index b1bbdac..5ccf73d 100644 --- a/src/gpu_profile.rs +++ b/src/gpu_profile.rs @@ -8,7 +8,10 @@ fn power_profile_mode_file(card_dir: &str) -> String { } pub fn get_set_amd_vr_pow_prof_cmd(card_dir: &str) -> String { - format!("sudo sh -c \"echo '4' > {}\"", power_profile_mode_file(card_dir)) + format!( + "sudo sh -c \"echo '4' > {}\"", + power_profile_mode_file(card_dir) + ) } #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -93,9 +96,10 @@ pub enum GpuSysDrm { } fn list_gpus() -> Vec { - let mut res = vec![]; + let mut res = vec![]; - for i in 0..5 { // arbitrary range, find a better way + for i in 0..5 { + // arbitrary range, find a better way let card_dir = format!("/sys/class/drm/card{}", i); let vendor_file = format!("{}/device/vendor", card_dir); if let Some(mut reader) = get_reader(&vendor_file) { @@ -113,7 +117,11 @@ fn list_gpus() -> Vec { } pub fn get_first_amd_gpu() -> Option { - list_gpus().iter().filter(|g| matches!(g, GpuSysDrm::Amd(_))).next().cloned() + list_gpus() + .iter() + .filter(|g| matches!(g, GpuSysDrm::Amd(_))) + .next() + .cloned() } pub fn get_amd_gpu_power_profile() -> Option { diff --git a/src/ui/main_view.rs b/src/ui/main_view.rs index 815e995..cd38ef4 100644 --- a/src/ui/main_view.rs +++ b/src/ui/main_view.rs @@ -6,7 +6,10 @@ use super::steam_launch_options_box::{SteamLaunchOptionsBox, SteamLaunchOptionsB use crate::config::Config; use crate::constants::APP_NAME; use crate::file_utils::mount_has_nosuid; -use crate::gpu_profile::{get_amd_gpu_power_profile, get_set_amd_vr_pow_prof_cmd, GpuPowerProfile, get_first_amd_gpu, GpuSysDrm}; +use crate::gpu_profile::{ + get_amd_gpu_power_profile, get_first_amd_gpu, get_set_amd_vr_pow_prof_cmd, GpuPowerProfile, + GpuSysDrm, +}; use crate::profile::{LighthouseDriver, Profile}; use crate::steamvr_utils::chaperone_info_exists; use crate::ui::app::{