Update the config to be on crack.
This commit is contained in:
parent
f6529bd3d6
commit
d97837ada2
@ -18,8 +18,15 @@ catppuccin.setup(c, "Machiatto", True)
|
||||
# load custom configs
|
||||
config.source("pyconfig/redirectors.py")
|
||||
|
||||
# enable dark mode
|
||||
##-- Dark Mode Settings --##
|
||||
c.colors.webpage.preferred_color_scheme = "dark"
|
||||
c.colors.webpage.darkmode.enabled = True
|
||||
c.colors.webpage.bg = "black"
|
||||
c.colors.webpage.darkmode.algorithm = "lightness-cielab"
|
||||
c.colors.webpage.darkmode.threshold.text = 150
|
||||
c.colors.webpage.darkmode.threshold.background = 100
|
||||
c.colors.webpage.darkmode.policy.images = "always"
|
||||
c.colors.webpage.darkmode.grayscale.images = 0.35
|
||||
|
||||
# change startpage and default page
|
||||
c.url.start_pages = ["https://startpage.cronyakatsuki.xyz"]
|
||||
@ -44,12 +51,22 @@ c.content.canvas_reading = False
|
||||
c.content.webgl = False
|
||||
c.content.webrtc_ip_handling_policy = "default-public-interface-only"
|
||||
c.content.geolocation = False
|
||||
c.content.blocking.method = "both"
|
||||
c.content.javascript.enabled = False
|
||||
c.content.notifications.enabled = False
|
||||
c.content.cookies.accept = "never"
|
||||
c.content.private_browsing = False
|
||||
|
||||
##-- AdBLock Settings --##
|
||||
c.content.blocking.method = "both"
|
||||
c.content.blocking.adblock.lists = [
|
||||
"https://easylist.to/easylist/easylist.txt",
|
||||
"https://easylist.to/easylist/easyprivacy.txt",
|
||||
"https://secure.fanboy.co.nz/fanboy-annoyance.txt",
|
||||
"https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt",
|
||||
"https://www.i-dont-care-about-cookies.eu/abp/",
|
||||
]
|
||||
|
||||
|
||||
# History disable
|
||||
c.completion.web_history.max_items = 0
|
||||
c.completion.cmd_history_max_items = 0
|
||||
@ -88,22 +105,53 @@ c.aliases["buku"] = "spawn --userscript buku"
|
||||
|
||||
##-- Bindings --##
|
||||
# launch with mpv
|
||||
config.bind(",m", "spawn mpv {url}")
|
||||
config.bind(",M", "hint links spawn mpv {hint-url}")
|
||||
config.bind("<Space>m", "spawn mpv {url}")
|
||||
config.bind("<Space>fm", "hint links spawn mpv {hint-url}")
|
||||
|
||||
# buku bundings
|
||||
config.bind("b", "buku open")
|
||||
config.bind(",ba", "buku add")
|
||||
config.bind(",be", "buku edit")
|
||||
config.bind(",bd", "buku delete")
|
||||
config.bind("<Space>ba", "buku add")
|
||||
config.bind("<Space>be", "buku edit")
|
||||
config.bind("<Space>bd", "buku delete")
|
||||
|
||||
# yt-dlp
|
||||
config.bind(",y", "spawn --userscript yt-dlp")
|
||||
config.bind(",Y", "hint links userscript yt-dlp")
|
||||
config.bind("<Space>y", "spawn --userscript yt-dlp")
|
||||
config.bind("<Space>fy", "hint links userscript yt-dlp")
|
||||
|
||||
# search current selection
|
||||
config.bind(",f", "open {primary}")
|
||||
config.bind(",F", "open --tab {primary}")
|
||||
config.bind("<Space>f", "open {primary}")
|
||||
config.bind("<Space>F", "open --tab {primary}")
|
||||
|
||||
# yank found url
|
||||
config.bind("yf", "hint links yank")
|
||||
|
||||
# fix escape
|
||||
config.bind(
|
||||
"<Escape>", "mode-leave ;; jseval -q document.activeElement.blur()", mode="insert"
|
||||
)
|
||||
|
||||
# fix scrolling
|
||||
config.bind("j", "jseval --quiet scrollHelper.scrollBy(200)")
|
||||
config.bind("k", "jseval --quiet scrollHelper.scrollBy(-200)")
|
||||
config.bind("<Ctrl-D>", "jseval --quiet scrollHelper.scrollPage(0.8)")
|
||||
config.bind("<Ctrl-U>", "jseval --quiet scrollHelper.scrollPage(-0.8)")
|
||||
config.bind("gg", "jseval --quiet scrollHelper.scrollTo(0)")
|
||||
config.bind("G", "jseval --quiet scrollHelper.scrollToPercent(100)")
|
||||
|
||||
# remove clickbard and gdpr banners
|
||||
config.bind(
|
||||
"ek",
|
||||
"jseval (function () { "
|
||||
+ ' var i, elements = document.querySelectorAll("body *");'
|
||||
+ ""
|
||||
+ " for (i = 0; i < elements.length; i++) {"
|
||||
+ " var pos = getComputedStyle(elements[i]).position;"
|
||||
+ ' if (pos === "fixed" || pos == "sticky") {'
|
||||
+ " elements[i].parentNode.removeChild(elements[i]);"
|
||||
+ " }"
|
||||
+ " }"
|
||||
+ "})();",
|
||||
)
|
||||
|
||||
##-- Font Settings --##
|
||||
c.fonts.default_family = '"Source Code Pro"'
|
||||
|
Loading…
Reference in New Issue
Block a user