Marty Oehme
c59b617da5
Fixed text not flowing to the external (nvim) editor and saved text not being brought back into qutebrowser. Same issue as here https://github.com/qutebrowser/qutebrowser/issues/6707 it essentially amounts to the terminal not having its own running process id which qutebrowser uses to know when the application closes. Thus, it thinks it closes immediately and deletes the temporary file. No changes are brought back and the file is empty for the editor. With the fix, this does not happen anymore.
78 lines
1.9 KiB
Python
78 lines
1.9 KiB
Python
import os
|
|
|
|
from qutebrowser.config.config import ConfigContainer # noqa: F401
|
|
from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
|
|
|
|
# Autogenerated config.py
|
|
# Documentation:
|
|
# qute://help/configuring.html
|
|
# qute://help/settings.html
|
|
|
|
# load additional settings configured via autoconfig.yml
|
|
config.load_autoconfig()
|
|
|
|
term = os.getenv("TERMINAL", "xterm")
|
|
|
|
c.completion.web_history.max_items = 1000
|
|
c.hints.uppercase = True
|
|
c.editor.command = [
|
|
term,
|
|
"start",
|
|
"--always-new-process",
|
|
"nvim",
|
|
"-f",
|
|
"{file}",
|
|
"-c",
|
|
"normal {line}G{column0}l",
|
|
]
|
|
|
|
# change filepicker
|
|
c.fileselect.handler = "external"
|
|
picker = [
|
|
term,
|
|
"start",
|
|
"--class",
|
|
"float",
|
|
"vifm",
|
|
"--choose-files",
|
|
"{}",
|
|
]
|
|
c.fileselect.single_file.command = picker
|
|
c.fileselect.multiple_files.command = picker
|
|
|
|
c.downloads.location.directory = os.getenv("XDG_DOWNLOAD_DIR", "~/downloads")
|
|
c.downloads.location.prompt = False
|
|
|
|
config.source("alias.py")
|
|
config.source("maps.py")
|
|
config.source("content.py")
|
|
config.source("searchengines.py")
|
|
config.source("redirects.py")
|
|
|
|
# Tab-Bar
|
|
# have tab bar on the right, not on the top
|
|
c.tabs.background = True
|
|
c.tabs.title.format = "{index} {audio}{perc}{current_title}"
|
|
c.tabs.position = "right"
|
|
c.tabs.width = "15%"
|
|
c.tabs.show = "multiple"
|
|
c.statusbar.show = "always"
|
|
|
|
c.colors.webpage.bg = "#555555"
|
|
|
|
# Prevents *all* tabs from being loaded on restore, only loads on activating them
|
|
c.session.lazy_restore = True
|
|
|
|
# for code_select.py userscript
|
|
# Allows copying code sections to clipboard easily
|
|
c.hints.selectors["code"] = [
|
|
# Selects all code tags whose direct parent is not a pre tag
|
|
":not(pre) > code",
|
|
"pre",
|
|
]
|
|
|
|
# give the browser nice theme colors
|
|
state_dir=os.environ.get('XDG_STATE_HOME', f"{os.environ['HOME']}/.local/state")
|
|
colorscheme=f"{state_dir}/qutebrowser/colorscheme.py"
|
|
if os.path.isfile(colorscheme):
|
|
config.source(colorscheme)
|