From fdcd8b5bf79590f96c1e0e059b6b5ac4a9b9a152 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 20 Oct 2013 19:48:07 +0100 Subject: [PATCH] Fix year in license --- README.md | 2 +- tmuxthemes.tmux | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 tmuxthemes.tmux diff --git a/README.md b/README.md index b56d746..639a6f4 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ in that case :) DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 - Copyright (C) 2004 Jim Myhrberg + Copyright (C) 2013 Jim Myhrberg Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long diff --git a/tmuxthemes.tmux b/tmuxthemes.tmux new file mode 100755 index 0000000..954055a --- /dev/null +++ b/tmuxthemes.tmux @@ -0,0 +1,23 @@ +#!/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