Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Apr 4, 2024. It is now read-only.
/despellPublic archive

🎩 Put icons in `tmux`'s status line

License

NotificationsYou must be signed in to change notification settings

bensadeh/despell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

despell maps commands to icons intmux's status line

Features

  • 🗺️ Map commands to nerdfont icons
  • 🎨 Customization options for colors and emojis
  • 🔄 Easy to override default mappings
  • ⚡ Fast (Instant lookup timeO(1))
  • 🔧 Simple to use and integrate with other themes

Installing

Cargo

cargo install despell

NoteMake sure that$HOME/.cargo/bin is in yourPATH environment variable

Requirements

despell requires your terminal to use aNerd Fonts-patched font.

How does it work?

At its core,despell takes a string (process name) as input and returns a string (icon) as output.

Getting started

To usedespell in your existing config, replace all occurrences of

#W

with

#(despell #W) #W

in your~/.tmux.conf.

If you don't have a~/.tmux.conf yet, have a look at the example configs below to get started.

Example config

You can start usingdespell by using the example config from the screenshot. Copy of the config below into yourown~/.tmux.conf to get started.

# Colorstmux_active_fg=#a6accdtmux_active_bg=#414863tmux_inactive_fg=defaulttmux_statusbar_bg=#232235# Window status separatorset-window-option -g window-status-separator''# Status barset-option -g status-style bg=$tmux_statusbar_bgset-option -g status-left""set-option -g status-right""# Justify status barset -g status-justify centre# Activeset-window-option -g window-status-current-format"\#[bg=$tmux_active_bg] #(despell -c #W)\#[fg=$tmux_active_fg bg=$tmux_active_bg] #W"# Inactiveset-window-option -g window-status-format"\#[fg=$tmux_inactive_fg,bg=$tmux_statusbar_bg] #(despell -c #W)\#[fg=$tmux_inactive_fg,dim bg=$tmux_statusbar_bg] #W"

Settings

Center alignment

To center the status line instead of left aligned (default), add the following command toyour~/.tmux.conf:

# Set alignmentset -g status-justify centre

Update frequency

To configure how oftentmux refreshes its status line, add the following command toyour~/.tmux.conf:

# Update the status line every X secondsset -g status-interval 5

Per-icon colors

To letdespell set the icon color and override your theme settings, rundespell with the-c or--color flag:

#(despell -c #W)

Emojis

To use emojis instead of Nerd Fonts, rundespell with the-e or--emoji flag:

#(despell -e #W)

Overriding and adding icons

To override any of the default mappings, rundespell with the-u or--custom flag. Place aconfig.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 theTOML.

[default]nerdfont =""color ="none"emoji ="🐠"[icons.command1]nerdfont =""color ="blue"emoji ="🌐"[icons.command2]nerdfont =""color ="magenta"emoji ="💙"

Is a mapping missing?

Let me know by opening an Issue, Discussion or PR.


[8]ページ先頭

©2009-2025 Movatter.jp