Skip to content

Instantly share code, notes, and snippets.

@panki27
Last active June 9, 2024 13:10
Show Gist options
  • Save panki27/2234daeb09a2194cba9ca6377040c4bb to your computer and use it in GitHub Desktop.
Save panki27/2234daeb09a2194cba9ca6377040c4bb to your computer and use it in GitHub Desktop.
Static emoji for every wezterm pane/tab
-- 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
# 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
@panki27
Copy link
Author

panki27 commented Jun 9, 2024

Each new pane gets assigned a random emoji. The emoji of the currently active pane is reflected in the tab bar.

wt_emoji2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment