kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.12k stars 971 forks source link

No tab bar in child window #7413

Closed svenihoney closed 4 months ago

svenihoney commented 5 months ago

Describe the bug I have mapped the new window command to CTRL+SHIFT+n like this:

map kitty_mod+n new_os_window_with_cwd

If I open a new window with this key combo, a new window is opened correctly. But if I open a new tab, the tab bar display is incorrect.

To Reproduce Steps to reproduce the behavior:

  1. Open kitty with kitty -1
  2. Open new window with CTRL+SHIFT+n
  3. Open a new tab with CTRL+SHIFT+t
  4. Execute

Screenshots Healthy terminal (first instance): image

Faulty instance in new window and second tab opened: image

Environment details

kitty 0.34.1 created by Kovid Goyal
Linux maja 6.8.6-zen1 #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan  1 00:00:00 UTC 1980 x86_64

<<< Welcome to NixOS 24.05.20240505.25865a4 (x86_64) - /dev/tty >>>

Run 'nixos-help' for the NixOS manual.

DISTRIB_CODENAME=uakari
DISTRIB_DESCRIPTION="NixOS 24.05 (Uakari)"
DISTRIB_ID=nixos
DISTRIB_RELEASE="24.05"
LSB_VERSION="24.05 (Uakari)"
Running under: Wayland (usage: Hyprland [arg [...]].) missing: blur
Frozen: False
Paths:
  kitty: /nix/store/7bkj1dkjkan3blf13zajp9v5s5cfrh68-kitty-0.34.1/bin/kitty
  base dir: /nix/store/7bkj1dkjkan3blf13zajp9v5s5cfrh68-kitty-0.34.1/lib/kitty
  extensions dir: /nix/store/7bkj1dkjkan3blf13zajp9v5s5cfrh68-kitty-0.34.1/lib/kitty/kitty
  system shell: /run/current-system/sw/bin/bash
Loaded config files:
  /home/sven/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control          yes
cursor_stop_blinking_after    3.0
enabled_layouts               ['splits']
font_family                   JetBrains Mono Nerd Font
font_size                     10.0
listen_on                     unix:/tmp/kitty
paste_actions                 frozenset({'quote-urls-at-prompt'})
scrollback_lines              4000
scrollback_pager_history_size 2147483648
shell_integration             frozenset({'no-cursor', 'no-rc'})
tab_bar_style                 powerline
tab_powerline_style           slanted
tab_separator                 ┇
window_padding_width          FloatEdges(left=5.0, top=5.0, right=5.0, bottom=5.0)
Added shortcuts:
    shift+alt+left →  previous_tab
    shift+alt+right →  next_tab
    shift+page_down →  scroll_page_down
    shift+page_up →  scroll_page_up
Changed shortcuts:
    kitty_mod+, →  change_font_size all -2.0
    kitty_mod+- →  change_font_size all 0
    kitty_mod+. →  change_font_size all +2.0
    kitty_mod+n →  new_os_window_with_cwd
    kitty_mod+t →  launch --cwd=current --type=tab
Colors:
    active_border_color           #626483   
    active_tab_background         #282936   
    active_tab_foreground         #e9e9f4   
    background                    #282936   
    color0                        #282936   
    color1                        #ea51b2   
    color10                       #3a3c4e   
    color11                       #4d4f68   
    color12                       #62d6e8   
    color13                       #f1f2f8   
    color14                       #00f769   
    color15                       #f7f7fb   
    color2                        #ebff87   
    color3                        #00f769   
    color4                        #62d6e8   
    color5                        #b45bcf   
    color6                        #a1efe4   
    color7                        #e9e9f4   
    color8                        #626483   
    color9                        #b45bcf   
    cursor                        #e9e9f4   
    foreground                    #e9e9f4   
    inactive_border_color         #3a3c4e   
    inactive_tab_background       #3a3c4e   
    inactive_tab_foreground       #62d6e8   
    selection_background          #e9e9f4   
    selection_foreground          #282936   
    tab_bar_background            #3a3c4e   
    url_color                     #62d6e8   

Important environment variables seen by the kitty process:
    PATH                                /nix/store/7bkj1dkjkan3blf13zajp9v5s5cfrh68-kitty-0.34.1/bin:/nix/store/kcc6jv90wk4l48ry5fg2kr3n376y0avg-imagemagick-7.1.1-30/bin:/nix/store/1byq5q5hnj1n9k5si3w8pd8q3rzxnbfq-ncurses-6.4-dev/bin:/run/wrappers/bin:/home/sven/.nix-profile/bin:/nix/profile/bin:/home/sven/.local/state/nix/profile/bin:/etc/profiles/per-user/sven/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/nix/store/2vkh4388dshscjx942dqvgsl24hnkkq9-binutils-wrapper-2.41/bin:/nix/store/4if182kq6l7maxf5vjrdbhbk3brnyglm-pciutils-3.12.0/bin:/nix/store/8mjb3ziimfi3rki71q4s0916xkm4cm5p-gcc-wrapper-13.2.0/bin
    LANG                                de_DE.UTF-8
    EDITOR                              nano
    SHELL                               /run/current-system/sw/bin/bash
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-1
    USER                                sven
    XCURSOR_SIZE                        24
    XDG_CONFIG_DIRS                     /etc/xdg:/home/sven/.nix-profile/etc/xdg:/nix/profile/etc/xdg:/home/sven/.local/state/nix/profile/etc/xdg:/etc/profiles/per-user/sven/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg
    XDG_BACKEND                         wayland
    LC_ADDRESS                          de_DE.UTF-8
    LC_NAME                             de_DE.UTF-8
    LC_MONETARY                         de_DE.UTF-8
    XDG_SEAT                            seat0
    XDG_SESSION_TYPE                    wayland
    LC_PAPER                            de_DE.UTF-8
    XDG_CURRENT_DESKTOP                 Hyprland
    XDG_SESSION_CLASS                   user
    LC_IDENTIFICATION                   de_DE.UTF-8
    LC_TELEPHONE                        de_DE.UTF-8
    LC_MEASUREMENT                      de_DE.UTF-8
    XDG_VTNR                            1
    XDG_SESSION_ID                      3
    XDG_RUNTIME_DIR                     /run/user/1000
    LC_TIME                             de_DE.UTF-8
    XDG_DATA_DIRS                       /nix/store/k0bc55nmlkifwd6z5cqydgsvq3rff2xg-desktops/share:/home/sven/.nix-profile/share:/nix/profile/share:/home/sven/.local/state/nix/profile/share:/etc/profiles/per-user/sven/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
    LC_NUMERIC                          de_DE.UTF-8

