feat: implement scratchpad window toggling
This commit is contained in:
parent
5c2f631fdb
commit
d756c8a6a2
17 changed files with 515 additions and 3 deletions
|
|
@ -117,6 +117,8 @@ impl ActionParser<'_> {
|
|||
"toggle-fullscreen" => ToggleFullscreen,
|
||||
"enter-fullscreen" => SetFullscreen(true),
|
||||
"exit-fullscreen" => SetFullscreen(false),
|
||||
"send-to-scratchpad" => SendToScratchpad,
|
||||
"toggle-scratchpad" => ToggleScratchpad,
|
||||
"focus-parent" => FocusParent,
|
||||
"close" => Close,
|
||||
"disable-pointer-constraint" => DisablePointerConstraint,
|
||||
|
|
@ -222,6 +224,24 @@ impl ActionParser<'_> {
|
|||
Ok(Action::MoveToWorkspace { name })
|
||||
}
|
||||
|
||||
fn parse_send_to_scratchpad(&mut self, ext: &mut Extractor<'_>) -> ParseResult<Self> {
|
||||
let name = ext
|
||||
.extract(opt(str("name")))?
|
||||
.map(|name| name.value)
|
||||
.unwrap_or("")
|
||||
.to_string();
|
||||
Ok(Action::SendToScratchpad { name })
|
||||
}
|
||||
|
||||
fn parse_toggle_scratchpad(&mut self, ext: &mut Extractor<'_>) -> ParseResult<Self> {
|
||||
let name = ext
|
||||
.extract(opt(str("name")))?
|
||||
.map(|name| name.value)
|
||||
.unwrap_or("")
|
||||
.to_string();
|
||||
Ok(Action::ToggleScratchpad { name })
|
||||
}
|
||||
|
||||
fn parse_configure_connector(&mut self, ext: &mut Extractor<'_>) -> ParseResult<Self> {
|
||||
let con = ext
|
||||
.extract(val("connector"))?
|
||||
|
|
@ -551,6 +571,8 @@ impl Parser for ActionParser<'_> {
|
|||
"switch-to-vt" => self.parse_switch_to_vt(&mut ext),
|
||||
"show-workspace" => self.parse_show_workspace(&mut ext),
|
||||
"move-to-workspace" => self.parse_move_to_workspace(&mut ext),
|
||||
"send-to-scratchpad" => self.parse_send_to_scratchpad(&mut ext),
|
||||
"toggle-scratchpad" => self.parse_toggle_scratchpad(&mut ext),
|
||||
"configure-connector" => self.parse_configure_connector(&mut ext),
|
||||
"configure-input" => self.parse_configure_input(&mut ext),
|
||||
"configure-output" => self.parse_configure_output(&mut ext),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue