diff --git a/src/main.rs b/src/main.rs index 0e97123..3da4b69 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,8 @@ use std::sync::{Arc, RwLock}; use std::time::Duration; -mod battery_tray; -use battery_tray::{BatteryTray, TrayHandler}; +mod status_tray; +use status_tray::{StatusTray, TrayHandler}; use hyper_x_cloud_ii_wireless::devices::{connect_compatible_device, Device, DeviceError}; fn handle_error(error: DeviceError) -> String { @@ -32,7 +32,7 @@ fn main() { std::thread::sleep(Duration::from_secs(1)); }; - let tray_handler = TrayHandler::new(BatteryTray::new()); + let tray_handler = TrayHandler::new(StatusTray::new()); // Run loop loop { diff --git a/src/battery_tray.rs b/src/status_tray.rs similarity index 93% rename from src/battery_tray.rs rename to src/status_tray.rs index 5690529..772d819 100644 --- a/src/battery_tray.rs +++ b/src/status_tray.rs @@ -3,11 +3,11 @@ use ksni::{menu::StandardItem, Handle, MenuItem, ToolTip, Tray, TrayService}; use std::sync::{Arc, RwLock, RwLockReadGuard}; pub struct TrayHandler { - handle: Handle, + handle: Handle, } impl TrayHandler { - pub fn new(tray: BatteryTray) -> Self { + pub fn new(tray: StatusTray) -> Self { let tray_service = TrayService::new(tray); let handle = tray_service.handle(); tray_service.spawn(); @@ -28,21 +28,21 @@ impl TrayHandler { } } -pub struct BatteryTray { +pub struct StatusTray { device_name: Option, message: Option, } -impl BatteryTray { +impl StatusTray { pub fn new() -> Self { - BatteryTray { + StatusTray { device_name: None, message: None, } } } -impl Tray for BatteryTray { +impl Tray for StatusTray { fn id(&self) -> String { env!("CARGO_PKG_NAME").into() }