Skip to content

Commit

Permalink
add ps info on right status
Browse files Browse the repository at this point in the history
  • Loading branch information
protiumx committed Jan 29, 2024
1 parent 2c8a71d commit 832f7e5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions stow/wezterm/.config/wezterm/wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 .. ' <args ' .. #info.argv .. '>') 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)

Expand Down

0 comments on commit 832f7e5

Please sign in to comment.