kovidgoyal / kitty

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

New move_to_screen_edge layout action not working #5651

Closed wiraki closed 2 years ago

wiraki commented 2 years ago

Describe the bug Trying the new move_to_screen_edge functionality is not working. I have tried the suggested keymapping, but also many other ones, none work. Instead I just get a bell sound and nothing happens.

This is obviously on the latest version.

To Reproduce Steps to reproduce the behavior:

  1. Update to 0.26.5
  2. Add keymapping, such as map ctrl+shift+up layout_action move_to_screen_edge top to kitty.conf
  3. Make sure no other function is using the same key combination
  4. Refresh kitty, or open new instance
  5. Try the key combination, nothing happens.

Screenshots NA

Environment details

Linux system76-lemur 6.0.3-76060003-generic #202210211149~1666452039~22.04~1891946 SMP PREEMPT_DYNAMIC Sat O x86_64
Pop!_OS 22.04 LTS system76-lemur /dev/tty

DISTRIB_ID=Pop
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Pop!_OS 22.04 LTS"
Running under: X11
Frozen: True
Paths:
  kitty: /home/bob/.local/kitty.app/bin/kitty
  base dir: /home/bob/.local/kitty.app/lib/kitty
  extensions dir: /home/bob/.local/kitty.app/lib/kitty-extensions
  system shell: /bin/zsh
Loaded config files:
  /home/bob/.config/kitty/kitty.conf

Config options different from defaults:
active_tab_font_style           (True, False)
active_tab_title_template       {title}
allow_remote_control            yes
bold_font                       Fira Code Bold Nerd Font Complete
bold_italic_font                Victor Mono Bold Italic
copy_on_select                  clipboard
cursor_blink_interval           0.45
cursor_stop_blinking_after      10.0
disable_ligatures               1
dynamic_background_opacity      True
enable_audio_bell               False
enabled_layouts                 ['tall:bias=40', 'fat', 'splits:split_axis=horizontal', 'grid', 'horizontal', 'vertical', 'stack', 'tall:bias=40;mirrored=true', 'fat:mirrored=true']
font_family                     Fira Code Retina Nerd Font Complete
font_features:
{'FiraCodeNerdFontComplete-Retina': ('+ss01', '+ss03', '+ss05', '+ss07')}
hide_window_decorations         1
inactive_tab_font_style         (False, True)
inactive_text_alpha             0.65
italic_font                     Victor Mono Medium Italic
modify_font:
    cell_height 110%
mouse_hide_wait                 1.5
scrollback_fill_enlarged_window True
scrollback_lines                2500
scrollback_pager_history_size   104857600
shell_integration               frozenset({'no-cursor', 'enabled'})
tab_activity_symbol             ⁂
tab_bar_edge                    1
tab_bar_margin_height           TabBarMarginHeight(outer=1.0, inner=3.0)
tab_bar_min_tabs                1
tab_bar_style                   powerline
tab_powerline_style             slanted
tab_separator                    | 
tab_title_template              {title} [{index}]{fmt.bold}{activity_symbol}{fmt.nobold}
url_style                       1
visual_bell_duration            0.15
window_border_width             (1.0, 'px')
window_margin_width             FloatEdges(left=2.0, top=2.0, right=2.0, bottom=2.0)
window_padding_width            FloatEdges(left=1.0, top=1.0, right=1.0, bottom=1.0)
Added mouse actions:
    right press grabbed →  paste_from_selection
Changed mouse actions:
    right press ungrabbed →  paste_from_selection
Added shortcuts:
    alt+f →  focus_visible_window
    alt+h →  neighboring_window left
    alt+j →  neighboring_window down
    alt+k →  neighboring_window up
    alt+l →  neighboring_window right
    ctrl+alt+enter →  launch --cwd=current
    ctrl+n →  launch --location=neighbor
    ctrl+page_down →  next_tab
    ctrl+page_up →  previous_tab
    ctrl+shift+y > f →  kitten hints --type path --program @
    f1 →  create_marker
    f2 →  remove_marker
    kitty_mod+/ →  launch --location=hsplit --allow-remote-control kitty +kitten kitty-search/search.py @active-kitty-window-id
    kitty_mod+f4 →  overlay --title "scratch overlay" screen -d -RR scratch nano /tmp/scratch
    kitty_mod+m > a →  detach_tab ask
    kitty_mod+m > s →  swap_with_window
    kitty_mod+m > t →  detach_window ask
    kitty_mod+space →  next_layout
    kitty_mod+x > t →  close_other_tabs_in_os_window
    kitty_mod+x > w →  close_other_windows_in_tab
    shift+alt+0 →  goto_tab 10
    shift+alt+1 →  goto_tab 1
    shift+alt+2 →  goto_tab 2
    shift+alt+3 →  goto_tab 3
    shift+alt+4 →  goto_tab 4
    shift+alt+5 →  goto_tab 5
    shift+alt+6 →  goto_tab 6
    shift+alt+7 →  goto_tab 7
    shift+alt+8 →  goto_tab 8
    shift+alt+9 →  goto_tab 9
    shift+alt+[ →  previous_tab
    shift+alt+] →  next_tab
    shift+alt+j →  scroll_line_down
    shift+alt+k →  scroll_line_up
    shift+alt+page_down →  scroll_page_down
    shift+alt+page_up →  scroll_page_up
