qutebrowser: Make use of dotter for dir structure
Since we now use dotter we can simplify the dir structure for qutebrowser a lot. Everything dot-filed earlier can now reside in simple directories called config (for ~/.config/qutebrowser), data (for ~/.local/share/qutebrowser), and scripts (for ~/.local/bin) files.
This commit is contained in:
parent
dcde027a67
commit
8681d34946
49 changed files with 9 additions and 5 deletions
79
qutebrowser/config/config.py
Normal file
79
qutebrowser/config/config.py
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
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.tabs.show_switching_delay = 2000
|
||||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue