]> git.rmz.io Git - dotfiles.git/blobdiff - qutebrowser/config.py
zsh/prompt: don't try to populate git prompt if not in git repo
[dotfiles.git] / qutebrowser / config.py
index 4b308310b21e434eea83d6b63a03178122c29040..3d7b005abad7191c906d24795b2c083512f471da 100644 (file)
@@ -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