-
-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Toggle the zoom state of the current pane from CLI
- Loading branch information
1 parent
87a0099
commit 403a711
Showing
5 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use crate::cli::resolve_pane_id; | ||
use clap::Parser; | ||
use mux::pane::PaneId; | ||
use wezterm_client::client::Client; | ||
|
||
#[derive(Debug, Parser, Clone)] | ||
pub struct TogglePaneZoomState {} | ||
|
||
impl TogglePaneZoomState { | ||
pub async fn run(&self, client: Client) -> anyhow::Result<()> { | ||
let none: Option<PaneId> = None; | ||
let pane_id = resolve_pane_id(&client, none).await?; | ||
client | ||
.toggle_pane_zoom_state(codec::TogglePaneZoomState { pane_id }) | ||
.await?; | ||
Ok(()) | ||
} | ||
} |