Removed shortcuts:
    kitty_mod+x →  scroll_to_prompt 1
Changed shortcuts:
    kitty_mod+6 →  goto_layout fat
    kitty_mod+7 →  goto_layout tall
    kitty_mod+= →  kitten kitty_grab/grab.py
    kitty_mod+alt+t →  launch --type tab --cwd current
    kitty_mod+down →  layout_action move_to_screen_edge bottom
    kitty_mod+e →  launch --location=vsplit
    kitty_mod+f1 →  overlay --title "scrollback overlay" --stdin-source=@screen_scrollback bat
    kitty_mod+h →  move_window left
    kitty_mod+j →  move_window down
    kitty_mod+k →  move_window up
    kitty_mod+l →  move_window right
    kitty_mod+left →  layout_action move_to_screen_edge left
    kitty_mod+o →  launch --location=hsplit
    kitty_mod+right →  layout_action move_to_screen_edge right
    kitty_mod+up →  layout_action move_to_screen_edge top
Colors:
    active_border_color             #676767   
    background                      #2e3440   
    color0                          #3b4252   
    color1                          #bf616a   
    color10                         #a3be8c   
    color11                         #ebcb8b   
    color12                         #81a1c1   
    color13                         #b48ead   
    color14                         #8fbcbb   
    color15                         #eceff4   
    color2                          #a3be8c   
    color3                          #ebcb8b   
    color4                          #81a1c1   
    color5                          #b48ead   
    color6                          #88c0d0   
    color7                          #e5e9f0   
    color8                          #4c566a   
    color9                          #bf616a   
    cursor                          #81a1c1   
    foreground                      #d8dee9   
    inactive_border_color           #2e3440   
    inactive_tab_background         #647b94   
    inactive_tab_foreground         #ffffff   
    visual_bell_color               #515a72   

Important environment variables seen by the kitty process:
    PATH                                /home/bob/.cargo/bin:/home/bob/.local/bin:/home/bob/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/bob/.dotnet/tools
    LANG                                en_US.UTF-8
    SHELL                               /bin/zsh
    DISPLAY                             :1
    USER                                bob
    XDG_SESSION_TYPE                    x11
    XDG_SESSION_CLASS                   user
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_MENU_PREFIX                     gnome-
    XDG_CURRENT_DESKTOP                 pop:GNOME
    XDG_SESSION_DESKTOP                 pop
    XDG_DATA_DIRS                       /usr/share/pop:/usr/share/gnome:/home/bob/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
    XDG_CONFIG_DIRS                     /etc/xdg/xdg-pop:/etc/xdg

Additional context

Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.

I did. I also did with with a minimal config that only contains:

map ctrl+shift+up layout_action move_to_screen_edge top
map ctrl+shift+left layout_action move_to_screen_edge left
map ctrl+shift+right layout_action move_to_screen_edge right
map ctrl+shift+down layout_action move_to_screen_edge bottom
kovidgoyal commented 2 years ago

You need to use the splits layout as well.

m-pauper commented 1 year ago

Hello Kovid,

I am re-using this issue because while you were right in the first place and I have since switched to actually only ever using splits layout (as you can see below), today I noticed it is not working again. When I try to use my keybinds for moving the window to the edge, I only hear the bell.

I only hear the terminal bell

This is weird in itself, as I have turned the audio bell off and only have a visual bell. As far as I can tell right now, in other instances where the bell should happen it works correctly (i.e. only visual bell, no audio).

Maybe there's a detail I am missing, like before?

Thanks for taking a look!

