Update command list to search internet and use @

This commit is contained in:
KK
2026-06-18 15:11:49 +02:00
parent ebcff99d2d
commit 5ea5794ce6

View File

@@ -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])