diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-11-04 18:16:05 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-11-04 18:16:05 +0100 |
| commit | 82722e9f414bb7fb280f4e5434364059c672b0c2 (patch) | |
| tree | 1cafa74a96c2143de99aa4bd1077647861bdd68c /config | |
| parent | c4237ef16478e3b1d7ed36b07ff3108645e31bba (diff) | |
| download | dotfiles-82722e9f414bb7fb280f4e5434364059c672b0c2.tar.gz dotfiles-82722e9f414bb7fb280f4e5434364059c672b0c2.zip | |
[qutebrowser] fix external editing when using termite
Some terminals consider all arguments in argv after an '-e' as command
and others only the next arg.
Build up the commandline appropriately.
Diffstat (limited to 'config')
| -rw-r--r-- | config/qutebrowser/config.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index b0b4049..8448af4 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -6,7 +6,11 @@ config.bind(',x', 'hint links spawn mpv {hint-url}') config.bind('<Ctrl-l>', 'spawn --userscript password_fill') -c.editor.command = [os.environ["TERMINAL"], "-e", os.environ["VISUAL"], "{}"] +terminal = os.environ['TERMINAL'] +if terminal in ["st", "urxvt"]: + c.editor.command = [terminal, "-e", os.environ['VISUAL'], "{}"] +else: + c.editor.command = [terminal, "-e", f"{os.environ['VISUAL']} {{}}"] c.content.headers.do_not_track = True @@ -20,6 +24,5 @@ config.load_autoconfig() import theme # set qutebrowser colors - for setting, color in theme.theme.items(): config.set(setting, color) |
