Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 43 lines 1.8 kB view raw
1diff --git a/libinput-gestures b/libinput-gestures 2index f337ba3..5f5b05d 100755 3--- a/libinput-gestures 4+++ b/libinput-gestures 5@@ -75,17 +75,13 @@ def get_libinput_vers(): 6 'Return the libinput installed version number string' 7 # Try to use newer libinput interface then fall back to old 8 # (depreciated) interface. 9- res = run(('libinput', '--version'), check=False) 10+ res = run(('@libinput@', '--version'), check=False) 11 return res.strip() if res else run(('libinput-list-devices', '--version')) 12 13 # Libinput changed the way in which it's utilities are called 14 libvers = get_libinput_vers() 15-if Version(libvers) >= Version('1.8'): 16- cmd_debug_events = 'libinput debug-events' 17- cmd_list_devices = 'libinput list-devices' 18-else: 19- cmd_debug_events = 'libinput-debug-events' 20- cmd_list_devices = 'libinput-list-devices' 21+cmd_debug_events = '@libinput@ debug-events' 22+cmd_list_devices = '@libinput@ list-devices' 23 24 def get_devices_list(): 25 'Get list of devices and their attributes (as a dict) from libinput' 26@@ -187,7 +183,7 @@ class COMMAND_internal(COMMAND): 27 28 def run(self): 29 'Get list of current workspaces and select next one' 30- stdout = run(('wmctrl', '-d'), check=False) 31+ stdout = run(('@wmctrl@', '-d'), check=False) 32 if not stdout: 33 # This command can fail on GNOME when you have only a single 34 # dynamic workspace using Xorg (probably a GNOME bug) so let's 35@@ -220,7 +216,7 @@ class COMMAND_internal(COMMAND): 36 37 # Switch to desired workspace 38 if index >= minindex and index < maxindex: 39- run(('wmctrl', '-s', str(index))) 40+ run(('@wmctrl@', '-s', str(index))) 41 42 # Table of gesture handlers 43 handlers = OrderedDict()