Update command list to search internet and use @
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user