Skip to content

Commit

Permalink
feat: plugin for tpm
Browse files Browse the repository at this point in the history
  • Loading branch information
nlebedevinc committed Feb 28, 2023
1 parent 7af700b commit 7a94e10
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions theme-tpm.tmux
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OPTION="@tmux-theme"
DEFAULT=default

# currently will be the only one theme variation (default)
get_theme() {
loca option="$1"
local default_value="$2"
local option_value
option_value=$(tmux show-option -gqv "$option")
if [ -z "$option_value" ]; then
echo "$default_value"
else
echo "$option_value"
fi
}


main() {
local theme
theme=($get_theme "OPTION" "DEFAULT")
tmux source-file "$CURRENT_DIR/${theme}.conf"
}

0 comments on commit 7a94e10

Please sign in to comment.