mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 23:49:56 +00:00
Add tmux package and common dotfiles deployment
This commit is contained in:
12
dotfiles/common/.tmux/plugins/tmux/status/application.sh
Normal file
12
dotfiles/common/.tmux/plugins/tmux/status/application.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
show_application() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_option "@catppuccin_application_icon" "")
|
||||
color=$(get_tmux_option "@catppuccin_application_color" "$thm_pink")
|
||||
text=$(get_tmux_option "@catppuccin_application_text" "#{pane_current_command}")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
26
dotfiles/common/.tmux/plugins/tmux/status/battery.sh
Normal file
26
dotfiles/common/.tmux/plugins/tmux/status/battery.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
show_battery() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_option "@catppuccin_battery_icon" "#{battery_icon}")
|
||||
color=$(get_tmux_option "@catppuccin_battery_color" "$thm_yellow")
|
||||
text=$(get_tmux_option "@catppuccin_battery_text" "#{battery_percentage}")
|
||||
|
||||
tmux set-option -g @batt_icon_charge_tier8 ''
|
||||
tmux set-option -g @batt_icon_charge_tier7 ''
|
||||
tmux set-option -g @batt_icon_charge_tier6 ''
|
||||
tmux set-option -g @batt_icon_charge_tier5 ''
|
||||
tmux set-option -g @batt_icon_charge_tier4 ''
|
||||
tmux set-option -g @batt_icon_charge_tier3 ''
|
||||
tmux set-option -g @batt_icon_charge_tier2 ''
|
||||
tmux set-option -g @batt_icon_charge_tier1 ''
|
||||
tmux set-option -g @batt_icon_status_charged ''
|
||||
tmux set-option -g @batt_icon_status_charging ''
|
||||
tmux set-option -g @batt_icon_status_discharging ''
|
||||
tmux set-option -g @batt_icon_status_unknown ''
|
||||
tmux set-option -g @batt_icon_status_attached ""
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
13
dotfiles/common/.tmux/plugins/tmux/status/clima.sh
Normal file
13
dotfiles/common/.tmux/plugins/tmux/status/clima.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
# Requires https://github.com/vascomfnunes/tmux-clima
|
||||
show_clima() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_option "@catppuccin_clima_icon" "")"
|
||||
color="$(get_tmux_option "@catppuccin_clima_color" "$thm_yellow")"
|
||||
text="$(get_tmux_option "@catppuccin_clima_text" "#{clima}")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
16
dotfiles/common/.tmux/plugins/tmux/status/cpu.sh
Normal file
16
dotfiles/common/.tmux/plugins/tmux/status/cpu.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
show_cpu() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_option "@catppuccin_cpu_icon" "")
|
||||
color="$(get_tmux_option "@catppuccin_cpu_color" "#{cpu_bg_color}")"
|
||||
text="$(get_tmux_option "@catppuccin_cpu_text" "#{cpu_percentage}")"
|
||||
|
||||
tmux set-option -g @cpu_low_bg_color "$thm_yellow" # background color when cpu is low
|
||||
tmux set-option -g @cpu_medium_bg_color "$thm_orange" # background color when cpu is medium
|
||||
tmux set-option -g @cpu_high_bg_color "$thm_red" # background color when cpu is high
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
12
dotfiles/common/.tmux/plugins/tmux/status/date_time.sh
Normal file
12
dotfiles/common/.tmux/plugins/tmux/status/date_time.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
show_date_time() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_option "@catppuccin_date_time_icon" "")"
|
||||
color="$(get_tmux_option "@catppuccin_date_time_color" "$thm_blue")"
|
||||
text="$(get_tmux_option "@catppuccin_date_time_text" "%Y-%m-%d %H:%M")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
12
dotfiles/common/.tmux/plugins/tmux/status/directory.sh
Normal file
12
dotfiles/common/.tmux/plugins/tmux/status/directory.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
show_directory() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_option "@catppuccin_directory_icon" "")
|
||||
color=$(get_tmux_option "@catppuccin_directory_color" "$thm_pink")
|
||||
text=$(get_tmux_option "@catppuccin_directory_text" "#{b:pane_current_path}")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
14
dotfiles/common/.tmux/plugins/tmux/status/gitmux.sh
Normal file
14
dotfiles/common/.tmux/plugins/tmux/status/gitmux.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
# Requires https://github.com/arl/gitmux
|
||||
|
||||
show_gitmux() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_option "@catppuccin_gitmux_icon" "")"
|
||||
color="$(get_tmux_option "@catppuccin_gitmux_color" "$thm_green")"
|
||||
text="$(get_tmux_option "@catppuccin_gitmux_text" "#(gitmux \"#{pane_current_path}\")")"
|
||||
|
||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
12
dotfiles/common/.tmux/plugins/tmux/status/host.sh
Normal file
12
dotfiles/common/.tmux/plugins/tmux/status/host.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
show_host() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_option "@catppuccin_host_icon" "")
|
||||
color=$(get_tmux_option "@catppuccin_host_color" "$thm_magenta")
|
||||
text=$(get_tmux_option "@catppuccin_host_text" "#H")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
17
dotfiles/common/.tmux/plugins/tmux/status/kube.sh
Normal file
17
dotfiles/common/.tmux/plugins/tmux/status/kube.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
# Requires https://github.com/jonmosco/kube-tmux
|
||||
|
||||
show_kube() {
|
||||
local index icon color text context_color namespace_color symbol_enabled module
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_option "@catppuccin_kube_icon" "")
|
||||
color=$(get_tmux_option "@catppuccin_kube_color" "$thm_blue")
|
||||
context_color=$(get_tmux_option "@catppuccin_kube_context_color" "#{thm_red}")
|
||||
namespace_color=$(get_tmux_option "@catppuccin_kube_namespace_color" "#{thm_cyan}")
|
||||
symbol_enabled=${KUBE_TMUX_SYMBOL_ENABLE:-false}
|
||||
text=$(get_tmux_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"
|
||||
}
|
||||
12
dotfiles/common/.tmux/plugins/tmux/status/load.sh
Normal file
12
dotfiles/common/.tmux/plugins/tmux/status/load.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
show_load() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_option "@catppuccin_load_icon" "")"
|
||||
color="$(get_tmux_option "@catppuccin_load_color" "$thm_blue")"
|
||||
text="$(get_tmux_option "@catppuccin_load_text" "#{load_full}")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
14
dotfiles/common/.tmux/plugins/tmux/status/pomodoro_plus.sh
Normal file
14
dotfiles/common/.tmux/plugins/tmux/status/pomodoro_plus.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
# Requires https://github.com/olimorris/tmux-pomodoro-plus
|
||||
|
||||
show_pomodoro_plus() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon="$( get_tmux_option "@catppuccin_pomodoro_plus_icon" "" )"
|
||||
color="$( get_tmux_option "@catppuccin_pomodoro_plus_color" "$thm_orange" )"
|
||||
text="$( get_tmux_option "@catppuccin_pomodoro_plus_text" "#{pomodoro_status}" )"
|
||||
|
||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
12
dotfiles/common/.tmux/plugins/tmux/status/session.sh
Normal file
12
dotfiles/common/.tmux/plugins/tmux/status/session.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
show_session() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_option "@catppuccin_session_icon" "")
|
||||
color=$(get_tmux_option "@catppuccin_session_color" "#{?client_prefix,$thm_red,$thm_green}")
|
||||
text=$(get_tmux_option "@catppuccin_session_text" "#S")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
12
dotfiles/common/.tmux/plugins/tmux/status/uptime.sh
Normal file
12
dotfiles/common/.tmux/plugins/tmux/status/uptime.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
show_uptime() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_option "@catppuccin_uptime_icon" "")"
|
||||
color="$(get_tmux_option "@catppuccin_uptime_color" "$thm_green")"
|
||||
text="$(get_tmux_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"
|
||||
}
|
||||
12
dotfiles/common/.tmux/plugins/tmux/status/user.sh
Normal file
12
dotfiles/common/.tmux/plugins/tmux/status/user.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
show_user() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon=$(get_tmux_option "@catppuccin_user_icon" "")
|
||||
color=$(get_tmux_option "@catppuccin_user_color" "$thm_cyan")
|
||||
text=$(get_tmux_option "@catppuccin_user_text" "#(whoami)")
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
14
dotfiles/common/.tmux/plugins/tmux/status/weather.sh
Normal file
14
dotfiles/common/.tmux/plugins/tmux/status/weather.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
# Requires https://github.com/xamut/tmux-weather.
|
||||
|
||||
show_weather() {
|
||||
local index icon color text module
|
||||
|
||||
index=$1
|
||||
icon="$(get_tmux_option "@catppuccin_weather_icon" "")"
|
||||
color="$(get_tmux_option "@catppuccin_weather_color" "$thm_yellow")"
|
||||
text="$(get_tmux_option "@catppuccin_weather_text" "#{weather}")"
|
||||
|
||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
Reference in New Issue
Block a user