-
-
Notifications
You must be signed in to change notification settings - Fork 686
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: shellcheck-warnings for catppuccin.tmux Command used: `shellcheck catppuccin.tmux -ax -s bash` * shellcheck: fix all warnings Command used: `shellcheck -a catppuccin.tmux $(ls custom/*.sh pane/*.sh status/*.sh window/*.sh)` * shellcheck: update workflow to check warnings * shellcheck: include warnings from sourced files
- Loading branch information
Showing
22 changed files
with
193 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
shell=bash | ||
|
||
# TODO: Find a way to declare color variables | ||
disable=SC2154 | ||
|
||
external-sources=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
show_pane_default_format() { | ||
local number="#{pane_index}" | ||
local color="$(get_tmux_option "@catppuccin_pane_color" "$thm_green")" | ||
local background="$(get_tmux_option "@catppuccin_pane_background_color" "$thm_gray")" | ||
local text="$(get_tmux_option "@catppuccin_pane_default_text" "#{b:pane_current_path}")" | ||
local fill="$(get_tmux_option "@catppuccin_pane_default_fill" "number")" # number, all, none | ||
local active="#{pane_active}" | ||
local number color background text fill | ||
|
||
local default_pane_format=$( build_pane_format "$number" "$color" "$background" "$text" "$fill") | ||
number="#{pane_index}" | ||
color="$(get_tmux_option "@catppuccin_pane_color" "$thm_green")" | ||
background="$(get_tmux_option "@catppuccin_pane_background_color" "$thm_gray")" | ||
text="$(get_tmux_option "@catppuccin_pane_default_text" "#{b:pane_current_path}")" | ||
fill="$(get_tmux_option "@catppuccin_pane_default_fill" "number")" # number, all, none | ||
|
||
default_pane_format=$(build_pane_format "$number" "$color" "$background" "$text" "$fill") | ||
|
||
echo "$default_pane_format" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
show_application() { | ||
local index=$1 | ||
local icon=$(get_tmux_option "@catppuccin_application_icon" "") | ||
local color=$(get_tmux_option "@catppuccin_application_color" "$thm_pink") | ||
local text=$(get_tmux_option "@catppuccin_application_text" "#W") | ||
local index icon color text module | ||
|
||
local module=$( build_status_module "$index" "$icon" "$color" "$text" ) | ||
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" "#W") | ||
|
||
module=$(build_status_module "$index" "$icon" "$color" "$text") | ||
|
||
echo "$module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# Requires https://github.com/vascomfnunes/tmux-clima | ||
show_clima() { | ||
local index=$1 | ||
local icon="$(get_tmux_option "@catppuccin_clima_icon" "")" | ||
local color="$(get_tmux_option "@catppuccin_clima_color" "$thm_yellow")" | ||
local text="$(get_tmux_option "@catppuccin_clima_text" "#{clima}")" | ||
local index icon color text module | ||
|
||
local module=$( build_status_module "$index" "$icon" "$color" "$text" ) | ||
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
show_cpu() { | ||
tmux set-option -g @cpu_low_bg_color "$thm_yellow" # background color when cpu is low | ||
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 | ||
|
||
local index=$1 | ||
local icon=$(get_tmux_option "@catppuccin_cpu_icon" "") | ||
local color="$(get_tmux_option "@catppuccin_cpu_color" "#{cpu_bg_color}")" | ||
local text="$(get_tmux_option "@catppuccin_cpu_text" "#{cpu_percentage}")" | ||
|
||
local module=$( build_status_module "$index" "$icon" "$color" "$text" ) | ||
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
show_date_time() { | ||
local index=$1 | ||
local icon="$(get_tmux_option "@catppuccin_date_time_icon" "")" | ||
local color="$(get_tmux_option "@catppuccin_date_time_color" "$thm_blue")" | ||
local text="$(get_tmux_option "@catppuccin_date_time_text" "%Y-%m-%d %H:%M")" | ||
local index icon color text module | ||
|
||
local module=$( build_status_module "$index" "$icon" "$color" "$text" ) | ||
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" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
show_directory() { | ||
local index=$1 | ||
local icon=$(get_tmux_option "@catppuccin_directory_icon" "") | ||
local color=$(get_tmux_option "@catppuccin_directory_color" "$thm_pink") | ||
local text=$(get_tmux_option "@catppuccin_directory_text" "#{b:pane_current_path}") | ||
local index icon color text module | ||
|
||
local module=$( build_status_module "$index" "$icon" "$color" "$text" ) | ||
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
show_host() { | ||
local index=$1 | ||
local icon=$(get_tmux_option "@catppuccin_host_icon" "") | ||
local color=$(get_tmux_option "@catppuccin_host_color" "$thm_magenta") | ||
local text=$(get_tmux_option "@catppuccin_host_text" "#H") | ||
local index icon color text module | ||
|
||
local module=$( build_status_module "$index" "$icon" "$color" "$text" ) | ||
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" | ||
} |
Oops, something went wrong.