From fdcd8b5bf79590f96c1e0e059b6b5ac4a9b9a152 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 20 Oct 2013 19:48:07 +0100 Subject: [PATCH 1/6] 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 From ba6cb6821eb298c512d7f9bba4cde5124bd5f36c Mon Sep 17 00:00:00 2001 From: wfxr Date: Tue, 27 Oct 2015 19:36:24 +0800 Subject: [PATCH 2/6] add plugin manager support 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 ... --- tmuxthemes.tmux => themepack.tmux | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tmuxthemes.tmux => themepack.tmux (100%) diff --git a/tmuxthemes.tmux b/themepack.tmux similarity index 100% rename from tmuxthemes.tmux rename to themepack.tmux From 0c376e318f62931d845609182bbc52822e8bea47 Mon Sep 17 00:00:00 2001 From: wfxr Date: Tue, 27 Oct 2015 20:18:40 +0800 Subject: [PATCH 3/6] Update README.md for tpm support --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 639a6f4..0e1bdd8 100644 --- a/README.md +++ b/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" +### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) + +Add plugin to the list of TPM plugins in `.tmux.conf`: + + set -g @plugin 'jimeh/tmux-themepack' + +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'` (the default) or +- `set -g @themepack 'block/cyan'` or +- `set -g @themepack 'default/gray'` or +- `set -g @themepack 'double/megenta'` or + ... ## Themes From aff42e94a5f950706b5fa6ebd6f0a0a64078eb07 Mon Sep 17 00:00:00 2001 From: wfxr Date: Tue, 27 Oct 2015 20:18:40 +0800 Subject: [PATCH 4/6] Update README.md for tpm support --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 639a6f4..3ae1843 100644 --- a/README.md +++ b/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) + +Add plugin to the list of TPM plugins in `.tmux.conf`: + + set -g @plugin 'jimeh/tmux-themepack' + +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 From dcee5beff832a419b2054d979b3d65f32f5198ef Mon Sep 17 00:00:00 2001 From: Wenxuan Date: Tue, 27 Oct 2015 20:29:42 +0800 Subject: [PATCH 5/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3ae1843..623ae40 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,11 @@ A pack of various themes for Tmux. ### Install using [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) -Add plugin to the list of TPM plugins in `.tmux.conf`: +1. Add plugin to the list of TPM plugins in `.tmux.conf`: set -g @plugin 'jimeh/tmux-themepack' -Hit `prefix + I` to fetch the plugin and source it. The plugin should now be working. +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: From 120a1fe4a0ce37985dc29453c3bd27680b63b695 Mon Sep 17 00:00:00 2001 From: wfxr Date: Tue, 27 Oct 2015 20:37:50 +0800 Subject: [PATCH 6/6] bug fix: now default theme can work properly --- themepack.tmux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themepack.tmux b/themepack.tmux index 954055a..ff18863 100755 --- a/themepack.tmux +++ b/themepack.tmux @@ -3,7 +3,7 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" theme_option="@themepack" -defalut_theme='block/blue' +default_theme='block/blue' get_tmux_option() { local option="$1"