despell
puts icons in tmux
's status line
# Install
brew install bensadeh/despell/despell
# Test
despell zsh
Make sure that $GOPATH/bin
is in your PATH
variable.
# Install
go install github.com/bensadeh/despell@latest
# Test
despell zsh
Make sure that $GOPATH/bin
is in your PATH
variable.
# Install
go install
# Test
despell zsh
despell
requires your terminal to use a Nerd Fonts-patched font.
At its core, despell
is a just a hash map lookup table.
It takes a string (process name) as input and returns a string (icon) as output.
despell
was created to add a corresponding Nerd Font icon next to the currently running command in tmux
's
status line. To use despell
, edit the following segments in your ~/.tmux.conf
:
window-status-current-format
(active window)window-status-format
(inactive window)
Inside these segments, call #(despell #W)
to map the command name to their respective icons.
Have a look at the layouts below for an example of the configuration used in the screenshot.
To configure how often tmux
refreshes its status line, add the following command to
your ~/.tmux.conf
:
# Update the status line every X seconds
tmux set -g status-interval 5
To let despell
set the icon color and override your theme settings, run despell
with the
-c
flag:
#(despell -c #W)
To use emojis instead of Nerd Fonts, run despell
with the -e
flag:
#(despell -e #W)
Override default icons or add new mappings by creating an overrides.json
and placing it in
~/.config/despell/overrides.json
. You can either use this example file or the snippet
below as a starting off point:
unknownCommand
is a reserved keyword for commands without mappings.
{
"unknownCommand": {
"Icon": "?",
"Color": "green",
"Emoji": "โ"
},
"ssh": {
"Icon": "โ",
"Color": "red",
"Emoji": "๐"
},
"zsh": {
"Icon": "โค",
"Color": "blue",
"Emoji": "๐"
}
}
Let me know by opening an Issue, Discussion or PR.
Screenshots use:
- iTerm2 for the terminal
- Palenight Theme for the color scheme
- JetBrains Mono for the font