feat(url): optional browser field (yandex/chrome/firefox/edge)
Adds optional 'browser' field to url-action; runtime resolves it via config.BROWSER_PATHS (subprocess.Popen with the chosen exe). When omitted, falls back to webbrowser.open (system default). Constructor GUI gains a browser dropdown on URL action and on multi-step URL. Existing open_browser/youtube/google updated to use yandex by default since user prefers Yandex Browser.
This commit is contained in:
parent
d22a35c9c7
commit
a4171ec6b1
5 changed files with 65 additions and 12 deletions
6
main.py
6
main.py
|
|
@ -252,6 +252,12 @@ def run_action(action):
|
|||
else:
|
||||
subprocess.Popen(action['cmd'], shell=True)
|
||||
elif t == 'url':
|
||||
browser = action.get('browser')
|
||||
if browser:
|
||||
exe = config.BROWSER_PATHS.get(browser)
|
||||
if exe and os.path.isfile(exe):
|
||||
subprocess.Popen([exe, action['href']])
|
||||
return
|
||||
webbrowser.open(action['href'])
|
||||
elif t == 'keys':
|
||||
import pyautogui
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue