system-utils 0.1.6

Cross-platform utilities for interacting with operating system features such as audio control, power management, system information, hardware monitoring, and device enumeration.
Documentation
use crate::prelude::*;

/// The system theme mode
#[derive(Debug, Display, Clone, Copy, Serialize, Deserialize, Eq, PartialEq, Hash)]
#[serde(rename_all = "lowercase")]
#[display(rename = "lowercase")]
pub enum ThemeStyle {
    Light,
    Dark,
}

impl ThemeStyle {
    pub fn is_light(&self) -> bool {
        matches!(self, Self::Light)
    }

    pub fn is_dark(&self) -> bool {
        matches!(self, Self::Dark)
    }
}