From 832f7e50f7d88a936282755a09d008bee329d827 Mon Sep 17 00:00:00 2001 From: Brian Mayo Date: Mon, 29 Jan 2024 23:19:21 +0000 Subject: [PATCH] add ps info on right status --- stow/wezterm/.config/wezterm/wezterm.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/stow/wezterm/.config/wezterm/wezterm.lua b/stow/wezterm/.config/wezterm/wezterm.lua index e8753593..82289a2f 100644 --- a/stow/wezterm/.config/wezterm/wezterm.lua +++ b/stow/wezterm/.config/wezterm/wezterm.lua @@ -318,15 +318,17 @@ wezterm.on('format-tab-title', function(tab, tabs, panes, config, hover, max_wid } end) -wezterm.on('update-right-status', function(window) - if not window:get_dimensions().is_full_screen then - window:set_right_status('') - return +wezterm.on('update-right-status', function(window, pane) + local info = pane:get_foreground_process_info() + wezterm.log_info(info) + local text = info and (info.name .. ' ') or '' + if window:get_dimensions().is_full_screen then + text = text .. ' | ' .. wezterm.strftime(' %R ') end window:set_right_status(wezterm.format({ { Foreground = { Color = '#808080' } }, - { Text = wezterm.strftime(' %R ') }, + { Text = text }, })) end)