diff --git a/README.md b/README.md index 110a2b6..630f72e 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Configuration and options can be found at [draculatheme.com/tmux](https://dracul - CPU usage (percentage or load average) - RAM usage - GPU usage +- Custom status texts from external scripts - GPU VRAM usage - GPU power draw - Color code based on if prefix is active or not diff --git a/scripts/dracula.sh b/scripts/dracula.sh index 7ded8a7..a2bff10 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -123,7 +123,18 @@ main() for plugin in "${plugins[@]}"; do - if [ $plugin = "cwd" ]; then + 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 + + elif [ $plugin = "cwd" ]; then IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-cwd-colors" "dark_gray white") tmux set-option -g status-right-length 250 script="#($current_dir/cwd.sh)"