Last active
June 9, 2024 13:10
-
-
Save panki27/2234daeb09a2194cba9ca6377040c4bb to your computer and use it in GitHub Desktop.
Static emoji for every wezterm pane/tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- most of the heavy lifting provided by https://gist.github.com/gsuuon/5511f0aa10c10c6cbd762e0b3e596b71 | |
-- here is my only adaptation to add the active pane emoji to the tab bar: | |
local function tab_title(tab_info) | |
local title = tab_info.tab_title | |
local icon = tab_info.active_pane.user_vars.ICON | |
if icon then | |
return icon .. ' ' .. tab_info.active_pane.title:gsub("%.exe", "") | |
else | |
return tab_info.active_pane.title:gsub("%.exe", "") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You will need the `pure` prompt for this to work: https://github.com/sindresorhus/pure | |
# oh, and the wezterm shell integration too: https://wezfurlong.org/wezterm/shell-integration.html | |
ICONS=(π π π€‘ π» π½ πΎ π€ πΊ π π₯ π¦₯ π£ π§ πΈ π’ π π³ π΄ π π π π₯ π₯₯ π₯¨ π β π¨ π πΈ πͺ π π π π β‘ π₯ π§ β¨ π π πΎ π π£ π‘) | |
export PURE_PROMPT_SYMBOL="$(shuf -n1 -e "${ICONS[@]}")" | |
__wezterm_set_user_var "ICON" $PURE_PROMPT_SYMBOL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Each new pane gets assigned a random emoji. The emoji of the currently active pane is reflected in the tab bar.