diff options
author | Determinant <tederminant@gmail.com> | 2020-05-22 17:57:37 -0400 |
---|---|---|
committer | Determinant <tederminant@gmail.com> | 2020-05-22 17:57:37 -0400 |
commit | 8f8792508e7d1e7f34d279692da22c17d1607913 (patch) | |
tree | de61c5bd268aa87d8b0e900b50b095ca89ce29a1 /tmux-colortag-prompt.sh | |
parent | 21430f45aa2d26704c479141b48b6a5571f0c5ac (diff) |
add more commands
Diffstat (limited to 'tmux-colortag-prompt.sh')
-rwxr-xr-x | tmux-colortag-prompt.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tmux-colortag-prompt.sh b/tmux-colortag-prompt.sh index 874a29f..0cdc01b 100755 --- a/tmux-colortag-prompt.sh +++ b/tmux-colortag-prompt.sh @@ -7,6 +7,10 @@ run_python() { fi } +run_python_long() { + "$CURRENT_DIR/name2color.py" "$session" "$idx" "$name" "$@" || echo "ColorTag: invalid argument" +} + CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" case "$1" in prompt) @@ -27,16 +31,24 @@ case "$1" in clear-all) run_python --clear ;; + manual-colors) + run_python_long --show-state + ;; + colors) + tmux new-window -n '[colors]' "$CURRENT_DIR/termcolor_256.sh" + ;; '') ;; help) echo "# Tmux ColorTag" echo "# Ted Yin <tederminant@gmail.com>" echo "Note: color overriding order: color-idx > color-name > auto" + echo "colors: show all available color codes" echo "color-idx <0-255>: manually set the color for the window index" echo "color-name <0-255>: manually set the color for the name" echo "clear-idx: clears the preivous color of the index" echo "clear-name: clears the preivous color of the name" echo "clear-all: use auto-coloring for all window tags" + echo "manual-colors: show all memorized coloring for this session" ;; *) tmux display "ColorTag: invalid command"; exit 0;; esac |