From bd0612511d5596f094fe02cacc1d0fa19e3464bb Mon Sep 17 00:00:00 2001 From: Dennis Date: Tue, 12 Aug 2025 15:03:11 +0200 Subject: [PATCH] updates wezterm config --- modules/wezterm/config/helpers.lua | 6 ++++++ modules/wezterm/config/keybindings.lua | 7 +------ modules/wezterm/config/tab_bar.lua | 3 +++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/wezterm/config/helpers.lua b/modules/wezterm/config/helpers.lua index 265cc4d..82d6d76 100644 --- a/modules/wezterm/config/helpers.lua +++ b/modules/wezterm/config/helpers.lua @@ -52,4 +52,10 @@ function M.move_pane(key, direction) } end +function M.get_zoom_state(active_pane) + local zoom_state = active_pane:is_zoomed() and "[Z] " or "" + + return zoom_state +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..cc62ea6 100644 --- a/modules/wezterm/config/tab_bar.lua +++ b/modules/wezterm/config/tab_bar.lua @@ -5,9 +5,12 @@ local helpers = require("helpers") local M = {} local function get_elements(for_window) + local active_pane = for_window:active_pane() + return { { Background = { Color = theme.colors().tab_bar.background } }, { Foreground = { Color = theme.colors().tab_bar.inactive_tab.fg_color } }, + { Text = helpers.get_zoom_state(active_pane) }, { Text = "h:" .. wezterm.hostname() .. " " }, { Text = "upgrades:" .. helpers.get_outdated_packages() .. " " }, { Text = "bat:" .. helpers.get_primary_battery_state() .. " " },