aboutsummaryrefslogtreecommitdiff
path: root/src/utils/volume.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/volume.rs')
-rw-r--r--src/utils/volume.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/volume.rs b/src/utils/volume.rs
index 061ab60..c020ce8 100644
--- a/src/utils/volume.rs
+++ b/src/utils/volume.rs
@@ -1,9 +1,9 @@
-use crate::types::Config;
+use crate::config::CONFIG;
use alsa::mixer::{Mixer, SelemChannelId, SelemId};
// getting volume percentage
-pub fn get_volume(config: &Config) -> String {
- let card = if config.volume.card == "PULSE" {
+pub fn get_volume() -> String {
+ let card = if CONFIG.volume.card == "PULSE" {
"pulse"
} else {
"default"
@@ -27,5 +27,5 @@ pub fn get_volume(config: &Config) -> String {
((raw_volume as f64 / range as f64) * 100.) as u64
};
- format!(" {} {}% {}", config.volume.icon, vol, config.seperator)
+ format!(" {} {}% {}", CONFIG.volume.icon, vol, CONFIG.seperator)
}