mirror of
https://github.com/jimeh/tmux-themepack.git
synced 2026-02-19 11:16:43 +00:00
17
README.md
17
README.md
@@ -5,6 +5,8 @@ A pack of various themes for Tmux.
|
||||
|
||||
## Installation
|
||||
|
||||
### Install manually
|
||||
|
||||
1. Clone repo to local machine:
|
||||
|
||||
git clone https://github.com/jimeh/tmux-themepack.git ~/.tmux-themepack
|
||||
@@ -13,6 +15,21 @@ A pack of various themes for Tmux.
|
||||
|
||||
source-file "${HOME}/.tmux-themepack/powerline/block/green.tmuxtheme"
|
||||
|
||||
### Install using [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm)
|
||||
|
||||
1. Add plugin to the list of TPM plugins in `.tmux.conf`:
|
||||
|
||||
set -g @plugin 'jimeh/tmux-themepack'
|
||||
|
||||
2. Hit `prefix + I` to fetch the plugin and source it. The plugin should now be working.
|
||||
|
||||
You can pick and choose a theme via `.tmux.conf` option:
|
||||
|
||||
- `set -g @themepack 'block/blue'` (default)
|
||||
- `set -g @themepack 'block/cyan'`
|
||||
- `set -g @themepack 'default/gray'`
|
||||
- `set -g @themepack 'double/megenta'`
|
||||
- `...`
|
||||
|
||||
## Themes
|
||||
|
||||
|
||||
23
themepack.tmux
Executable file
23
themepack.tmux
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
theme_option="@themepack"
|
||||
default_theme='block/blue'
|
||||
|
||||
get_tmux_option() {
|
||||
local option="$1"
|
||||
local default_value="$2"
|
||||
local option_value="$(tmux show-option -gqv "$option")"
|
||||
if [ -z "$option_value" ]; then
|
||||
echo "$default_value"
|
||||
else
|
||||
echo "$option_value"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
local theme="$(get_tmux_option "$theme_option" "$default_theme")"
|
||||
tmux source-file "$CURRENT_DIR/powerline/${theme}.tmuxtheme"
|
||||
}
|
||||
main
|
||||
Reference in New Issue
Block a user