1
0
mirror of https://github.com/samoshkin/tmux-config.git synced 2026-01-03 00:08:01 +00:00

Update to newer version of plugin-sysstat. Change color variable names

This commit is contained in:
Alexey Samoshkin
2017-11-22 17:06:55 +02:00
parent e83c706816
commit 68de555ba3
2 changed files with 23 additions and 17 deletions

View File

@@ -68,6 +68,8 @@ bind -r M-> next-window -a # next window with alert
bind -r Tab last-window # cycle thru MRU tabs
bind W command-prompt -p "go to window #" "select-window -t ':%%'"
# TODO: fix pane resizing
# Link window
bind L command-prompt -p "Link window from (session:window): " "link-window -s %% -a"
@@ -180,9 +182,9 @@ color_session_text="$color_blue"
color_status_text="colour245"
color_main="$color_orange"
color_secondary="$color_purple"
color_level_good="$color_green"
color_level_ok="$color_green"
color_level_warn="$color_yellow"
color_lelel_achtung="$color_red"
color_level_stress="$color_red"
color_window_off_indicator="colour088"
color_window_off_status_bg="colour238"
color_window_off_status_current_bg="colour254"
@@ -227,7 +229,7 @@ set -g status-right-length 100
wg_session="#[fg=$color_session_text] #S #[default]"
wg_battery="#{battery_status_fg} #{battery_icon} #{battery_percentage}"
wg_date="#[fg=$color_secondary]%h %d %H:%M#[default]"
wg_user_host="💻 #[fg=$color_secondary]#(echo $USER)#[default]@#H"
wg_user_host="#[fg=$color_secondary]#(echo $USER)#[default]@#H"
wg_is_zoomed="#[fg=$color_dark,bg=$color_secondary]#{?window_zoomed_flag,[Z],}#[default]"
wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv \"key-table\") == \"off\" ] && echo \"[OFF]\")#[default]"
@@ -235,26 +237,31 @@ set -g status-left "$wg_session"
set -g status-right "#{prefix_highlight} $wg_is_keys_off $wg_is_zoomed #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | $wg_user_host | $wg_date $wg_battery #{online_status}"
# online and offline icon for tmux-online-status
set -g @online_icon "#[fg=$color_level_good]●#[default]"
set -g @offline_icon "#[fg=$color_level_achtung]●#[default]"
set -g @online_icon "#[fg=$color_level_ok]●#[default]"
set -g @offline_icon "#[fg=$color_level_stress]●#[default]"
# Configure view templates for tmux-plugin-sysstat "MEM" and "CPU" widget
set -g @sysstat_mem_size_unit "G"
set -g @sysstat_mem_view_tmpl '#[fg=#{mem.color}]MEM:#{mem.pused}#[default] #{mem.used}'
set -g @sysstat_cpu_view_tmpl '#[fg=#{cpu.color}]CPU:#{cpu.pused}#[default]'
set -g @sysstat_mem_view_tmpl 'MEM:#[fg=#{mem.color}]#{mem.pused}#[default] #{mem.used}'
# Configure colors for tmux-plugin-sysstat "MEM" and "CPU" widget
set -g @sysstat_cpu_color_low "$color_level_good"
set -g @sysstat_cpu_color_low "$color_level_ok"
set -g @sysstat_cpu_color_medium "$color_level_warn"
set -g @sysstat_cpu_color_high "$color_level_achtung"
set -g @sysstat_mem_color_ok "$color_level_good"
set -g @sysstat_mem_color_stress "$color_level_achtung"
set -g @sysstat_cpu_color_stress "$color_level_stress"
set -g @sysstat_mem_color_low "$color_level_ok"
set -g @sysstat_mem_color_medium "$color_level_warn"
set -g @sysstat_mem_color_stress "$color_level_stress"
set -g @sysstat_swap_color_low "$color_level_ok"
set -g @sysstat_swap_color_medium "$color_level_warn"
set -g @sysstat_swap_color_stress "$color_level_stress"
# Configure tmux-battery widget colors
set -g @batt_color_full_charge "#[fg=$color_level_good]"
set -g @batt_color_high_charge "#[fg=$color_level_good]"
set -g @batt_color_full_charge "#[fg=$color_level_ok]"
set -g @batt_color_high_charge "#[fg=$color_level_ok]"
set -g @batt_color_medium_charge "#[fg=$color_level_warn]"
set -g @batt_color_low_charge "#[fg=$color_level_achtung]"
set -g @batt_color_low_charge "#[fg=$color_level_stress]"
# Configure tmux-prefix-highlight colors
set -g @prefix_highlight_output_prefix '['
@@ -327,6 +334,5 @@ bind -T off F12 \
set -u window-status-current-format \;\
refresh-client -S
# Run all plugins' scripts
run '~/.tmux/plugins/tpm/tpm'