wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.58k stars 742 forks source link

MacOS fullscreen overide opacity #4925

Open devashishRaj opened 7 months ago

devashishRaj commented 7 months ago

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20240128-202157-1e552d76

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

On switching to fullscreen mode the terminal colorscheme override opacity Fullscreen mode

Screenshot 2024-02-01 at 3 17 54 PM

maximum mode

Screenshot 2024-02-01 at 3 17 43 PM

To Reproduce

No response

Configuration

-- Pull in the wezterm API

local wezterm = require 'wezterm'
local mux = wezterm.mux
local act = wezterm.action
wezterm.on('gui-startup', function()
    local tab, pane, window = mux.spawn_window({})
    window:gui_window():maximize()
end)
-- This table will hold the configuration.
local config = {}

-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages

if wezterm.config_builder then
    config = wezterm.config_builder()
end

-- This is where you actually apply your config choices

config.disable_default_key_bindings = true

config.keys = {
    -- This will create a new split and run your default program inside it
    { key = 'F9', mods = 'OPT', action = wezterm.action.ShowTabNavigator },
    {
        key = 'r',
        mods = 'CMD|SHIFT',
        action = wezterm.action.ReloadConfiguration,
    },
    {
        key = 'c',
        mods = 'CMD',
        action = wezterm.action.CopyTo 'ClipboardAndPrimarySelection',
    },
    { key = 'v',  mods = 'CMD', action = act.PasteFrom 'Clipboard' },
    {
        key = 'd',
        mods = 'CMD',
        action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
    },
    {
        key = 'f',
        mods = 'CMD',
        action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' },
    },

    { key = 'q', mods = 'CMD',        action = wezterm.action.QuitApplication },
    { key = '[', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(1) },
    { key = ']', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(-1) },
    {
        key = 'h',
        mods = 'CTRL|SHIFT',
        action = act.ActivatePaneDirection 'Left',
    },
    {
        key = 'l',
        mods = 'CTRL|SHIFT',
        action = act.ActivatePaneDirection 'Right',
    },
    {
        key = 'k',
        mods = 'CTRL|SHIFT',
        action = act.ActivatePaneDirection 'Up',
    },
    {
        key = 'j',
        mods = 'CTRL|SHIFT',
        action = act.ActivatePaneDirection 'Down',
    },
    { key = 'x', mods = 'CMD', action = act.CloseCurrentPane { confirm = false } },
    -- Create a new tab in the same domain as the current pane.
    -- This is usually what you want.
    {
        key = 't',
        mods = 'CMD',
        action = act.SpawnTab 'CurrentPaneDomain',
    },
    { key = 'w', mods = 'CMD', action = act.CloseCurrentTab { confirm = false } },
    -- Create a tab in a named domain
    {
        key = 't',
        mods = 'SHIFT|ALT',
        action = act.SpawnTab {
            DomainName = 'unix',
        },
    },
}
config.native_macos_fullscreen_mode = false
--config.use_fancy_tab_bar = true
config.show_tabs_in_tab_bar = true
config.show_new_tab_button_in_tab_bar = true
config.font = wezterm.font 'MesloLGS NF'
config.font_size = 16.0
config.underline_thickness = "400%"
config.use_dead_keys = false
config.scrollback_lines = 999
config.color_scheme = 'Solarized Darcula'
config.macos_window_background_blur = 20
config.window_background_opacity = 0.3
config.text_background_opacity = 0.5

-- For example, changing the color scheme:
-- eg : config.color_scheme = 'AdventureTime'
-- and finally, return the configuration to wezterm
return config

Expected Behavior

No response

Logs

No response

Anything else?

No response

wez commented 7 months ago

Running wezterm -n --config 'window_background_opacity = 0.3' --config 'macos_window_background_blur = 20' and then using the https://wezfurlong.org/wezterm/config/lua/keyassignment/ToggleFullScreen.html assignment (default is Alt-Enter) works just fine for me with the default non-native fullscreen mode.

However, if you click the green macos native full screen mode "traffic light" button on the title bar, macos will use native full screen mode, which will counteract the transparency effect. I don't think I have any control over that, so the resolution is: don't do that!