feat: add exclusive tag + minor refactor
This commit is contained in:
parent
66d1dfacda
commit
0997b124a2
4 changed files with 114 additions and 76 deletions
|
@ -21,6 +21,7 @@ enum Commands {
|
|||
EnableTag { tag: u8 },
|
||||
DisableTag { tag: u8 },
|
||||
ToggleTag { tag: u8 },
|
||||
ExclusiveTag { tag: u8 },
|
||||
}
|
||||
|
||||
impl From<Commands> for niri_tag::TagCmd {
|
||||
|
@ -32,6 +33,7 @@ impl From<Commands> for niri_tag::TagCmd {
|
|||
Commands::EnableTag { tag } => TagCmd::EnableTag(tag),
|
||||
Commands::DisableTag { tag } => TagCmd::DisableTag(tag),
|
||||
Commands::ToggleTag { tag } => TagCmd::ToggleTag(tag),
|
||||
Commands::ExclusiveTag { tag } => TagCmd::ExclusiveTag(tag),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +49,7 @@ fn main() -> Result<()> {
|
|||
EnableTag { tag } if tag > 0 => (),
|
||||
DisableTag { tag } if tag > 0 => (),
|
||||
ToggleTag { tag } if tag > 0 => (),
|
||||
ExclusiveTag { .. } => (),
|
||||
_ => return Err(anyhow!("Can't change tag 0!")),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue