Transparent & glassy wezterm background
This commit is contained in:
parent
ca81c7b7ab
commit
0ae62847f2
@ -1,9 +1,12 @@
|
||||
local wezterm = require 'wezterm'
|
||||
local config = wezterm.config_builder()
|
||||
local opacity = 0.85
|
||||
|
||||
config.font = wezterm.font('Monaco Nerd Font Mono', { weight = 'Medium' })
|
||||
config.font_size = 12
|
||||
config.freetype_load_target = 'Normal'
|
||||
config.window_background_opacity = opacity
|
||||
config.macos_window_background_blur = 20
|
||||
|
||||
if wezterm.gui.get_appearance():find "Dark" then
|
||||
config.color_scheme = 'Catppuccin Mocha'
|
||||
@ -14,4 +17,18 @@ else
|
||||
config.color_scheme = 'Catppuccin Latte'
|
||||
end
|
||||
|
||||
wezterm.on('update-status', function(window)
|
||||
local overrides = window:get_config_overrides() or {}
|
||||
|
||||
if window:is_focused() then
|
||||
overrides.window_background_opacity = opacity
|
||||
else
|
||||
overrides.window_background_opacity = opacity / 1.25
|
||||
end
|
||||
|
||||
|
||||
|
||||
window:set_config_overrides(overrides)
|
||||
end)
|
||||
|
||||
return config
|
||||
|
Loading…
Reference in New Issue
Block a user