diff options
| author | Andreas Grois <andi@grois.info> | 2024-02-11 15:15:44 +0100 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2024-02-11 15:15:44 +0100 |
| commit | e5ebcc0e4f7598ec26f1a67305d7f9a42bf35a59 (patch) | |
| tree | 5dc39989670e14451db1ac9e83a79fbd665c8074 /alsa/src/config.rs | |
| parent | 41d1e47d29898e6ef0ec8ae5b9c6cab719fdf5f1 (diff) | |
Fix config for ALSA
Diffstat (limited to 'alsa/src/config.rs')
| -rw-r--r-- | alsa/src/config.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/alsa/src/config.rs b/alsa/src/config.rs index 93bcab9..51942c2 100644 --- a/alsa/src/config.rs +++ b/alsa/src/config.rs @@ -1,5 +1,3 @@ -use std::ffi::CString; - use formatable_float::{FormatableFloatValue, KeyBackingTypeMetadata, FormattingError}; use serde::{Serialize, Deserialize}; use swaystatus_plugin::*; @@ -8,8 +6,8 @@ use crate::{runnable::AlsaVolumeRunnable, communication::{SenderForMain, make_se #[derive(Serialize, Deserialize)] pub struct AlsaVolumeConfig{ - pub(crate) device : CString, - pub(crate) element : CString, + pub(crate) device : String, + pub(crate) element : String, pub(crate) abstraction : SElemAbstraction, sorting: FieldSorting, mute: FormatableMute, @@ -93,8 +91,8 @@ impl SwayStatusModuleInstance for AlsaVolumeConfig { impl Default for AlsaVolumeConfig { fn default() -> Self { Self { - device: CString::new("default").unwrap(), - element: CString::new("Master").unwrap(), + device: "default".into(), + element: "Master".into(), abstraction : SElemAbstraction::None, volume: FormatableFloatValue::Numeric { label: " ".into(), digits: 0 }, mute: FormatableMute::Symbol { label : String::new(), mute_symbol : String::from("🔇"), unmute_symbol : String::from("🔊") }, |
