wez / wezterm

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

Cursor is not blinking when I'm on Nushell. #5795

Closed sachinsenal0x64 closed 4 months ago

sachinsenal0x64 commented 4 months ago

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

Linux X11

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

Qtile

WezTerm version

20240203-110809-5046fc22

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

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

The cursor is not blinking when I'm on Nushell. It works when I'm on Fish shell.

To Reproduce

No response

Configuration

local wezterm = require("wezterm")

local function font_with_fallback(name, params)
    local names = { name, "Apple Color Emoji", "azuki_font" }
    return wezterm.font_with_fallback(names, params)
end

local font_name = "JetBrainsMono NF"

local home = os.getenv("HOME")

local act = wezterm.action

wezterm.add_to_config_reload_watch_list(home .. "/.cache/wal/wezterm-wal.toml")

return {
    adjust_window_size_when_changing_font_size = false,

    -- Copy & Paste Right Click

    mouse_bindings = {
        {
            event = { Down = { streak = 1, button = "Right" } },
            mods = "NONE",
            action = wezterm.action_callback(function(window, pane)
                local has_selection = window:get_selection_text_for_pane(pane) ~= ""
                if has_selection then
                    window:perform_action(act.CopyTo("ClipboardAndPrimarySelection"), pane)
                    window:perform_action(act.ClearSelection, pane)
                else
                    window:perform_action(act({ PasteFrom = "Clipboard" }), pane)
                end
            end),
        },
    },

    -- OpenGL for GPU acceleration, Software for CPU
    front_end = "OpenGL",
    color_scheme_dirs = { home .. "/.cache/wal" },
    color_scheme = "wezterm-wal",

    -- Font config
    font = font_with_fallback(font_name),

    font_rules = {
        {
            italic = true,
            font = font_with_fallback(font_name, { italic = true }),
        },
        {
            italic = false,
            font = font_with_fallback(font_name, { bold = true }),
        },
        {
            intensity = "Bold",
            font = font_with_fallback(font_name, { bold = true }),
        },
    },
    warn_about_missing_glyphs = false,
    font_size = 12,
    line_height = 1.0,
    dpi = 96.0,

    -- Cursor style
    default_cursor_style = "BlinkingBar",

    -- X11
    enable_wayland = true,

    -- Keybinds
    disable_default_key_bindings = true,
    keys = {
        { key = "=", mods = "CTRL", action = "IncreaseFontSize" },
        { key = "-", mods = "CTRL", action = "DecreaseFontSize" },
        { key = "0", mods = "CTRL", action = "ResetFontSize" },
        {
            key = [[\]],
            mods = "CTRL|ALT",
            action = wezterm.action({
                SplitHorizontal = { domain = "CurrentPaneDomain" },
            }),
        },
        {
            key = [[\]],
            mods = "CTRL",
            action = wezterm.action({
                SplitVertical = { domain = "CurrentPaneDomain" },
            }),
        },
        {
            key = "h",
            mods = "CTRL|SHIFT",
            action = wezterm.action({ ActivatePaneDirection = "Left" }),
        },
        {
            key = "l",
            mods = "CTRL|SHIFT",
            action = wezterm.action({ ActivatePaneDirection = "Right" }),
        },
        {
            key = "k",
            mods = "CTRL|SHIFT",
            action = wezterm.action({ ActivatePaneDirection = "Up" }),
        },
        {
            key = "j",
            mods = "CTRL|SHIFT",
            action = wezterm.action({ ActivatePaneDirection = "Down" }),
        },
        {
            key = "h",
            mods = "CTRL|SHIFT|ALT",
            action = wezterm.action({ AdjustPaneSize = { "Left", 1 } }),
        },
        {
            key = "l",
            mods = "CTRL|SHIFT|ALT",
            action = wezterm.action({ AdjustPaneSize = { "Right", 1 } }),
        },
        {
            key = "k",
            mods = "CTRL|SHIFT|ALT",
            action = wezterm.action({ AdjustPaneSize = { "Up", 1 } }),
        },
        {
            key = "j",
            mods = "CTRL|SHIFT|ALT",
            action = wezterm.action({ AdjustPaneSize = { "Down", 1 } }),
        },
        { -- browser-like bindings for tabbing
            key = "t",
            mods = "CTRL",
            action = wezterm.action({ SpawnTab = "CurrentPaneDomain" }),
        },
        {
            key = "W",
            mods = "CTRL",
            action = wezterm.action({ CloseCurrentTab = { confirm = false } }),
        },
        {
            key = "Tab",
            mods = "CTRL",
            action = wezterm.action({ ActivateTabRelative = 1 }),
        },
        {
            key = "Tab",
            mods = "CTRL|SHIFT",
            action = wezterm.action({ ActivateTabRelative = -1 }),
        }, -- standard copy/paste bindings
        {
            key = "x",
            mods = "CTRL",
            action = "ActivateCopyMode",
        },
        {
            key = "v",
            mods = "CTRL",
            action = wezterm.action({ PasteFrom = "Clipboard" }),
        },
        {
            key = "c",
            mods = "CTRL",
            action = wezterm.action({ CopyTo = "ClipboardAndPrimarySelection" }),
        },
        { key = "PageUp", mods = "SHIFT", action = act.ScrollByPage(-1) },
        { key = "PageDown", mods = "SHIFT", action = act.ScrollByPage(1) },
    },

    -- hyperlinks {{{
    hyperlink_rules = {
        {
            regex = "\\b\\w+://[\\w.-]+:[0-9]{2,15}\\S*\\b",
            format = "$0",
        },
        {
            regex = "\\b\\w+://[\\w.-]+\\.[a-z]{2,15}\\S*\\b",
            format = "$0",
        },
        {
            regex = [[\b\w+@[\w-]+(\.[\w-]+)+\b]],
            format = "mailto:$0",
        },
        {
            regex = [[\bfile://\S*\b]],
            format = "$0",
        },
        {
            regex = [[\b\w+://(?:[\d]{1,3}\.){3}[\d]{1,3}\S*\b]],
            format = "$0",
        },
        {
            regex = [[\b[tT](\d+)\b]],
            format = "https://example.com/tasks/?t=$1",
        },
    },
    -- }}}

    -- Aesthetic Night Colorscheme
    bold_brightens_ansi_colors = true,
    -- Padding
    window_padding = {
        left = 25,
        right = 25,
        top = 25,
        bottom = 25,
    },
    enable_kitty_graphics = true,

    -- Tab Bar
    enable_tab_bar = true,
    hide_tab_bar_if_only_one_tab = true,
    show_tab_index_in_tab_bar = false,
    tab_bar_at_bottom = true,
    -- General
    window_decorations = "NONE",
    automatically_reload_config = true,
    inactive_pane_hsb = { saturation = 0.5, brightness = 0.5 },
    window_background_opacity = 0.7,
    window_close_confirmation = "NeverPrompt",
    window_frame = { active_titlebar_bg = "#45475a", font = font_with_fallback(font_name, { bold = true }) },
}

Expected Behavior

Logs

No response

Anything else?

I use Starship as a prompt.

sachinsenal0x64 commented 4 months ago

Fixed it :)

github-actions[bot] commented 3 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.