Skip to content

kitty @ ls --self lists all windows #7864

@salmankhilji

Description

@salmankhilji

Describe the Bug
The command kitty @ ls --self lists all windows instead of only the window in which the command is executed.

To Reproduce
Steps to reproduce the behavior:

  1. Launch kitty with the following command:
    kitty --config NONE -o 'allow_remote_control yes'
  2. Execute:
    kitty @ launch --type=tab --keep-focus --no-response
  3. Execute:
    kitty @ ls --self

Observed Behavior
The returned JSON tree contains information about two tabs.

Expected Behavior
The returned JSON tree should contain information only about the current tab and window.

Environment details

kitty 0.36.2 (15ac33a058) created by Kovid Goyal
Linux byteevo 5.15.0-122-generic #132~20.04.1-Ubuntu SMP Fri Aug 30 15:50:07 UTC 2024 x86_64
Ubuntu 20.04.6 LTS byteevo /dev/tty

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
Running under: X11
OpenGL: '4.6 (Core Profile) Mesa 21.2.6' Detected version: 4.6
Frozen: True
Fonts:
  medium: DejaVuSansMono: /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf:0
          Features: ()
    bold: DejaVuSansMono-Bold: /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf:0
          Features: ()
  italic: DejaVuSansMono-Oblique: /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Oblique.ttf:0
          Features: ()
      bi: DejaVuSansMono-BoldOblique: /usr/share/fonts/truetype/dejavu/DejaVuSansMono-BoldOblique.ttf:0
          Features: ()
Paths:
  kitty: /home/precor/.local/kitty.app/bin/kitty
  base dir: /home/precor/.local/kitty.app/lib/kitty
  extensions dir: /home/precor/.local/kitty.app/lib/kitty-extensions
  system shell: /bin/bash
Loaded config overrides:
  allow_remote_control yes

Config options different from defaults:
allow_remote_control yes

Important environment variables seen by the kitty process:
	PATH                                /home/precor/.local/lib/precor:/home/precor/.local/bin:/home/precor/.local/node/bin:/opt/qt/5.15.2/gcc_64/bin:/home/precor/Android/Sdk/build-tools/28.0.3:/home/precor/Android/Sdk/emulator:/home/precor/Android/Sdk/platform-tools:/home/precor/Android/Sdk/cmdline-tools/latest/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
	LANG                                en_US.UTF-8
	SHELL                               /bin/bash
	DISPLAY                             :0
	USER                                precor
	XDG_CONFIG_DIRS                     /etc/xdg/xdg-ubuntu:/etc/xdg
	XDG_MENU_PREFIX                     gnome-
	XDG_SESSION_DESKTOP                 ubuntu
	XDG_SESSION_TYPE                    x11
	XDG_CURRENT_DESKTOP                 ubuntu:GNOME
	XDG_SESSION_CLASS                   user
	XDG_RUNTIME_DIR                     /run/user/1000
	XDG_DATA_DIRS                       /usr/share/ubuntu:/usr/local/share/:/usr/share/

Additional Context

[
  {
    "background_opacity": 1.0,
    "id": 1,
    "is_active": true,
    "is_focused": true,
    "last_focused": true,
    "platform_window_id": 79691790,
    "tabs": [
      {
        "active_window_history": [
          1
        ],
        "enabled_layouts": [
          "fat",
          "grid",
          "horizontal",
          "splits",
          "stack",
          "tall",
          "vertical"
        ],
        "groups": [
          {
            "id": 1,
            "windows": [
              1
            ]
          }
        ],
        "id": 1,
        "is_active": true,
        "is_focused": true,
        "layout": "fat",
        "layout_opts": {
          "bias": 50,
          "full_size": 1,
          "mirrored": false
        },
        "layout_state": {
          "biased_map": {},
          "main_bias": [
            0.5,
            0.5
          ],
          "num_full_size_windows": 1
        },
        "title": "kitty @ ls --self | cb",
        "windows": [
          {
            "at_prompt": false,
            "cmdline": [
              "/bin/bash",
              "--posix"
            ],
            "columns": 160,
            "created_at": 1726548887319419156,
            "cwd": "/home/precor",
            "env": {
              "KITTY_WINDOW_ID": "1"
            },
            "foreground_processes": [
              {
                "cmdline": [
                  "kitten",
                  "@",
                  "ls",
                  "--self"
                ],
                "cwd": "/home/precor",
                "pid": 19031
              },
              {
                "cmdline": [
                  "kitten",
                  "clipboard"
                ],
                "cwd": "/home/precor",
                "pid": 19032
              }
            ],
            "id": 1,
            "is_active": true,
            "is_focused": true,
            "is_self": true,
            "last_cmd_exit_status": 0,
            "last_reported_cmdline": "kitty @ ls --self | cb",
            "lines": 40,
            "pid": 18968,
            "title": "kitty @ ls --self | cb",
            "user_vars": {}
          }
        ]
      },
      {
        "active_window_history": [
          2
        ],
        "enabled_layouts": [
          "fat",
          "grid",
          "horizontal",
          "splits",
          "stack",
          "tall",
          "vertical"
        ],
        "groups": [
          {
            "id": 2,
            "windows": [
              2
            ]
          }
        ],
        "id": 2,
        "is_active": false,
        "is_focused": false,
        "layout": "fat",
        "layout_opts": {
          "bias": 50,
          "full_size": 1,
          "mirrored": false
        },
        "layout_state": {
          "biased_map": {},
          "main_bias": [
            0.5,
            0.5
          ],
          "num_full_size_windows": 1
        },
        "title": "~",
        "windows": [
          {
            "at_prompt": true,
            "cmdline": [
              "/bin/bash",
              "--posix"
            ],
            "columns": 160,
            "created_at": 1726548891815851690,
            "cwd": "/home/precor",
            "env": {
              "KITTY_WINDOW_ID": "2"
            },
            "foreground_processes": [
              {
                "cmdline": [
                  "/bin/bash",
                  "--posix"
                ],
                "cwd": "/home/precor",
                "pid": 19005
              }
            ],
            "id": 2,
            "is_active": true,
            "is_focused": true,
            "is_self": false,
            "last_cmd_exit_status": 0,
            "last_reported_cmdline": "",
            "lines": 40,
            "pid": 19005,
            "title": "~",
            "user_vars": {}
          }
        ]
      }
    ],
    "wm_class": "kitty",
    "wm_name": "kitty"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions