Add 'custom' status plugin to get status texts from external scripts.
This commit is contained in:
parent
5b282b043f
commit
44018dede1
2 changed files with 14 additions and 1 deletions
|
@ -24,6 +24,7 @@ Configuration and options can be found at [draculatheme.com/tmux](https://dracul
|
||||||
- CPU usage (percentage or load average)
|
- CPU usage (percentage or load average)
|
||||||
- RAM usage
|
- RAM usage
|
||||||
- GPU usage
|
- GPU usage
|
||||||
|
- Custom status texts from external scripts
|
||||||
- Color code based on if prefix is active or not
|
- Color code based on if prefix is active or not
|
||||||
- List of windows with current window highlighted
|
- List of windows with current window highlighted
|
||||||
- When prefix is enabled smiley face turns from green to yellow
|
- When prefix is enabled smiley face turns from green to yellow
|
||||||
|
|
|
@ -127,9 +127,21 @@ main()
|
||||||
|
|
||||||
for plugin in "${plugins[@]}"; do
|
for plugin in "${plugins[@]}"; do
|
||||||
|
|
||||||
|
if case $plugin in custom:*) true;; *) false;; esac; then
|
||||||
|
script=${plugin#"custom:"}
|
||||||
|
if [[ -x "${current_dir}/${script}" ]]; then
|
||||||
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-custom-plugin-colors" "cyan dark_gray")
|
||||||
|
script="#($current_dir/${script})"
|
||||||
|
else
|
||||||
|
colors[0]="red"
|
||||||
|
colors[1]="dark_gray"
|
||||||
|
script="${script} not found!"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $plugin = "git" ]; then
|
if [ $plugin = "git" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-git-colors" "green dark_gray")
|
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-git-colors" "green dark_gray")
|
||||||
script="#($current_dir/git.sh)"
|
script="#($current_dir/git.sh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $plugin = "battery" ]; then
|
if [ $plugin = "battery" ]; then
|
||||||
|
|
Loading…
Reference in a new issue