Additional context Same problem with kitty --config NONE and CTRL+SHIFT+N, CTRL+SHIFT+T.

kovidgoyal commented 5 months ago

Does not reproduce for me with

kitty --config=NONE -o 'map kitty_mod+n new_os_window_with_cwd' -1

1) Press ctrl_shift_n 2) In the new window press ctrl_shift+t 3) observe a second tab opening with the tab bar, as expected.

svenihoney commented 5 months ago

Okay, interesting. I can reproduce the behavior on my system, and instead of trying to find out what the root cause of the problem is (maybe my environment, font, wayland, used shell or whatever) you simply close the issue because it is working in YOUR environment? Never seen something like this.

Surely I would have been willing to help to find the error.

I think I will look for a different terminal if this is your idea of community support.

kovidgoyal commented 5 months ago

Because this is very clearly an issue specific to your environment, If I had to guess it would be something related to using nix, which tends to break software in weird and wonderful ways. I am not your personal support staff. As stated in https://github.com/kovidgoyal/kitty/blob/master/CONTRIBUTING.md#reporting-bugs bug reports that I dont feel are actual bugs in kitty are closed. Closed status doesn't mean I will not respond further. You are welcome to provide further information that might help track down the cause or ask for guidance in debugging it, but with the information you have so far provided I dont see how this can possibly be a bug in kitty.

If you want to debug further, I suggest you start with running with --debug-input which will tell you if the key press triggered the shortcut or not. Also try using the official kitty binaries instead of the nix package.

faergeek commented 4 months ago

I'm also experiencing this issue on Arch + Hyprland. It started to happen on 0.34.0 for me, 0.33.1 had no issue. I did a git bisect between master and 0.33.1 running kitty with:

./kitty/launcher/kitty --config=NONE -o 'map kitty_mod+n new_os_window_with_cwd' -o 'map kitty_mod+t new_tab_with_cwd' -1

And opening a couple tabs in the first window, it always works fine. Then I open a new window and try to open a couple tabs in it, that's when issue starts to appear. The tabs are there, but tab bar is not visible.

First bad commits seems to be https://github.com/kovidgoyal/kitty/commit/a40a36d191285185e99f3699f314aca504ca0a75

I observed a couple behaviors.

Just some kind of an artifact.

screenshot 1

Sometimes seems like it kind of wraps around. Instead of tab bar it shows the topmost line from the normal output:

screenshot 2

Other times the place where tab bar should be is just transparent. And it blinks between transparent and terminal background together with cursor blinking.

screenshot 3

What else can I do to help debugging this?

kitty 0.33.1 (a40a36d191) created by Kovid Goyal
Linux phoenix 6.9.2-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sun, 26 May 2024 01:30:09 +0000 x86_64
Arch Linux 6.9.2-zen1-1-zen (/dev/tty)

Running under: Wayland (Hyprland v0.40.0,)
Frozen: False
Paths:
  kitty: /home/faergeek/projects/kitty/kitty/launcher/kitty
  base dir: /home/faergeek/projects/kitty
  extensions dir: /home/faergeek/projects/kitty/kitty
  system shell: /usr/bin/fish
Loaded config overrides:
  map kitty_mod+n new_os_window_with_cwd
  map kitty_mod+t new_tab_with_cwd

Config options different from defaults:
Changed shortcuts:
    kitty_mod+n →  new_os_window_with_cwd
    kitty_mod+t →  new_tab_with_cwd

Important environment variables seen by the kitty process:
    PATH                                /home/faergeek/projects/kitty/kitty/launcher:/home/faergeek/.opam/default/bin:/home/faergeek/.asdf/shims:/home/faergeek/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    LANG                                ru_RU.UTF-8
    VISUAL                              nvim
    EDITOR                              nvim
    SHELL                               /usr/bin/fish
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-1
    USER                                faergeek
    XDG_SESSION_TYPE                    wayland
    XDG_DATA_DIRS                       /home/faergeek/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
    XDG_BACKEND                         wayland
    XDG_CURRENT_DESKTOP                 Hyprland
    XDG_SESSION_ID                      3
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_SEAT                            seat0
kovidgoyal commented 4 months ago

Is it hyprland specific? Does it happen in another wayland compositor? Or under XWayland (linux_display_server x11) in kitty.conf.

faergeek commented 4 months ago

Wow, thank was quick! Thank you very much! Confirming that the latest commit fixed the issue for me :+1: