Documentation, check if config dir exists
This commit is contained in:
parent
7c350a29d5
commit
980cf5ada1
@ -33,6 +33,7 @@ The following environment variables will be set when a userscript is launched:
|
|||||||
- `QUTE_FIFO`: The FIFO or file to write commands to.
|
- `QUTE_FIFO`: The FIFO or file to write commands to.
|
||||||
- `QUTE_HTML`: Path of a file containing the HTML source of the current page.
|
- `QUTE_HTML`: Path of a file containing the HTML source of the current page.
|
||||||
- `QUTE_TEXT`: Path of a file containing the plaintext of the current page.
|
- `QUTE_TEXT`: Path of a file containing the plaintext of the current page.
|
||||||
|
- `QUTE_CONFIG_DIR`: Path of the directory containing qutebrowser's configuration.
|
||||||
|
|
||||||
In `command` mode:
|
In `command` mode:
|
||||||
|
|
||||||
|
@ -376,7 +376,9 @@ def run(cmd, *args, win_id, env, verbose=False):
|
|||||||
user_agent = config.get('network', 'user-agent')
|
user_agent = config.get('network', 'user-agent')
|
||||||
if user_agent is not None:
|
if user_agent is not None:
|
||||||
env['QUTE_USER_AGENT'] = user_agent
|
env['QUTE_USER_AGENT'] = user_agent
|
||||||
env['QUTE_CONFIG_DIR'] = standarddir.config()
|
config_dir = standarddir.config()
|
||||||
|
if config_dir is not None:
|
||||||
|
env['QUTE_CONFIG_DIR'] = config_dir
|
||||||
cmd_path = os.path.expanduser(cmd)
|
cmd_path = os.path.expanduser(cmd)
|
||||||
|
|
||||||
# if cmd is not given as an absolute path, look it up
|
# if cmd is not given as an absolute path, look it up
|
||||||
|
Loading…
Reference in New Issue
Block a user