Skip to content

Commit

Permalink
Add WezTerm zoom support
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrik Stier committed Aug 24, 2023
1 parent 91d8650 commit 929bf10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/Navigator/mux/wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ function WezTerm:new()
return setmetatable(state, self)
end

---Checks if wezterm is zoomed in
---@return boolean
function WezTerm:zoomed()
return self.execute([[list --format json | grep -Pzo "(?s)(?<=\"pane_id\": $WEZTERM_PANE).*?is_zoomed\":\ \K(.*?)(?=,)"]]) == 'true'
end

---Switch pane in wezterm
---@param direction Direction See |navigator.api.Direction|
---@return WezTerm
Expand Down

0 comments on commit 929bf10

Please sign in to comment.