chore: replace all dracula occurrences with kanagawa
This commit is contained in:
parent
c2b1d67cbd
commit
a5bee81d7a
24 changed files with 213 additions and 205 deletions
|
@ -3,9 +3,9 @@
|
|||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
# configuration
|
||||
# @dracula-clients-minimum 1
|
||||
# @dracula-clients-singular client
|
||||
# @dracula-clients-plural clients
|
||||
# @kanagawa-clients-minimum 1
|
||||
# @kanagawa-clients-singular client
|
||||
# @kanagawa-clients-plural clients
|
||||
|
||||
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source $current_dir/utils.sh
|
||||
|
@ -17,14 +17,14 @@ count_clients() {
|
|||
|
||||
main() {
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
clients_count=$(count_clients)
|
||||
clients_minimum=$(get_tmux_option "@dracula-clients-minimum" 1)
|
||||
clients_minimum=$(get_tmux_option "@kanagawa-clients-minimum" 1)
|
||||
if (( $clients_count >= $clients_minimum )); then
|
||||
if (( $clients_count > 1 )); then
|
||||
clients_label=$(get_tmux_option "@dracula-clients-plural" "clients")
|
||||
clients_label=$(get_tmux_option "@kanagawa-clients-plural" "clients")
|
||||
else
|
||||
clients_label=$(get_tmux_option "@dracula-clients-singular" "client")
|
||||
clients_label=$(get_tmux_option "@kanagawa-clients-singular" "client")
|
||||
fi
|
||||
echo "$clients_count $clients_label"
|
||||
fi
|
||||
|
|
|
@ -111,7 +111,7 @@ battery_status()
|
|||
|
||||
main()
|
||||
{
|
||||
bat_label=$(get_tmux_option "@dracula-battery-label" "♥")
|
||||
bat_label=$(get_tmux_option "@kanagawa-battery-label" "♥")
|
||||
bat_stat=$(battery_status)
|
||||
bat_perc=$(battery_percent)
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
# configuration
|
||||
# @dracula-continuum-mode default (countdown|time|alert|interval)
|
||||
# @dracula-continuum-time-threshold 15
|
||||
# @kanagawa-continuum-mode default (countdown|time|alert|interval)
|
||||
# @kanagawa-continuum-time-threshold 15
|
||||
|
||||
alert_mode="@dracula-continuum-mode"
|
||||
time_threshold="@dracula-continuum-time-threshold"
|
||||
alert_mode="@kanagawa-continuum-mode"
|
||||
time_threshold="@kanagawa-continuum-time-threshold"
|
||||
warn_threshold=360
|
||||
first_save="@dracula-continuum-first-save"
|
||||
first_save="@kanagawa-continuum-first-save"
|
||||
|
||||
# tmux-resurrect and tmux-continuum options
|
||||
if [ -d "$HOME/.tmux/resurrect" ]; then
|
||||
|
|
|
@ -50,9 +50,9 @@ get_load() {
|
|||
|
||||
main() {
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
cpu_load=$(get_tmux_option "@dracula-cpu-display-load" false)
|
||||
cpu_label=$(get_tmux_option "@dracula-cpu-usage-label" "CPU")
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
cpu_load=$(get_tmux_option "@kanagawa-cpu-display-load" false)
|
||||
cpu_label=$(get_tmux_option "@kanagawa-cpu-usage-label" "CPU")
|
||||
if [ "$cpu_load" = true ]; then
|
||||
echo "$cpu_label $(get_load)"
|
||||
else
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $current_dir/utils.sh
|
||||
|
||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@dracula-fossil-disable-status" "false")
|
||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@dracula-fossil-show-current-symbol" "✓")
|
||||
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@dracula-fossil-show-diff-symbol" "!")
|
||||
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@dracula-fossil-no-repo-message" "")
|
||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@dracula-fossil-no-untracked-files" "false")
|
||||
IFS=' ' read -r -a show_remote_status <<< $(get_tmux_option "@dracula-fossil-show-remote-status" "false")
|
||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@kanagawa-fossil-disable-status" "false")
|
||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@kanagawa-fossil-show-current-symbol" "✓")
|
||||
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@kanagawa-fossil-show-diff-symbol" "!")
|
||||
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@kanagawa-fossil-no-repo-message" "")
|
||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@kanagawa-fossil-no-untracked-files" "false")
|
||||
IFS=' ' read -r -a show_remote_status <<< $(get_tmux_option "@kanagawa-fossil-show-remote-status" "false")
|
||||
|
||||
# Get added, modified, updated and deleted files from git status
|
||||
getChanges()
|
||||
|
@ -48,7 +48,7 @@ for i in $(cd $path; fossil changes --differ|cut -f1 -d' ')
|
|||
}
|
||||
|
||||
|
||||
# getting the #{pane_current_path} from dracula.sh is no longer possible
|
||||
# getting the #{pane_current_path} from kanagawa.sh is no longer possible
|
||||
getPaneDir()
|
||||
{
|
||||
nextone="false"
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $current_dir/utils.sh
|
||||
|
||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@dracula-git-disable-status" "false")
|
||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@dracula-git-show-current-symbol" "✓")
|
||||
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@dracula-git-show-diff-symbol" "!")
|
||||
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@dracula-git-no-repo-message" "")
|
||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@dracula-git-no-untracked-files" "false")
|
||||
IFS=' ' read -r -a show_remote_status <<< $(get_tmux_option "@dracula-git-show-remote-status" "false")
|
||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@kanagawa-git-disable-status" "false")
|
||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@kanagawa-git-show-current-symbol" "✓")
|
||||
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@kanagawa-git-show-diff-symbol" "!")
|
||||
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@kanagawa-git-no-repo-message" "")
|
||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@kanagawa-git-no-untracked-files" "false")
|
||||
IFS=' ' read -r -a show_remote_status <<< $(get_tmux_option "@kanagawa-git-show-remote-status" "false")
|
||||
|
||||
# Get added, modified, updated and deleted files from git status
|
||||
getChanges()
|
||||
|
@ -48,7 +48,7 @@ for i in $(git -C $path --no-optional-locks status -s)
|
|||
}
|
||||
|
||||
|
||||
# getting the #{pane_current_path} from dracula.sh is no longer possible
|
||||
# getting the #{pane_current_path} from kanagawa.sh is no longer possible
|
||||
getPaneDir()
|
||||
{
|
||||
nextone="false"
|
||||
|
|
|
@ -38,8 +38,8 @@ get_gpu()
|
|||
main()
|
||||
{
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
gpu_label=$(get_tmux_option "@dracula-gpu-usage-label" "GPU")
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
gpu_label=$(get_tmux_option "@kanagawa-gpu-usage-label" "GPU")
|
||||
gpu_usage=$(get_gpu)
|
||||
echo "$gpu_label $gpu_usage"
|
||||
sleep $RATE
|
||||
|
|
|
@ -37,8 +37,8 @@ get_gpu()
|
|||
main()
|
||||
{
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
gpu_label=$(get_tmux_option "@dracula-gpu-usage-label" "VRAM")
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
gpu_label=$(get_tmux_option "@kanagawa-gpu-usage-label" "VRAM")
|
||||
gpu_usage=$(get_gpu)
|
||||
echo "$gpu_label $gpu_usage"
|
||||
sleep $RATE
|
||||
|
|
|
@ -37,8 +37,8 @@ get_gpu()
|
|||
main()
|
||||
{
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
gpu_label=$(get_tmux_option "@dracula-gpu-usage-label" "GPU")
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
gpu_label=$(get_tmux_option "@kanagawa-gpu-usage-label" "GPU")
|
||||
gpu_usage=$(get_gpu)
|
||||
echo "$gpu_label $gpu_usage"
|
||||
sleep $RATE
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $current_dir/utils.sh
|
||||
|
||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@dracula-hg-disable-status" "false")
|
||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@dracula-hg-show-current-symbol" "✓")
|
||||
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@dracula-hg-show-diff-symbol" "!")
|
||||
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@dracula-hg-no-repo-message" "")
|
||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@dracula-hg-no-untracked-files" "false")
|
||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@kanagawa-hg-disable-status" "false")
|
||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@kanagawa-hg-show-current-symbol" "✓")
|
||||
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@kanagawa-hg-show-diff-symbol" "!")
|
||||
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@kanagawa-hg-no-repo-message" "")
|
||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@kanagawa-hg-no-untracked-files" "false")
|
||||
|
||||
# Get added, modified, and removed files from hg status
|
||||
getChanges()
|
||||
|
@ -51,7 +51,7 @@ for i in $(hg -R $path status -admru)
|
|||
}
|
||||
|
||||
|
||||
# getting the #{pane_current_path} from dracula.sh is no longer possible
|
||||
# getting the #{pane_current_path} from kanagawa.sh is no longer possible
|
||||
getPaneDir()
|
||||
{
|
||||
nextone="false"
|
||||
|
|
|
@ -2,38 +2,11 @@
|
|||
# setting the locale, some users have issues with different locales, this forces the correct one
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source $current_dir/utils.sh
|
||||
|
||||
main()
|
||||
{
|
||||
main() {
|
||||
# set configuration option variables
|
||||
show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "")
|
||||
eks_hide_arn=$(get_tmux_option "@dracula-kubernetes-eks-hide-arn" false)
|
||||
eks_extract_account=$(get_tmux_option "@dracula-kubernetes-eks-extract-account" false)
|
||||
hide_kubernetes_user=$(get_tmux_option "@dracula-kubernetes-hide-user" false)
|
||||
terraform_label=$(get_tmux_option "@dracula-terraform-label" "")
|
||||
show_fahrenheit=$(get_tmux_option "@dracula-show-fahrenheit" true)
|
||||
show_location=$(get_tmux_option "@dracula-show-location" true)
|
||||
fixed_location=$(get_tmux_option "@dracula-fixed-location")
|
||||
show_powerline=$(get_tmux_option "@dracula-show-powerline" false)
|
||||
show_flags=$(get_tmux_option "@dracula-show-flags" false)
|
||||
show_left_icon=$(get_tmux_option "@dracula-show-left-icon" smiley)
|
||||
show_left_icon_padding=$(get_tmux_option "@dracula-left-icon-padding" 1)
|
||||
show_military=$(get_tmux_option "@dracula-military-time" false)
|
||||
timezone=$(get_tmux_option "@dracula-set-timezone" "")
|
||||
show_timezone=$(get_tmux_option "@dracula-show-timezone" true)
|
||||
show_left_sep=$(get_tmux_option "@dracula-show-left-sep" )
|
||||
show_right_sep=$(get_tmux_option "@dracula-show-right-sep" )
|
||||
show_border_contrast=$(get_tmux_option "@dracula-border-contrast" false)
|
||||
show_day_month=$(get_tmux_option "@dracula-day-month" false)
|
||||
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
show_synchronize_panes_label=$(get_tmux_option "@dracula-synchronize-panes-label" "Sync")
|
||||
time_format=$(get_tmux_option "@dracula-time-format" "")
|
||||
show_ssh_session_port=$(get_tmux_option "@dracula-show-ssh-session-port" false)
|
||||
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
|
||||
show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true)
|
||||
|
||||
# Dracula Color Pallette
|
||||
white='#f8f8f2'
|
||||
gray='#44475a'
|
||||
|
@ -46,21 +19,53 @@ main()
|
|||
red='#ff5555'
|
||||
pink='#ff79c6'
|
||||
yellow='#f1fa8c'
|
||||
show_kubernetes_context_label=$(get_tmux_option "@kanagawa-kubernetes-context-label" "")
|
||||
eks_hide_arn=$(get_tmux_option "@kanagawa-kubernetes-eks-hide-arn" false)
|
||||
eks_extract_account=$(get_tmux_option "@kanagawa-kubernetes-eks-extract-account" false)
|
||||
hide_kubernetes_user=$(get_tmux_option "@kanagawa-kubernetes-hide-user" false)
|
||||
terraform_label=$(get_tmux_option "@kanagawa-terraform-label" "")
|
||||
show_fahrenheit=$(get_tmux_option "@kanagawa-show-fahrenheit" true)
|
||||
show_location=$(get_tmux_option "@kanagawa-show-location" true)
|
||||
fixed_location=$(get_tmux_option "@kanagawa-fixed-location")
|
||||
show_powerline=$(get_tmux_option "@kanagawa-show-powerline" false)
|
||||
show_flags=$(get_tmux_option "@kanagawa-show-flags" false)
|
||||
show_left_icon=$(get_tmux_option "@kanagawa-show-left-icon" smiley)
|
||||
show_left_icon_padding=$(get_tmux_option "@kanagawa-left-icon-padding" 1)
|
||||
show_military=$(get_tmux_option "@kanagawa-military-time" false)
|
||||
timezone=$(get_tmux_option "@kanagawa-set-timezone" "")
|
||||
show_timezone=$(get_tmux_option "@kanagawa-show-timezone" true)
|
||||
show_left_sep=$(get_tmux_option "@kanagawa-show-left-sep" )
|
||||
show_right_sep=$(get_tmux_option "@kanagawa-show-right-sep" )
|
||||
show_border_contrast=$(get_tmux_option "@kanagawa-border-contrast" false)
|
||||
show_day_month=$(get_tmux_option "@kanagawa-day-month" false)
|
||||
show_refresh=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
show_synchronize_panes_label=$(get_tmux_option "@kanagawa-synchronize-panes-label" "Sync")
|
||||
time_format=$(get_tmux_option "@kanagawa-time-format" "")
|
||||
show_ssh_session_port=$(get_tmux_option "@kanagawa-show-ssh-session-port" false)
|
||||
IFS=' ' read -r -a plugins <<<$(get_tmux_option "@kanagawa-plugins" "battery network weather")
|
||||
show_empty_plugins=$(get_tmux_option "@kanagawa-show-empty-plugins" true)
|
||||
|
||||
|
||||
# Handle left icon configuration
|
||||
case $show_left_icon in
|
||||
smiley)
|
||||
left_icon="☺";;
|
||||
session)
|
||||
left_icon="#S";;
|
||||
window)
|
||||
left_icon="#W";;
|
||||
hostname)
|
||||
left_icon="#H";;
|
||||
shortname)
|
||||
left_icon="#h";;
|
||||
*)
|
||||
left_icon=$show_left_icon;;
|
||||
smiley)
|
||||
left_icon="☺"
|
||||
;;
|
||||
session)
|
||||
left_icon="#S"
|
||||
;;
|
||||
window)
|
||||
left_icon="#W"
|
||||
;;
|
||||
hostname)
|
||||
left_icon="#H"
|
||||
;;
|
||||
shortname)
|
||||
left_icon="#h"
|
||||
;;
|
||||
*)
|
||||
left_icon=$show_left_icon
|
||||
;;
|
||||
esac
|
||||
|
||||
# Handle left icon padding
|
||||
|
@ -79,20 +84,24 @@ main()
|
|||
# Set timezone unless hidden by configuration
|
||||
if [[ -z "$timezone" ]]; then
|
||||
case $show_timezone in
|
||||
false)
|
||||
timezone="";;
|
||||
true)
|
||||
timezone="#(date +%Z)";;
|
||||
false)
|
||||
timezone=""
|
||||
;;
|
||||
true)
|
||||
timezone="#(date +%Z)"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case $show_flags in
|
||||
false)
|
||||
flags=""
|
||||
current_flags="";;
|
||||
true)
|
||||
flags="#{?window_flags,#[fg=${dark_purple}]#{window_flags},}"
|
||||
current_flags="#{?window_flags,#[fg=${light_purple}]#{window_flags},}"
|
||||
false)
|
||||
flags=""
|
||||
current_flags=""
|
||||
;;
|
||||
true)
|
||||
flags="#{?window_flags,#[fg=${dark_purple}]#{window_flags},}"
|
||||
current_flags="#{?window_flags,#[fg=${light_purple}]#{window_flags},}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# sets refresh interval to every 5 seconds
|
||||
|
@ -136,10 +145,10 @@ main()
|
|||
|
||||
for plugin in "${plugins[@]}"; do
|
||||
|
||||
if case $plugin in custom:*) true;; *) false;; esac; then
|
||||
if case $plugin in custom:*) true ;; *) false ;; esac then
|
||||
script=${plugin#"custom:"}
|
||||
if [[ -x "${current_dir}/${script}" ]]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-custom-plugin-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-custom-plugin-colors" "cyan dark_gray")
|
||||
script="#($current_dir/${script})"
|
||||
else
|
||||
colors[0]="red"
|
||||
|
@ -148,80 +157,80 @@ main()
|
|||
fi
|
||||
|
||||
elif [ $plugin = "cwd" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-cwd-colors" "dark_gray white")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-cwd-colors" "dark_gray white")
|
||||
tmux set-option -g status-right-length 250
|
||||
script="#($current_dir/cwd.sh)"
|
||||
|
||||
elif [ $plugin = "fossil" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-fossil-colors" "green dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-fossil-colors" "green dark_gray")
|
||||
tmux set-option -g status-right-length 250
|
||||
script="#($current_dir/fossil.sh)"
|
||||
|
||||
elif [ $plugin = "git" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-git-colors" "green dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-git-colors" "green dark_gray")
|
||||
tmux set-option -g status-right-length 250
|
||||
script="#($current_dir/git.sh)"
|
||||
|
||||
elif [ $plugin = "hg" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-hg-colors" "green dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-hg-colors" "green dark_gray")
|
||||
tmux set-option -g status-right-length 250
|
||||
script="#($current_dir/hg.sh)"
|
||||
|
||||
elif [ $plugin = "battery" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-battery-colors" "pink dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-battery-colors" "pink dark_gray")
|
||||
script="#($current_dir/battery.sh)"
|
||||
|
||||
elif [ $plugin = "gpu-usage" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-gpu-usage-colors" "pink dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-gpu-usage-colors" "pink dark_gray")
|
||||
script="#($current_dir/gpu_usage.sh)"
|
||||
|
||||
elif [ $plugin = "gpu-ram-usage" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-gpu-ram-usage-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-gpu-ram-usage-colors" "cyan dark_gray")
|
||||
script="#($current_dir/gpu_ram_info.sh)"
|
||||
|
||||
elif [ $plugin = "gpu-power-draw" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-gpu-power-draw-colors" "green dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-gpu-power-draw-colors" "green dark_gray")
|
||||
script="#($current_dir/gpu_power.sh)"
|
||||
|
||||
elif [ $plugin = "cpu-usage" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-cpu-usage-colors" "orange dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-cpu-usage-colors" "orange dark_gray")
|
||||
script="#($current_dir/cpu_info.sh)"
|
||||
|
||||
elif [ $plugin = "ram-usage" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-ram-usage-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-ram-usage-colors" "cyan dark_gray")
|
||||
script="#($current_dir/ram_info.sh)"
|
||||
|
||||
elif [ $plugin = "tmux-ram-usage" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-tmux-ram-usage-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-tmux-ram-usage-colors" "cyan dark_gray")
|
||||
script="#($current_dir/tmux_ram_info.sh)"
|
||||
|
||||
elif [ $plugin = "network" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-network-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-network-colors" "cyan dark_gray")
|
||||
script="#($current_dir/network.sh)"
|
||||
|
||||
elif [ $plugin = "network-bandwidth" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-network-bandwidth-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-network-bandwidth-colors" "cyan dark_gray")
|
||||
tmux set-option -g status-right-length 250
|
||||
script="#($current_dir/network_bandwidth.sh)"
|
||||
|
||||
elif [ $plugin = "network-ping" ]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-network-ping-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-network-ping-colors" "cyan dark_gray")
|
||||
script="#($current_dir/network_ping.sh)"
|
||||
|
||||
elif [ $plugin = "network-vpn" ]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-network-vpn-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-network-vpn-colors" "cyan dark_gray")
|
||||
script="#($current_dir/network_vpn.sh)"
|
||||
|
||||
elif [ $plugin = "attached-clients" ]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-attached-clients-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-attached-clients-colors" "cyan dark_gray")
|
||||
script="#($current_dir/attached_clients.sh)"
|
||||
|
||||
elif [ $plugin = "mpc" ]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-mpc-colors" "green dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-mpc-colors" "green dark_gray")
|
||||
script="#($current_dir/mpc.sh)"
|
||||
|
||||
elif [ $plugin = "spotify-tui" ]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-spotify-tui-colors" "green dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-spotify-tui-colors" "green dark_gray")
|
||||
script="#($current_dir/spotify-tui.sh)"
|
||||
|
||||
elif [ $plugin = "playerctl" ]; then
|
||||
|
@ -229,27 +238,27 @@ main()
|
|||
script="#($current_dir/playerctl.sh)"
|
||||
|
||||
elif [ $plugin = "kubernetes-context" ]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-kubernetes-context-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-kubernetes-context-colors" "cyan dark_gray")
|
||||
script="#($current_dir/kubernetes_context.sh $eks_hide_arn $eks_extract_account $hide_kubernetes_user $show_kubernetes_context_label)"
|
||||
|
||||
elif [ $plugin = "terraform" ]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-terraform-colors" "light_purple dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-terraform-colors" "light_purple dark_gray")
|
||||
script="#($current_dir/terraform.sh $terraform_label)"
|
||||
|
||||
elif [ $plugin = "continuum" ]; then
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-continuum-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-continuum-colors" "cyan dark_gray")
|
||||
script="#($current_dir/continuum.sh)"
|
||||
|
||||
elif [ $plugin = "weather" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-weather-colors" "orange dark_gray")
|
||||
script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location '$fixed_location')"
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-weather-colors" "orange dark_gray")
|
||||
script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location $fixed_location)"
|
||||
|
||||
elif [ $plugin = "time" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-time-colors" "dark_purple white")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-time-colors" "dark_purple white")
|
||||
if [ -n "$time_format" ]; then
|
||||
script=${time_format}
|
||||
else
|
||||
if $show_day_month && $show_military ; then # military time and dd/mm
|
||||
if $show_day_month && $show_military; then # military time and dd/mm
|
||||
script="%a %d/%m %R ${timezone} "
|
||||
elif $show_military; then # only military time
|
||||
script="%a %m/%d %R ${timezone} "
|
||||
|
@ -260,11 +269,11 @@ main()
|
|||
fi
|
||||
fi
|
||||
elif [ $plugin = "synchronize-panes" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-synchronize-panes-colors" "cyan dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-synchronize-panes-colors" "cyan dark_gray")
|
||||
script="#($current_dir/synchronize_panes.sh $show_synchronize_panes_label)"
|
||||
|
||||
elif [ $plugin = "ssh-session" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-ssh-session-colors" "green dark_gray")
|
||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-ssh-session-colors" "green dark_gray")
|
||||
script="#($current_dir/ssh_session.sh $show_ssh_session_port)"
|
||||
|
||||
else
|
|
@ -32,7 +32,7 @@ fi
|
|||
main()
|
||||
{
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
OUTPUT_STRING=""
|
||||
if [ ! -z "$current_account_id" ]
|
||||
then
|
||||
|
|
|
@ -8,14 +8,14 @@ source $current_dir/utils.sh
|
|||
main()
|
||||
{
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
|
||||
if ! command -v mpc &> /dev/null
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FORMAT=$(get_tmux_option "@dracula-mpc-format" "%title% - %artist%")
|
||||
FORMAT=$(get_tmux_option "@kanagawa-mpc-format" "%title% - %artist%")
|
||||
mpc_playback=$(mpc current -f "${FORMAT}")
|
||||
echo ${mpc_playback}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ readonly SIZE=(
|
|||
|
||||
# interface_get try to automaticaly get the used interface if network_name is empty
|
||||
interface_get() {
|
||||
name="$(tmux show-option -gqv "@dracula-network-bandwidth")"
|
||||
name="$(tmux show-option -gqv "@kanagawa-network-bandwidth")"
|
||||
|
||||
if [[ -z $name ]]; then
|
||||
case "$(uname -s)" in
|
||||
|
@ -96,8 +96,8 @@ main() {
|
|||
bandwidth=()
|
||||
|
||||
network_name=""
|
||||
show_interface="$(tmux show-option -gqv "@dracula-network-bandwidth-show-interface")"
|
||||
interval_update="$(tmux show-option -gqv "@dracula-network-bandwidth-interval")"
|
||||
show_interface="$(tmux show-option -gqv "@kanagawa-network-bandwidth-show-interface")"
|
||||
interval_update="$(tmux show-option -gqv "@kanagawa-network-bandwidth-interval")"
|
||||
|
||||
if [[ -z $interval_update ]]; then
|
||||
interval_update=0
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
# configuration
|
||||
# @dracula-ping-server "example.com"
|
||||
# @dracula-ping-rate 5
|
||||
# @kanagawa-ping-server "example.com"
|
||||
# @kanagawa-ping-rate 5
|
||||
|
||||
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source $current_dir/utils.sh
|
||||
|
@ -13,7 +13,7 @@ ping_function() {
|
|||
case $(uname -s) in
|
||||
Linux | Darwin)
|
||||
# storing the hostname/IP in the variable PINGSERVER, default is google.com
|
||||
pingserver=$(get_tmux_option "@dracula-ping-server" "google.com")
|
||||
pingserver=$(get_tmux_option "@kanagawa-ping-server" "google.com")
|
||||
pingtime=$(ping -c 1 "$pingserver" | tail -1 | awk '{print $4}' | cut -d '/' -f 2)
|
||||
echo "$pingtime ms"
|
||||
;;
|
||||
|
@ -27,7 +27,7 @@ ping_function() {
|
|||
main() {
|
||||
|
||||
echo $(ping_function)
|
||||
RATE=$(get_tmux_option "@dracula-ping-rate" 5)
|
||||
RATE=$(get_tmux_option "@kanagawa-ping-rate" 5)
|
||||
sleep $RATE
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ $(vmstat -s | grep "pages zeroed$" | sed -ne 's/^ *\([0-9]*\).*$/\1/p') +
|
|||
|
||||
main()
|
||||
{
|
||||
ram_label=$(get_tmux_option "@dracula-ram-usage-label" "RAM")
|
||||
ram_label=$(get_tmux_option "@kanagawa-ram-usage-label" "RAM")
|
||||
ram_ratio=$(get_ratio)
|
||||
echo "$ram_label $ram_ratio"
|
||||
}
|
||||
|
|
|
@ -8,14 +8,14 @@ source $current_dir/utils.sh
|
|||
main()
|
||||
{
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
|
||||
if ! command -v spt &> /dev/null
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FORMAT=$(get_tmux_option "@dracula-spotify-tui-format" "%f %s %t - %a")
|
||||
FORMAT=$(get_tmux_option "@kanagawa-spotify-tui-format" "%f %s %t - %a")
|
||||
spotify_playback=$(spt playback -f "${FORMAT}")
|
||||
echo ${spotify_playback}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ get_synchronize_panes_status() {
|
|||
main()
|
||||
{
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
synchronize_panes_label=$label
|
||||
synchronize_panes_status=$(get_synchronize_panes_status)
|
||||
echo "$synchronize_panes_label $synchronize_panes_status"
|
||||
|
|
|
@ -9,7 +9,7 @@ source $current_dir/utils.sh
|
|||
|
||||
main() {
|
||||
# storing the refresh rate in the variable RATE, default is 5
|
||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||
OUTPUT_STRING="N/A"
|
||||
terraform_dir="$(tmux display-message -p '#{pane_current_path}')/.terraform"
|
||||
if [ -d $terraform_dir ]; then
|
||||
|
|
|
@ -111,7 +111,7 @@ get_tmux_ram_usage()
|
|||
|
||||
main()
|
||||
{
|
||||
ram_label=$(get_tmux_option "@dracula-tmux-ram-usage-label" "MEM")
|
||||
ram_label=$(get_tmux_option "@kanagawa-tmux-ram-usage-label" "MEM")
|
||||
ram_usage=$(get_tmux_ram_usage)
|
||||
echo "$ram_label $ram_usage"
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ fahrenheit=$1
|
|||
location=$2
|
||||
fixedlocation=$3
|
||||
|
||||
DATAFILE=/tmp/.dracula-tmux-data
|
||||
LAST_EXEC_FILE="/tmp/.dracula-tmux-weather-last-exec"
|
||||
DATAFILE=/tmp/.kanagawa-tmux-data
|
||||
LAST_EXEC_FILE="/tmp/.kanagawa-tmux-weather-last-exec"
|
||||
RUN_EACH=1200
|
||||
TIME_NOW=$(date +%s)
|
||||
TIME_LAST=$(cat "${LAST_EXEC_FILE}" 2>/dev/null || echo "0")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue