mirror of
https://github.com/jimeh/tmux-themepack.git
synced 2026-02-19 11:16:43 +00:00
Add TPM(a plugin manager for tmux) support. Now we can install and manage it by 'TPM'.
Details:
Add plugin to the list of TPM plugins in .tmux.conf:
set -g @plugin 'wfxr/tmux-themepack'
Hit prefix + I to fetch the plugin and source it. The plugin should now be working.
now we can pick and choose a theme via .tmux.conf option:
set -g @themepack 'block/blue' (the default) or
set -g @themepack 'block/cyan' or
set -g @themepack 'default/gray' or
set -g @themepack 'double/megenta' or
...
24 lines
500 B
Bash
Executable File
24 lines
500 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
theme_option="@themepack"
|
|
defalut_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
|