X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/9159fa2e75f9d00d6e2836ab5efc6df3a7e94ae5..34f20d2cbf651ec2b1366dd2bcbc1331929ac8fc:/qutebrowser/config.py diff --git a/qutebrowser/config.py b/qutebrowser/config.py index 4b30831..3d7b005 100644 --- a/qutebrowser/config.py +++ b/qutebrowser/config.py @@ -3,6 +3,16 @@ ## qute://help/configuring.html ## qute://help/settings.html +def in_terminal(cmd: list): + """Wraps cmd to be run in the default TERMINAL, as set by environment. + + :cmd: cmd to execute in TERMINAL + :returns: A shell command as a list + """ + from os import getenv + t = getenv('TERMINAL', 'xterm') + return [t, '-e'] + cmd + ## This is here so configs done via the GUI are still loaded. ## Remove it to not load settings done via the GUI. config.load_autoconfig() @@ -720,7 +730,7 @@ c.downloads.open_dispatcher = "rifle" ## `{line0}`: Same as `{line}`, but starting from index 0. * `{column0}`: ## Same as `{column}`, but starting from index 0. ## Type: ShellCommand -c.editor.command = ['urxvtc', '-e', 'vim', '{file}', '-c', 'normal {line}G{column0}l'] +c.editor.command = in_terminal(['vim', '{file}', '-c', 'normal {line}G{column0}l']) ## Encoding to use for the editor. ## Type: Encoding @@ -1004,7 +1014,7 @@ c.hints.scatter = False ## cleared after this time. If set to 0, partially typed bindings are ## never cleared. ## Type: Int -c.input.partial_timeout = 5000 +c.input.partial_timeout = 0 ## Enable spatial navigation. Spatial navigation consists in the ability ## to navigate between focusable elements in a Web page, such as