Update command list to search internet and use @
This commit is contained in:
@@ -168,11 +168,15 @@ if result.returncode != 0:
|
|||||||
exit(result.returncode)
|
exit(result.returncode)
|
||||||
|
|
||||||
choice = result.stdout.strip()
|
choice = result.stdout.strip()
|
||||||
val = vals[choice]
|
if choice[0] == '@':
|
||||||
|
choice = choice[1:]
|
||||||
if val["kind"] == "bin":
|
val = vals.get(choice)
|
||||||
|
if val is not None:
|
||||||
|
if val["kind"] == "bin":
|
||||||
subprocess.run([val["path"]])
|
subprocess.run([val["path"]])
|
||||||
elif val["kind"] == "app":
|
elif val["kind"] == "app":
|
||||||
subprocess.run(["gtk-launch", val["name"]])
|
subprocess.run(["gtk-launch", val["name"]])
|
||||||
elif val["kind"] == "url":
|
elif val["kind"] == "url":
|
||||||
subprocess.run(["xdg-open", val["url"]])
|
subprocess.run(["xdg-open", val["url"]])
|
||||||
|
else:
|
||||||
|
subprocess.run(["xdg-open", "https://www.google.com/search?q=" + choice])
|
||||||
|
|||||||
Reference in New Issue
Block a user