mirror of
https://github.com/o0th/tmux-nova.git
synced 2026-09-10 07:16:28 -04:00
This commit enables a tmux config to load plugin variables to be used in tmux-nova segments. This works by loading a file before plugin declarations that sets up a status-left option with the variables we want to load, then after the plugins are sourced we load those values into tmux environment variables to be used in segments.
15 lines
278 B
Bash
Executable file
15 lines
278 B
Bash
Executable file
#!/usr/bin/env bash
|
|
export LC_ALL=en_US.UTF-8
|
|
|
|
tmux set-option -g status-left ""
|
|
|
|
tmux set-environment -g @nova-load-variables ""
|
|
all=""
|
|
|
|
for var in "$@"
|
|
do
|
|
tmux set-option -ga status-left "#{$var}*"
|
|
all+="$var "
|
|
done
|
|
tmux set-environment -g @nova-load-variables "$all"
|