File tree 2 files changed +35
-0
lines changed
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ source $current_dir/utils.sh
8
8
main ()
9
9
{
10
10
# set configuration option variables
11
+ terraform_label=$( get_tmux_option " @dracula-terraform-label" " " )
11
12
show_fahrenheit=$( get_tmux_option " @dracula-show-fahrenheit" true)
12
13
show_location=$( get_tmux_option " @dracula-show-location" true)
13
14
fixed_location=$( get_tmux_option " @dracula-fixed-location" )
@@ -197,6 +198,10 @@ main()
197
198
IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula-kubernetes-context-colors" " cyan dark_gray" )
198
199
script=" #($current_dir /kubernetes_context.sh $show_kubernetes_context_label )"
199
200
201
+ elif [ $plugin = " terraform" ]; then
202
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula-terraform-colors" " light_purple dark_gray" )
203
+ script=" #($current_dir /terraform.sh $terraform_label )"
204
+
200
205
elif [ $plugin = " weather" ]; then
201
206
IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula-weather-colors" " orange dark_gray" )
202
207
script=" #($current_dir /weather_wrapper.sh $show_fahrenheit $show_location $fixed_location )"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # setting the locale, some users have issues with different locales, this forces the correct one
3
+ export LC_ALL=en_US.UTF-8
4
+
5
+ label=$1
6
+
7
+ current_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
8
+ source $current_dir /utils.sh
9
+
10
+ main () {
11
+ # storing the refresh rate in the variable RATE, default is 5
12
+ RATE=$( get_tmux_option " @dracula-refresh-rate" 5)
13
+ OUTPUT_STRING=" N/A"
14
+ terraform_dir=" $( tmux display-message -p ' #{pane_current_path}' ) /.terraform"
15
+ if [ -d $terraform_dir ]; then
16
+ current_workspace=$( terraform workspace show 2> /dev/null)
17
+ OUTPUT_STRING=" ${current_workspace} "
18
+ fi
19
+ if [ " $label " = " " ]
20
+ then
21
+ echo " ⚙️ ${OUTPUT_STRING} "
22
+ else
23
+ echo " ⚙️ ${label} ${OUTPUT_STRING} "
24
+ fi
25
+
26
+ sleep $RATE
27
+ }
28
+
29
+ # run the main driver
30
+ main
You can’t perform that action at this time.
0 commit comments