From 59f39ae3ab8be5f489421d6977a93c051d266445 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 8 Aug 2018 15:31:15 +0530 Subject: [PATCH] Fix detection of xprop on systems with older xprop Fixes #798 --- kittens/panel/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kittens/panel/main.py b/kittens/panel/main.py index 02578c057..0421f4535 100644 --- a/kittens/panel/main.py +++ b/kittens/panel/main.py @@ -2,12 +2,12 @@ # vim:fileencoding=utf-8 # License: GPL v3 Copyright: 2018, Kovid Goyal +import shutil import subprocess import sys -from kitty.constants import is_macos, is_wayland from kitty.cli import parse_args - +from kitty.constants import is_macos, is_wayland OPTIONS = r''' --lines @@ -123,7 +123,8 @@ def main(sys_args): global args if is_macos or is_wayland: raise SystemExit('Currently the panel kitten is supported only on X11 desktops') - call_xprop('-version', silent=True) # ensure xprop is available + if not shutil.which('xprop'): + raise SystemExit('The xprop program is required for the panel kitten') args, items = parse_panel_args(sys_args[1:]) if not items: raise SystemExit('You must specify the program to run')