#
despell
maps commands to icons in tmux
's status line
O(1)
)console
cargo install despell
Note Make sure that
$HOME/.cargo/bin
is in yourPATH
environment variable
despell
requires your terminal to use a Nerd Fonts-patched font.
At its core, despell
takes a string (process name) as input and returns a string (icon) as output.
To use despell
in your existing config, replace all occurrences of
```
```
with
```
```
in your ~/.tmux.conf
.
If you don't have a ~/.tmux.conf
yet, have a look at the example configs below to get started.
You can start using despell
by using the example config from the screenshot. Copy of the config below into your
own ~/.tmux.conf
to get started.
```tmux
tmuxactivefg=#a6accd tmuxactivebg=#414863 tmuxinactivefg=default tmuxstatusbarbg=#232235
set-window-option -g window-status-separator ''
set-option -g status-style bg=$tmuxstatusbarbg set-option -g status-left "" set-option -g status-right ""
set -g status-justify centre
set-window-option -g window-status-current-format "\ #[bg=$tmuxactivebg] #(despell -c #W)\
set-window-option -g window-status-format "\ #[fg=$tmuxinactivefg,bg=$tmuxstatusbarbg] #(despell -c #W)\
```
To center the status line instead of left aligned (default), add the following command to
your ~/.tmux.conf
:
```tmux
set -g status-justify centre ```
To configure how often tmux
refreshes its status line, add the following command to
your ~/.tmux.conf
:
```tmux
set -g status-interval 5 ```
To let despell
set the icon color and override your theme settings, run despell
with the
-c
or --color
flag:
```tmux
```
To use emojis instead of Nerd Fonts, run despell
with the -e
or --emoji
flag:
```tmux
```
To override any of the default mappings, run despell
with the -u
or --custom
flag. Place a config.toml
in
~/.config/despell/config.toml
with your custom mappings.
All fields are optional, so if you don't use emojis, you can safely omit the fields from the TOML
.
```toml [default] nerdfont = "β" color = "none" emoji = "π "
[icons.command1] nerdfont = "β" color = "blue" emoji = "π"
[icons.command2] nerdfont = "β€" color = "magenta" emoji = "π" ```
Let me know by opening an Issue, Discussion or PR.