kitty 0.26.1 created by Kovid Goyal
Linux workPC 6.0.6-76060006-generic #202210290932~1669062050~22.04~d94609a SMP PREEMPT_DYNAMIC Mon N x86_64
Pop!_OS 22.04 LTS workPC /dev/tty

DISTRIB_ID=Pop
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Pop!_OS 22.04 LTS"
Running under: X11
Frozen: True
Paths:
  kitty: /home/mpauper/.local/kitty.app/bin/kitty
  base dir: /home/mpauper/.local/kitty.app/lib/kitty
  extensions dir: /home/mpauper/.local/kitty.app/lib/kitty-extensions
  system shell: /usr/bin/zsh
Loaded config files:
  /etc/xdg/kitty/kitty.conf
  /home/mpauper/.config/kitty/kitty.conf

Config options different from defaults:
active_tab_font_style           (True, False)
active_tab_title_template       {title}
allow_remote_control            yes
bold_font                       MonoLisa Bold
bold_italic_font                SemiBold Italic
copy_on_select                  clipboard
cursor_blink_interval           0.45
cursor_stop_blinking_after      10.0
disable_ligatures               1
dynamic_background_opacity      True
enable_audio_bell               False
enabled_layouts                 ['splits:split_axis=horizontal']
font_family                     MonoLisa Regular
font_features:
{'MonoLisa-Bold': ('+zero', '+ss06', '+ss08'),
 'MonoLisa-MediumItalic': ('+zero', '+ss06', '+ss08', '+ss02'),
 'MonoLisa-Regular': ('+zero', '+ss06', '+ss08'),
 'MonoLisa-SemiBoldItalic': ('+zero', '+ss06', '+ss08')}
hide_window_decorations         1
inactive_tab_font_style         (False, True)
inactive_text_alpha             0.65
italic_font                     MonoLisa Medium Italic
modify_font:
    cell_height 105%
mouse_hide_wait                 1.5
scrollback_fill_enlarged_window True
scrollback_lines                2500
scrollback_pager_history_size   104857600
shell_integration               frozenset({'no-cursor', 'enabled'})
symbol_map:
    U+23fb - U+23fe → Symbols Nerd Font Mono
    U+2665 - U+2665 → Symbols Nerd Font Mono
    U+26a1 - U+26a1 → Symbols Nerd Font Mono
    U+2b58 - U+2b58 → Symbols Nerd Font Mono
    U+e000 - U+e00a → Symbols Nerd Font Mono
    U+e0a0 - U+e0a3 → Symbols Nerd Font Mono
    U+e0b0 - U+e0c8 → Symbols Nerd Font Mono
    U+e0ca - U+e0ca → Symbols Nerd Font Mono
    U+e0cc - U+e0d2 → Symbols Nerd Font Mono
    U+e0d4 - U+e0d4 → Symbols Nerd Font Mono
    U+e200 - U+e2a9 → Symbols Nerd Font Mono
    U+e300 - U+e3e3 → Symbols Nerd Font Mono
    U+e5fa - U+e634 → Symbols Nerd Font Mono
    U+e700 - U+e7c5 → Symbols Nerd Font Mono
    U+ea60 - U+ebeb → Symbols Nerd Font Mono
    U+f000 - U+f2e0 → Symbols Nerd Font Mono
    U+f300 - U+f32f → Symbols Nerd Font Mono
    U+f400 - U+f4a9 → Symbols Nerd Font Mono
    U+f500 - U+f8ff → Symbols Nerd Font Mono
tab_activity_symbol             ⁂
tab_bar_edge                    1
tab_bar_margin_height           TabBarMarginHeight(outer=1.0, inner=3.0)
tab_bar_min_tabs                1
tab_bar_style                   powerline
tab_powerline_style             slanted
tab_separator                    | 
tab_title_template              {title} [{index}]{fmt.bold}{activity_symbol}{fmt.nobold}
update_check_interval           0.0
url_style                       1
visual_bell_duration            0.15
window_border_width             (1.0, 'px')
window_padding_width            FloatEdges(left=1.0, top=1.0, right=1.0, bottom=1.0)
Added mouse actions:
    right press grabbed →  paste_from_selection
Changed mouse actions:
    right press ungrabbed →  paste_from_selection
