File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 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
88main ()
99{
1010  #  set configuration option variables
11+   terraform_label=$( get_tmux_option " @dracula-terraform-label" " " ) 
1112  show_fahrenheit=$( get_tmux_option " @dracula-show-fahrenheit" ) 
1213  show_location=$( get_tmux_option " @dracula-show-location" ) 
1314  fixed_location=$( get_tmux_option " @dracula-fixed-location" ) 
@@ -197,6 +198,10 @@ main()
197198      IFS='  ' read  -r -a colors <<< $( get_tmux_option" @dracula-kubernetes-context-colors" " cyan dark_gray" 
198199      script=" #($current_dir /kubernetes_context.sh $show_kubernetes_context_label )" 
199200
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+ 
200205    elif  [ $plugin  =  " weather" ;  then 
201206      IFS='  ' read  -r -a colors <<<  $( get_tmux_option" @dracula-weather-colors" " orange dark_gray" 
202207      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" ) 
13+   OUTPUT_STRING=" N/A" 
14+   terraform_dir=" $( tmux display-message -p ' #{pane_current_path}' ) " 
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