diff --git a/Justfile b/Justfile index 32a5b9c..05e7029 100644 --- a/Justfile +++ b/Justfile @@ -29,7 +29,7 @@ mre: darwin-rebuild switch --flake . mup: - darwin-rebuild switch --recreate-lock-file --flake . && brew upgrade --cask --greedy + darwin-rebuild switch --recreate-lock-file --flake . # dnsc-deck dre: diff --git a/modules/wezterm/config/helpers.lua b/modules/wezterm/config/helpers.lua index 265cc4d..f9729c2 100644 --- a/modules/wezterm/config/helpers.lua +++ b/modules/wezterm/config/helpers.lua @@ -52,4 +52,25 @@ function M.move_pane(key, direction) } end +function M.get_is_zoomed(for_window) + local tab = for_window:active_tab() + local panes_info = tab:panes_with_info() + + for _, pane_info in ipairs(panes_info) do + if pane_info.is_active then + return pane_info.is_zoomed + end + end +end + +function M.get_zoomed_status(for_window) + local is_zoomed = M.get_is_zoomed(for_window) + + if is_zoomed then + return "[Z]" + end + + return "" +end + return M diff --git a/modules/wezterm/config/keybindings.lua b/modules/wezterm/config/keybindings.lua index d659f16..4f45797 100644 --- a/modules/wezterm/config/keybindings.lua +++ b/modules/wezterm/config/keybindings.lua @@ -17,12 +17,7 @@ function M.apply_to_config(config) { key = "-", mods = "LEADER", - action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }), - }, - { - key = "-", - mods = "LEADER", - action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }), + action = wezterm.action.SplitPane({ direction = "Down", size = { Percent = 30 } }), }, { key = "x", diff --git a/modules/wezterm/config/tab_bar.lua b/modules/wezterm/config/tab_bar.lua index 9aaab81..ef65593 100644 --- a/modules/wezterm/config/tab_bar.lua +++ b/modules/wezterm/config/tab_bar.lua @@ -13,6 +13,7 @@ local function get_elements(for_window) { Text = "bat:" .. helpers.get_primary_battery_state() .. " " }, { Background = { Color = theme.colors().tab_bar.active_tab.bg_color } }, { Foreground = { Color = theme.colors().tab_bar.active_tab.fg_color } }, + { Text = helpers.get_zoomed_status(for_window) .. " " }, { Text = " session >> " .. for_window:active_workspace() .. " " }, } end