mirror of
https://github.com/TECHNOFAB11/tmux2k.git
synced 2025-12-12 16:10:07 +01:00
feat: add icons theme
This commit is contained in:
parent
72a9f033cb
commit
6a56a82120
1 changed files with 29 additions and 13 deletions
|
|
@ -32,6 +32,19 @@ light_yellow=$(get_tmux_option "@tmux2k-light-yellow" '#ffd21a')
|
||||||
purple=$(get_tmux_option "@tmux2k-purple" '#bf58ff')
|
purple=$(get_tmux_option "@tmux2k-purple" '#bf58ff')
|
||||||
light_purple=$(get_tmux_option "@tmux2k-light-purple" '#ff65c6')
|
light_purple=$(get_tmux_option "@tmux2k-light-purple" '#ff65c6')
|
||||||
|
|
||||||
|
declare -A plugin_colors=(
|
||||||
|
["git"]="green text"
|
||||||
|
["cpu"]="blue text"
|
||||||
|
["ram"]="light_yellow text"
|
||||||
|
["gpu"]="yellow text"
|
||||||
|
["battery"]="light_purple text"
|
||||||
|
["network"]="purple text"
|
||||||
|
["bandwidth"]="purple text"
|
||||||
|
["ping"]="purple text"
|
||||||
|
["weather"]="yellow text"
|
||||||
|
["time"]="light_blue text"
|
||||||
|
)
|
||||||
|
|
||||||
theme=$(get_tmux_option "@tmux2k-theme" 'default')
|
theme=$(get_tmux_option "@tmux2k-theme" 'default')
|
||||||
|
|
||||||
if [ "$theme" == "catpuccin" ]; then
|
if [ "$theme" == "catpuccin" ]; then
|
||||||
|
|
@ -51,18 +64,21 @@ if [ "$theme" == "catpuccin" ]; then
|
||||||
light_purple=$(get_tmux_option "@tmux2k-light-purple" '#f5bde6')
|
light_purple=$(get_tmux_option "@tmux2k-light-purple" '#f5bde6')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -A plugin_colors=(
|
if [ "$theme" == "icons" ]; then
|
||||||
["git"]="green text"
|
text=$bg_main
|
||||||
["cpu"]="blue text"
|
declare -A plugin_colors=(
|
||||||
["ram"]="light_yellow text"
|
["git"]="text green"
|
||||||
["gpu"]="yellow text"
|
["cpu"]="text blue"
|
||||||
["battery"]="light_purple text"
|
["ram"]="text light_yellow"
|
||||||
["network"]="purple text"
|
["gpu"]="text yellow"
|
||||||
["bandwidth"]="purple text"
|
["battery"]="text light_purple"
|
||||||
["ping"]="purple text"
|
["network"]="text purple"
|
||||||
["weather"]="yellow text"
|
["bandwidth"]="text purple"
|
||||||
["time"]="light_blue text"
|
["ping"]="text purple"
|
||||||
)
|
["weather"]="text yellow"
|
||||||
|
["time"]="text light_blue"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
get_plugin_colors() {
|
get_plugin_colors() {
|
||||||
local plugin_name="$1"
|
local plugin_name="$1"
|
||||||
|
|
@ -101,7 +117,7 @@ start_icon() {
|
||||||
|
|
||||||
first_plugin=${lplugins[0]}
|
first_plugin=${lplugins[0]}
|
||||||
IFS=' ' read -r -a first_colors <<<"$(get_plugin_colors "$first_plugin")"
|
IFS=' ' read -r -a first_colors <<<"$(get_plugin_colors "$first_plugin")"
|
||||||
tmux set-option -g status-left "#[bg=${!first_colors[0]},fg=${text}]#{?client_prefix,#[bg=${light_yellow},} ${start_icon} "
|
tmux set-option -g status-left "#[bg=${!first_colors[0]},fg=${!first_colors[1]}]#{?client_prefix,#[bg=${light_yellow},} ${start_icon} "
|
||||||
}
|
}
|
||||||
|
|
||||||
status_bar() {
|
status_bar() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue