New TMUX statusbar and config cleanup
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
show_application() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "application"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_batch_option "@catppuccin_application_icon" "")
|
||||
color=$(get_tmux_batch_option "@catppuccin_application_color" "$thm_pink")
|
||||
text=$(get_tmux_batch_option "@catppuccin_application_text" "#{pane_current_command}")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
30
config-files/.config/tmux/plugins/theme/status/battery.sh
Normal file
30
config-files/.config/tmux/plugins/theme/status/battery.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
show_battery() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "battery"
|
||||
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier8 ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier7 ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier6 ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier5 ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier4 ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier3 ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier2 ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier1 ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_charged ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_charging ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_discharging ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_unknown ;")
|
||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_attached ;")
|
||||
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_batch_option "@catppuccin_battery_icon" "#{battery_icon}")
|
||||
color=$(get_tmux_batch_option "@catppuccin_battery_color" "$thm_yellow")
|
||||
text=$(get_tmux_batch_option "@catppuccin_battery_text" "#{battery_percentage}")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
16
config-files/.config/tmux/plugins/theme/status/clima.sh
Normal file
16
config-files/.config/tmux/plugins/theme/status/clima.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
# Requires https://github.com/vascomfnunes/tmux-clima
|
||||
show_clima() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "clima"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_batch_option "@catppuccin_clima_icon" "")"
|
||||
color="$(get_tmux_batch_option "@catppuccin_clima_color" "$thm_yellow")"
|
||||
text="$(get_tmux_batch_option "@catppuccin_clima_text" "#{clima}")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
20
config-files/.config/tmux/plugins/theme/status/cpu.sh
Normal file
20
config-files/.config/tmux/plugins/theme/status/cpu.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
show_cpu() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "cpu"
|
||||
|
||||
tmux_batch_options_commands+=("set-option -gq @cpu_low_bg_color $thm_yellow ;") # background color when cpu is low
|
||||
tmux_batch_options_commands+=("set-option -gq @cpu_medium_bg_color $thm_orange ;") # background color when cpu is medium
|
||||
tmux_batch_options_commands+=("set-option -gq @cpu_high_bg_color $thm_red ;") # background color when cpu is high
|
||||
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_batch_option "@catppuccin_cpu_icon" "")
|
||||
color="$(get_tmux_batch_option "@catppuccin_cpu_color" "#{cpu_bg_color}")"
|
||||
text="$(get_tmux_batch_option "@catppuccin_cpu_text" "#{cpu_percentage}")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
15
config-files/.config/tmux/plugins/theme/status/date_time.sh
Normal file
15
config-files/.config/tmux/plugins/theme/status/date_time.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
show_date_time() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "date_time"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_batch_option "@catppuccin_date_time_icon" "")"
|
||||
color="$(get_tmux_batch_option "@catppuccin_date_time_color" "$thm_blue")"
|
||||
text="$(get_tmux_batch_option "@catppuccin_date_time_text" "%Y-%m-%d %H:%M")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
15
config-files/.config/tmux/plugins/theme/status/directory.sh
Normal file
15
config-files/.config/tmux/plugins/theme/status/directory.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
show_directory() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "directory"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_batch_option "@catppuccin_directory_icon" "")
|
||||
color=$(get_tmux_batch_option "@catppuccin_directory_color" "$thm_pink")
|
||||
text=$(get_tmux_batch_option "@catppuccin_directory_text" "#{b:pane_current_path}")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
17
config-files/.config/tmux/plugins/theme/status/gitmux.sh
Normal file
17
config-files/.config/tmux/plugins/theme/status/gitmux.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
# Requires https://github.com/arl/gitmux
|
||||
|
||||
show_gitmux() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "gitmux"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_batch_option "@catppuccin_gitmux_icon" "")"
|
||||
color="$(get_tmux_batch_option "@catppuccin_gitmux_color" "$thm_green")"
|
||||
text="$(get_tmux_batch_option "@catppuccin_gitmux_text" "#(gitmux \"#{pane_current_path}\")")"
|
||||
|
||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
15
config-files/.config/tmux/plugins/theme/status/host.sh
Normal file
15
config-files/.config/tmux/plugins/theme/status/host.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
show_host() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "host"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_batch_option "@catppuccin_host_icon" "")
|
||||
color=$(get_tmux_batch_option "@catppuccin_host_color" "$thm_magenta")
|
||||
text=$(get_tmux_batch_option "@catppuccin_host_text" "#H")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
24
config-files/.config/tmux/plugins/theme/status/kube.sh
Normal file
24
config-files/.config/tmux/plugins/theme/status/kube.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
# Requires https://github.com/jonmosco/kube-tmux
|
||||
|
||||
show_kube() {
|
||||
local index icon color text context_color namespace_color symbol_enabled module
|
||||
|
||||
tmux_batch_setup_status_module "kube"
|
||||
|
||||
add_tmux_batch_option "@catppuccin_kube_context_color"
|
||||
add_tmux_batch_option "@catppuccin_kube_namespace_color"
|
||||
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_batch_option "@catppuccin_kube_icon" "")
|
||||
color=$(get_tmux_batch_option "@catppuccin_kube_color" "$thm_blue")
|
||||
context_color=$(get_tmux_batch_option "@catppuccin_kube_context_color" "#{thm_red}")
|
||||
namespace_color=$(get_tmux_batch_option "@catppuccin_kube_namespace_color" "#{thm_cyan}")
|
||||
symbol_enabled=${KUBE_TMUX_SYMBOL_ENABLE:-false}
|
||||
text=$(get_tmux_batch_option "@catppuccin_kube_text" "#(KUBE_TMUX_SYMBOL_ENABLE=$symbol_enabled \${TMUX_PLUGIN_MANAGER_PATH}kube-tmux/kube.tmux 250 '$context_color' '$namespace_color')")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
15
config-files/.config/tmux/plugins/theme/status/load.sh
Normal file
15
config-files/.config/tmux/plugins/theme/status/load.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
show_load() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "load"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_batch_option "@catppuccin_load_icon" "")"
|
||||
color="$(get_tmux_batch_option "@catppuccin_load_color" "$thm_blue")"
|
||||
text="$(get_tmux_batch_option "@catppuccin_load_text" "#{load_full}")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# Requires https://github.com/olimorris/tmux-pomodoro-plus
|
||||
|
||||
show_pomodoro_plus() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "pomodoro_plus"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon="$( get_tmux_batch_option "@catppuccin_pomodoro_plus_icon" "" )"
|
||||
color="$( get_tmux_batch_option "@catppuccin_pomodoro_plus_color" "$thm_orange" )"
|
||||
text="$( get_tmux_batch_option "@catppuccin_pomodoro_plus_text" "#{pomodoro_status}" )"
|
||||
|
||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
15
config-files/.config/tmux/plugins/theme/status/session.sh
Normal file
15
config-files/.config/tmux/plugins/theme/status/session.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
show_session() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "session"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_batch_option "@catppuccin_session_icon" "")
|
||||
color=$(get_tmux_batch_option "@catppuccin_session_color" "#{?client_prefix,$thm_red,$thm_green}")
|
||||
text=$(get_tmux_batch_option "@catppuccin_session_text" "#S")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
15
config-files/.config/tmux/plugins/theme/status/uptime.sh
Normal file
15
config-files/.config/tmux/plugins/theme/status/uptime.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
show_uptime() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "uptime"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_batch_option "@catppuccin_uptime_icon" "")"
|
||||
color="$(get_tmux_batch_option "@catppuccin_uptime_color" "$thm_green")"
|
||||
text="$(get_tmux_batch_option "@catppuccin_uptime_text" "#(uptime | sed 's/^[^,]*up *//; s/, *[[:digit:]]* user.*//; s/ day.*, */d /; s/:/h /; s/ min//; s/$/m/')")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
15
config-files/.config/tmux/plugins/theme/status/user.sh
Normal file
15
config-files/.config/tmux/plugins/theme/status/user.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
show_user() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "user"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_batch_option "@catppuccin_user_icon" "")
|
||||
color=$(get_tmux_batch_option "@catppuccin_user_color" "$thm_cyan")
|
||||
text=$(get_tmux_batch_option "@catppuccin_user_text" "#(whoami)")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
17
config-files/.config/tmux/plugins/theme/status/weather.sh
Normal file
17
config-files/.config/tmux/plugins/theme/status/weather.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
# Requires https://github.com/xamut/tmux-weather.
|
||||
|
||||
show_weather() {
|
||||
local index icon color text module
|
||||
|
||||
tmux_batch_setup_status_module "weather"
|
||||
run_tmux_batch_commands
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_batch_option "@catppuccin_weather_icon" "")"
|
||||
color="$(get_tmux_batch_option "@catppuccin_weather_color" "$thm_yellow")"
|
||||
text="$(get_tmux_batch_option "@catppuccin_weather_text" "#{weather}")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
Reference in New Issue
Block a user