diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2022-08-25 09:18:56 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2022-08-25 16:34:15 +0300 |
| commit | b154262dcbf0d1a5686921f24eb0b0c41ed95f29 (patch) | |
| tree | cf1695a7b6dd997463e3a024d34902dad459e9ca /src/tags.rs | |
| parent | 2d77969c7719e72237ec365c3db9e35c3e178631 (diff) | |
| download | i3bar-mango-b154262dcbf0d1a5686921f24eb0b0c41ed95f29.tar.gz | |
feat: add hide_inactive_tags option
Diffstat (limited to 'src/tags.rs')
| -rw-r--r-- | src/tags.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tags.rs b/src/tags.rs index 0c63570..5a4a1b2 100644 --- a/src/tags.rs +++ b/src/tags.rs @@ -5,15 +5,17 @@ use pangocairo::{cairo, pango}; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum TagState { + Urgent, Focused, + Active, Inactive, - Urgent, } #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] pub struct TagsInfo { pub focused: u32, pub urgent: u32, + pub active: u32, } impl TagsInfo { @@ -22,6 +24,8 @@ impl TagsInfo { TagState::Urgent } else if self.focused >> tag & 1 == 1 { TagState::Focused + } else if self.active >> tag & 1 == 1 { + TagState::Active } else { TagState::Inactive } |
