KevinSilvester / wezterm-config

My WezTerm Config
MIT License
442 stars 128 forks source link

Opacity resets when changing background image. #34

Closed ngomkhang134 closed 2 weeks ago

ngomkhang134 commented 2 weeks ago

https://github.com/user-attachments/assets/ee10b564-e664-41ce-b45c-9b1869d9afdf

KevinSilvester commented 2 weeks ago

Hey @ngomkhang134, the problem you're experiencing is because the BackDrops util overwrites the currently active background option every time you cycle or randomly select the images.

For a custom opacity to be applied, you'll have to set the layer opacity in two places:

  1. config/appearance.lua
  2. utils/backdrops.lua

It might also be worth noting that I've added a create_opts function to the BackDrops util that takes care setting up the initial options. You can update to the latest version by copying and pasting utils/backdrops.lua and updating config/appearance.lua to something like this.

https://github.com/KevinSilvester/wezterm-config/blob/653ec67ff599cdea13fc046dd425eb33f5c7d2c3/config/appearance.lua#L21-L24

This way you'll only have to change the background options in one place https://github.com/KevinSilvester/wezterm-config/blob/653ec67ff599cdea13fc046dd425eb33f5c7d2c3/utils/backdrops.lua#L56-L73

ngomkhang134 commented 2 weeks ago

IT WORKSSSS , THANKS ALOT

ngomkhang134 commented 2 weeks ago

btw , how can i increase/decrease the opacity by pressing a key without changing the config