-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7af700b
commit 7a94e10
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |