Marty Oehme
62f680ecd3
Added automatic proxying to floss alternative frontends for proprietary websites like reddit (teddit), youtube (invidious), twitter (nitter), and instagram (bibliogram). Often does not work on calling cached websites, meaning when it does not load the correct page a full reload (shift-R) should call up the correct frontend on first use of a previously visited page. Squashed commit of the following: commit ccf5a9f9a001c466e4fe00763f561d09a598bd70 Author: Marty Oehme <marty.oehme@gmail.com> Date: Wed Jul 28 10:05:37 2021 +0200 qutebrowser: Add LocalLeader key concept Added differentiation between leader mappings and local leader mappings, with a similar idea to vim: leader mappings enact changes within qutebrowser on a more general level (currently e.g. changing tab display, javascript switch, stylesheet setting) while local leader mappings enact changes or interact with the current page context (e.g. start mpv stream, display in readability mode, download pdf version of page, and so on). This will be hard for my muscle memory, but I think such a switch benefits logical action separation in the long run, especially in case I add more action shortcuts over time. An interesting thing this separation also allows is a more buffer-specific action repertoire (for example through recognition of current page context with interceptors) so specific pages contain different actions. commit afbe573d527b70fa57d643ede78cd5e71f3ca4c1 Author: Marty Oehme <marty.oehme@gmail.com> Date: Tue Jul 27 16:00:37 2021 +0200 qutebrowser: Rename key mapping file Renamed from `keys.py` to `maps.py` to keep some coherence with nvim naming scheme. commit cc78cbb67953bba7ab4d5a6dd48dfa50fbcfe2fc Author: Marty Oehme <marty.oehme@gmail.com> Date: Tue Jul 27 10:19:34 2021 +0200 qutebrowser: Add reddit redirection Added redirection to old.reddit whenever a link on reddit is opened. Added redirection of youtube links to yewtu.be invidious instance.
70 lines
1.6 KiB
Python
70 lines
1.6 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()
|
|
|
|
c.completion.web_history.max_items = 1000
|
|
c.hints.uppercase = True
|
|
c.editor.command = [
|
|
"alacritty",
|
|
"-e",
|
|
"nvim",
|
|
"-f",
|
|
"{file}",
|
|
"-c",
|
|
"normal {line}G{column0}l",
|
|
]
|
|
|
|
# change filepicker
|
|
c.fileselect.handler = "external"
|
|
picker = [
|
|
"alacritty",
|
|
"--class",
|
|
"floating,floating",
|
|
"-e",
|
|
"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("url.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.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
|
|
config.source("colorscheme.py")
|