From 5ea5794ce61cc465b1f9ba15f08796ce527d7cb7 Mon Sep 17 00:00:00 2001 From: KK Date: Thu, 18 Jun 2026 15:11:49 +0200 Subject: [PATCH] Update command list to search internet and use @ --- bin/command-list | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/bin/command-list b/bin/command-list index 6fa59db..de42b0b 100755 --- a/bin/command-list +++ b/bin/command-list @@ -168,11 +168,15 @@ if result.returncode != 0: exit(result.returncode) choice = result.stdout.strip() -val = vals[choice] - -if val["kind"] == "bin": - subprocess.run([val["path"]]) -elif val["kind"] == "app": - subprocess.run(["gtk-launch", val["name"]]) -elif val["kind"] == "url": - subprocess.run(["xdg-open", val["url"]]) +if choice[0] == '@': + choice = choice[1:] +val = vals.get(choice) +if val is not None: + if val["kind"] == "bin": + subprocess.run([val["path"]]) + elif val["kind"] == "app": + subprocess.run(["gtk-launch", val["name"]]) + elif val["kind"] == "url": + subprocess.run(["xdg-open", val["url"]]) +else: + subprocess.run(["xdg-open", "https://www.google.com/search?q=" + choice])