gpakosz / .tmux

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
MIT License
22.14k stars 3.37k forks source link

Changing the battery bar color #768

Closed RainSharky closed 1 week ago

RainSharky commented 1 week ago

I tried to change the color of the battery bar segments to match my overall color scheme, however I had no luck.

My .tmux.conf.local file (HEX Color Codes changed)

# battery bar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_full_fg,colour_empty_fg,colour_bg"
tmux_conf_battery_bar_palette="gradient"
#tmux_conf_battery_bar_palette="#903F41,#e4e4e4,#000000"   # red, white, black

# battery hbar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_low,colour_half,colour_full"
tmux_conf_battery_hbar_palette="gradient"
#tmux_conf_battery_hbar_palette="#903F41,#E0914D,#90b088"  # red, orange, green

# battery vbar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_low,colour_half,colour_full"
tmux_conf_battery_vbar_palette="gradient"
#tmux_conf_battery_vbar_palette="#903F41,#E0914D,#90b088"  # red, orange, green

I tried different variations of setting comments and uncommenting with no success.

image

Am I searching at the wrong place? Help would be appreciated :^) Thanks!

gpakosz commented 1 week ago

Hello @RainSharky,

Please make sure you

tmux_conf_battery_bar_palette="#903f41,#e4e4e4,#000000"

There's currently no way to express a custom linear gradient with multiple steps though

RainSharky commented 1 week ago
# battery bar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_full_fg,colour_empty_fg,colour_bg"
tmux_conf_battery_bar_palette="gradient"
tmux_conf_battery_bar_palette="#903f41,#e4e4e4,#000000"   # red, white, black

image

This seems to work. Thanks!

The other two palettes #tmux_conf_battery_hbar_palette="#903f41,#e0914d,#90b088" # red, orange, green and #tmux_conf_battery_vbar_palette="#903f41,#e0914d,#90b088" # red, orange, green

Dont have any effect tho. Is that how its suppose to work?

gpakosz commented 1 week ago

They don't have effect because they start with # which is the character used to comment in a tmux configuration file

RainSharky commented 1 week ago

I know that, but if I uncomment them, they still dont work. The colors do not get changed.

Only uncommenting

tmux_conf_battery_bar_palette="#903f41,#e4e4e4,#000000" # red, white, black

works. Sorry for the misunderstanding.

gpakosz commented 1 week ago

The last line that's not commented wins

bar, hbar and vbar are different kind of bars

RainSharky commented 1 week ago

Maybe this makes it more clear

# battery bar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_full_fg,colour_empty_fg,colour_bg"
#tmux_conf_battery_bar_palette="gradient"
#tmux_conf_battery_bar_palette="#903f41,#e4e4e4,#1c1c1c"   # red, white, black

# battery hbar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_low,colour_half,colour_full"
tmux_conf_battery_hbar_palette="gradient"
tmux_conf_battery_hbar_palette="#903f41,#e0914d,#90b088"  # red, orange, green

# battery vbar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_low,colour_half,colour_full"
#tmux_conf_battery_vbar_palette="gradient"
#tmux_conf_battery_vbar_palette="#903f41,#e0914d,#90b088"  # red, orange, green

Outcome

image

# battery bar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_full_fg,colour_empty_fg,colour_bg"
#tmux_conf_battery_bar_palette="gradient"
#tmux_conf_battery_bar_palette="#903f41,#e4e4e4,#1c1c1c"   # red, white, black

# battery hbar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_low,colour_half,colour_full"
#tmux_conf_battery_hbar_palette="gradient"
#tmux_conf_battery_hbar_palette="#903f41,#e0914d,#90b088"  # red, orange, green

# battery vbar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_low,colour_half,colour_full"
tmux_conf_battery_vbar_palette="gradient"
tmux_conf_battery_vbar_palette="#903f41,#e0914d,#90b088"  # red, orange, green

Outcome

image

# battery bar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_full_fg,colour_empty_fg,colour_bg"
tmux_conf_battery_bar_palette="gradient"
tmux_conf_battery_bar_palette="#903f41,#e4e4e4,#1c1c1c"   # red, white, black

# battery hbar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_low,colour_half,colour_full"
#tmux_conf_battery_hbar_palette="gradient"
#tmux_conf_battery_hbar_palette="#903f41,#e0914d,#90b088"  # red, orange, green

# battery vbar palette, possible values are:
#   - gradient (default)
#   - heat
#   - "colour_low,colour_half,colour_full"
#tmux_conf_battery_vbar_palette="gradient"
#tmux_conf_battery_vbar_palette="#903f41,#e0914d,#90b088"  # red, orange, green

Outcome

image

gpakosz commented 1 week ago

tmux_conf_battery_hbar_palette and tmux_conf_battery_vbar_palette apply to the #{battery_hbar} or #{battery_vbar} variables that you can use in tmux_conf_theme_status_left or tmux_conf_theme_status_right.

The default bar used in tmux_conf_theme_status_right is #{battery_bar} which is affected by tmux_conf_battery_bar_palette

RainSharky commented 1 week ago

Thats the information I was missing, thank you!