tmux-gruvbox/README.md
Maciej Sypien 4f8b69ab8b
feat: add customizable statusbar (#31)
* feat: define dark and light color palettes

* feat: add customization of status-right & status-left sections

* feat: rename to gruvbox_dark256 and implement alpha option

* fix: transparency for tabs in left status bar

* fix: shellcheck errors

* fix: files according to shfmt

* feat: remove unnecessary modeline

* feat: save palettes as 256 color

* feat: update information about dark256 & light256 themes

* chore: add changelog entry
2024-09-22 17:20:33 +02:00

4.5 KiB

Gruvbox theme for Tmux

Theme with 'retro groove' flavor for Tmux, based on Pavel Pertsev's gruvbox colorscheme and inspired by work of Gordon Chiam. Subthemes switching inspired by tmux-color-solarized.

Screenshot made from macOS alacritty terminal with xterm-256color and Hack Nerd Font Regular.
Backgrounds by Aleksandar Pasaric and Vishnu Murali.

Installation

Add plugin at the top list of TPM plugins in .tmux.conf and select desired theme.

# ~/.tmux.conf
set -g @plugin 'egel/tmux-gruvbox'
# set desired options...
set -g @tmux-gruvbox 'dark' # or 'light'

Hit prefix + I to fetch the plugin and source it. Your Tmux should be updated with the theme at this point.

Install manually

  1. Clone the project to desired location

    ![TIP] If you do not have github account download it and unzip.

    cd ~/projects/
    git clone ...
    
  2. Add theme at to top of your ~/.tmux.conf config.

    # ~/.tmux.conf
    run ~/projects/tmux-gruvbox/tmux-gruvbox.tmux
    # set desired options...
    set -g @tmux-gruvbox 'dark' # or light
    

Configuration options

Theme

set -g @tmux-gruvbox 'dark256'

Transparent status-bar

  • default value: 'false'
  • tmux >= 3.2 (experimental)
set -g @tmux-gruvbox-statusbar-alpha 'true'

Left Status (Section A)

  • default value: '#S'
set -g @tmux-gruvbox-left-status-a

Right Status (Section X)

  • default value: '%Y-%m-%d'

This section is customizable for user, and by default contains current date.

set -g @tmux-gruvbox-right-status-x

Right Status (Section Y)

  • default value: '%H:%M'

This section is customizable for user, and by default contains current time.

# set different time format
set -g @tmux-gruvbox-right-status-y '%H:%M'

Right Status (Section Z)

  • default value: '#h'

This section is customizable for user, and by default contains hostname.

# enhance this section with other plugin
set -g @tmux-gruvbox-right-status-z '#h #{tmux_mode_indicator} '

Development

To run project locally:

  1. clone the repository to desired place

    cd $HOME/projects/
    git clone ...
    
  2. create a symlink to the cloned repository (best in the standard TPM plugin directory):

    # cd to tmux plugin directory
    cd ~/.tmux/plugins/
    
    # create symlink to cloned repo
    ln -sf $HOME/projects/tmux-gruvbox/ tmux-gruvbox
    
  3. and in ~/.tmux.conf set

    # ~/.tmux.conf
    set -g @plugin 'egel/tmux-gruvbox'
    # set desired options...
    set -g @tmux-gruvbox 'dark'
    

Linters & formatters

To keep the files clean we use few program to help us achieve it:

  1. Editorconfig (make sure your editor have it)
  2. Markdown (prettier/prettierd)
  3. Shell (shellcheck, shfmt)

License

GPLv3 - Maciej Sypień