diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-10 22:34:53 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-10 22:42:45 +0300 |
| commit | 58166914607025ae9fb20d868138238bebd4c6bc (patch) | |
| tree | 9c1b583ecfd03b98a74288749b682166ceb2c16e /niri-config | |
| parent | 4b5e9e6cb08d269506cad8273ca7e9c93378034e (diff) | |
| download | niri-58166914607025ae9fb20d868138238bebd4c6bc.tar.gz niri-58166914607025ae9fb20d868138238bebd4c6bc.tar.bz2 niri-58166914607025ae9fb20d868138238bebd4c6bc.zip | |
Add urgent color support to tab indicators
Diffstat (limited to 'niri-config')
| -rw-r--r-- | niri-config/src/lib.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index b63cdd03..10ed31b5 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -841,9 +841,13 @@ pub struct TabIndicator { #[knuffel(child)] pub inactive_color: Option<Color>, #[knuffel(child)] + pub urgent_color: Option<Color>, + #[knuffel(child)] pub active_gradient: Option<Gradient>, #[knuffel(child)] pub inactive_gradient: Option<Gradient>, + #[knuffel(child)] + pub urgent_gradient: Option<Gradient>, } impl Default for TabIndicator { @@ -862,8 +866,10 @@ impl Default for TabIndicator { corner_radius: FloatOrInt(0.), active_color: None, inactive_color: None, + urgent_color: None, active_gradient: None, inactive_gradient: None, + urgent_gradient: None, } } } @@ -1539,9 +1545,13 @@ pub struct TabIndicatorRule { #[knuffel(child)] pub inactive_color: Option<Color>, #[knuffel(child)] + pub urgent_color: Option<Color>, + #[knuffel(child)] pub active_gradient: Option<Gradient>, #[knuffel(child)] pub inactive_gradient: Option<Gradient>, + #[knuffel(child)] + pub urgent_gradient: Option<Gradient>, } #[derive(knuffel::Decode, Debug, Clone, Copy, PartialEq)] @@ -2500,12 +2510,18 @@ impl TabIndicatorRule { if let Some(x) = other.inactive_color { self.inactive_color = Some(x); } + if let Some(x) = other.urgent_color { + self.urgent_color = Some(x); + } if let Some(x) = other.active_gradient { self.active_gradient = Some(x); } if let Some(x) = other.inactive_gradient { self.inactive_gradient = Some(x); } + if let Some(x) = other.urgent_gradient { + self.urgent_gradient = Some(x); + } } } @@ -4470,8 +4486,10 @@ mod tests { ), active_color: None, inactive_color: None, + urgent_color: None, active_gradient: None, inactive_gradient: None, + urgent_gradient: None, }, insert_hint: InsertHint { off: false, @@ -4901,8 +4919,10 @@ mod tests { }, ), inactive_color: None, + urgent_color: None, active_gradient: None, inactive_gradient: None, + urgent_gradient: None, }, draw_border_with_background: None, opacity: None, |
