From a00a371b20b859bef4837549329ddc1e52606fa6 Mon Sep 17 00:00:00 2001 From: Harsh Sharma <68972644+codelif@users.noreply.github.com> Date: Fri, 17 May 2024 19:26:43 +0530 Subject: [PATCH] Add check for wayland display env for panel kitten panel kitten previously checked only for DISPLAY env variable, but a wayland session has WAYLAND_DISPLAY env set. Due to this wayland sessions without xwayland could not run panel kitten. --- kittens/panel/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kittens/panel/main.py b/kittens/panel/main.py index f624012cd..094eb8093 100644 --- a/kittens/panel/main.py +++ b/kittens/panel/main.py @@ -158,8 +158,8 @@ def layer_shell_config(opts: PanelCLIOptions) -> LayerShellConfig: def main(sys_args: List[str]) -> None: global args - if is_macos or not os.environ.get('DISPLAY'): - raise SystemExit('Currently the panel kitten is supported only on X11 desktops') + if is_macos or not (os.environ.get('DISPLAY') or os.environ.get('WAYLAND_DISPLAY')): + raise SystemExit('Currently the panel kitten is supported only on X11 or Wayland desktops') args, items = parse_panel_args(sys_args[1:]) if not items: raise SystemExit('You must specify the program to run')