]> git.rmz.io Git - dotfiles.git/blobdiff - qutebrowser/config.py
weechat: alias to show rap issue
[dotfiles.git] / qutebrowser / config.py
index 4b308310b21e434eea83d6b63a03178122c29040..8075a2b755a5d898f7a9286f2b546bf5dd8c0487 100644 (file)
@@ -3,6 +3,16 @@
 ##   qute://help/configuring.html
 ##   qute://help/settings.html
 
 ##   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()
 ## 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
 ## `{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
 
 ## 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
 ## 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
 
 ## Enable spatial navigation. Spatial navigation consists in the ability
 ## to navigate between focusable elements in a Web page, such as
@@ -1095,7 +1105,7 @@ c.input.partial_timeout = 5000
 ## https://peter.sh/experiments/chromium-command-line-switches/ for a
 ## list) will work.
 ## Type: List of String
 ## https://peter.sh/experiments/chromium-command-line-switches/ for a
 ## list) will work.
 ## Type: List of String
-c.qt.args = [str('proxy-pac-url=file://' / config.configdir / 'proxy.pac')]
+c.qt.args = ['proxy-pac-url=file://' + str(config.configdir / 'proxy.pac')]
 
 ## Additional environment variables to set. Setting an environment
 ## variable to null/None will unset it.
 
 ## Additional environment variables to set. Setting an environment
 ## variable to null/None will unset it.