Added shortcuts:
    alt+f →  focus_visible_window
    alt+h →  neighboring_window left
    alt+j →  neighboring_window down
    alt+k →  neighboring_window up
    alt+l →  neighboring_window right
    ctrl+alt+enter →  launch --cwd=current
    ctrl+shift+y > f →  kitten hints --type path --program @
    f1 →  create_marker
    f2 →  remove_marker
    kitty_mod+/ →  launch --location=hsplit --allow-remote-control kitty +kitten kitty-search/search.py @active-kitty-window-id
    kitty_mod+alt+down →  resize_window shorter
    kitty_mod+alt+home →  resize_window reset
    kitty_mod+alt+left →  resize_window narrower
    kitty_mod+alt+right →  resize_window wider
    kitty_mod+alt+up →  resize_window taller
    kitty_mod+f4 →  overlay --title "scratch overlay" screen -d -RR scratch nano /tmp/scratch
    kitty_mod+m > a →  detach_tab ask
    kitty_mod+m > s →  swap_with_window
    kitty_mod+m > t →  detach_window ask
    kitty_mod+space →  next_layout
    kitty_mod+x > t →  close_other_tabs_in_os_window
    kitty_mod+x > w →  close_other_windows_in_tab
    shift+alt+0 →  goto_tab 10
    shift+alt+1 →  goto_tab 1
    shift+alt+2 →  goto_tab 2
    shift+alt+3 →  goto_tab 3
    shift+alt+4 →  goto_tab 4
    shift+alt+5 →  goto_tab 5
    shift+alt+6 →  goto_tab 6
    shift+alt+7 →  goto_tab 7
    shift+alt+8 →  goto_tab 8
    shift+alt+9 →  goto_tab 9
    shift+alt+[ →  previous_tab
    shift+alt+] →  next_tab
    shift+alt+j →  scroll_line_down
    shift+alt+k →  scroll_line_up
    shift+alt+page_down →  scroll_page_down
    shift+alt+page_up →  scroll_page_up
Removed shortcuts:
    kitty_mod+x →  scroll_to_prompt 1
Changed shortcuts:
    kitty_mod+= →  kitten kitty_grab/grab.py
    kitty_mod+alt+t →  launch --type tab --cwd current
    kitty_mod+down →  layout_action move_to_screen_edge bottom
    kitty_mod+e →  launch --location=vsplit
    kitty_mod+f1 →  overlay --title "scrollback overlay" --stdin-source=@screen_scrollback bat
    kitty_mod+h →  move_window left
    kitty_mod+j →  move_window down
    kitty_mod+k →  move_window up
    kitty_mod+l →  move_window right
    kitty_mod+left →  layout_action move_to_screen_edge left
    kitty_mod+o →  launch --location=hsplit
    kitty_mod+r →  layout_action rotate
    kitty_mod+right →  layout_action move_to_screen_edge right
    kitty_mod+up →  layout_action move_to_screen_edge top
Colors:
    active_border_color             #676767   
    background                      #2e3440   
    color0                          #3b4252   
    color1                          #bf616a   
    color10                         #a3be8c   
    color11                         #ebcb8b   
    color12                         #81a1c1   
    color13                         #b48ead   
    color14                         #8fbcbb   
    color15                         #eceff4   
    color2                          #a3be8c   
    color3                          #ebcb8b   
    color4                          #81a1c1   
    color5                          #b48ead   
    color6                          #88c0d0   
    color7                          #e5e9f0   
    color8                          #4c566a   
    color9                          #bf616a   
    cursor                          #81a1c1   
    foreground                      #d8dee9   
    inactive_border_color           #383e49   
    inactive_tab_background         #647b94   
    inactive_tab_foreground         #ffffff   
    visual_bell_color               #515a72   

Important environment variables seen by the kitty process:
    PATH                                /home/mpauper/.local/bin:/home/mpauper/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
    LANG                                en_US.UTF-8
    SHELL                               /usr/bin/zsh
    DISPLAY                             :1
    USER                                mpauper
    XDG_SESSION_TYPE                    x11
    XDG_SESSION_CLASS                   user
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_MENU_PREFIX                     gnome-
    XDG_CURRENT_DESKTOP                 pop:GNOME
    XDG_SESSION_DESKTOP                 pop
    XDG_DATA_DIRS                       /usr/share/pop:/usr/share/gnome:/home/mpauper/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
    XDG_CONFIG_DIRS                     /etc/xdg/xdg-pop:/etc/xdg
kovidgoyal commented 1 year ago

The bell is a bug but you need to run up-to-date kitty for thenew features.

m-pauper commented 1 year ago

Ah shoot, knew it was going to be something stupid like this. I work on 2 different machines interchangeably and sometimes forget to update kitty on one of them. Thanks for pointing it out.