From 30c436b7f35133c808eb34e9425e6df592f2a027 Mon Sep 17 00:00:00 2001 From: davidpkj Date: Sun, 27 Aug 2023 16:32:21 +0200 Subject: Update to current general style --- qutebrowser/.config/qutebrowser/config.py | 23 +++++++- qutebrowser/.config/qutebrowser/home.html | 90 +++++++++++++++++++++++++++---- qutebrowser/.config/qutebrowser/utils.py | 22 ++++++-- 3 files changed, 120 insertions(+), 15 deletions(-) (limited to 'qutebrowser') diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index 9f27302..c097087 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -1,7 +1,17 @@ config.load_autoconfig(False) +config.bind("", "tab-next") +config.bind("", "tab-prev") + from utils import * +command = ["xterm", "-fa", "JetBrainsMono", "-fs", "8", "-e", "ranger", "--choosefile={}"] + +c.fileselect.handler = "external" +c.fileselect.multiple_files.command = command +c.fileselect.single_file.command = command +c.fileselect.folder.command = command + c.content.autoplay = False c.zoom.default = "100%" @@ -25,8 +35,6 @@ c.content.blocking.method = "adblock" c.qt.highdpi = True c.qt.force_software_rendering = "chromium" -c.colors.webpage.preferred_color_scheme = "dark" - home = "/home/me/.config/qutebrowser/home.html" c.url.start_pages = home @@ -91,3 +99,14 @@ c.colors.messages.info.border = background c.colors.messages.warning.bg = background c.colors.messages.warning.fg = foreground c.colors.messages.warning.border = background + +c.colors.webpage.preferred_color_scheme = "dark" +# c.colors.webpage.darkmode.algorithm = 'lightness-cielab' +# c.colors.webpage.darkmode.contrast = 0.0 +# c.colors.webpage.darkmode.enabled = True +# c.colors.webpage.darkmode.grayscale.all = False +# c.colors.webpage.darkmode.grayscale.images = 0.0 +# c.colors.webpage.darkmode.policy.images = 'smart' +# c.colors.webpage.darkmode.policy.page = 'smart' +# c.colors.webpage.darkmode.threshold.background = 128 +# c.colors.webpage.darkmode.threshold.text = 128 diff --git a/qutebrowser/.config/qutebrowser/home.html b/qutebrowser/.config/qutebrowser/home.html index e82a054..f6b4306 100644 --- a/qutebrowser/.config/qutebrowser/home.html +++ b/qutebrowser/.config/qutebrowser/home.html @@ -18,9 +18,14 @@ } a { - text-decoration: none; - color: var(--color1); + outline: none; + color: var(--color4); padding-right: 0.5em; + text-decoration: none; + } + + a:hover, a:focus { + color: var(--color12); } .terminal { @@ -33,18 +38,85 @@ bottom: 0; right: 4em; } + + .list { + display: flex; + } + + .list a { + margin-right: 1em; + } + + .group { + display: flex; + + padding-bottom: 1em; + flex-direction: column; + } + + .group a::before { + content: "├ "; + color: var(--foreground); + } + + .group a:last-child::before { + content: "└ "; + color: var(--foreground); + } + + .group::before { + content: attr(data-title); + padding-bottom: 2px; + } + + .noselect { + user-select: none; + }
-

[ me@qutebrowser ] ~ $ ls

+

[ me@qutebrowser ] ~ $ quickmarks

- qmoodle - qmusic - qchat - qrmfc - qweb - qgit +

diff --git a/qutebrowser/.config/qutebrowser/utils.py b/qutebrowser/.config/qutebrowser/utils.py index 790bea2..c0247c2 100644 --- a/qutebrowser/.config/qutebrowser/utils.py +++ b/qutebrowser/.config/qutebrowser/utils.py @@ -1,4 +1,18 @@ -translucent = "#801a1a1a" -background = "#1a1a1a" -foreground = "#bcd0db" -accent = "#a642c0" +import subprocess + +def read_xresources(prefix): + props = {} + x = subprocess.run(['xrdb', '-query'], stdout=subprocess.PIPE) + lines = x.stdout.decode().split('\n') + for line in filter(lambda l : l.startswith(prefix), lines): + prop, _, value = line.partition(':\t') + props[prop] = value + return props + +xres = read_xresources('*') +# can be userd now like `c.colors.statusbar.normal.bg = xres['*.background']` + +translucent = "#80" + xres['*background'].split('#')[1] +background = xres['*background'] +foreground = xres['*foreground'] +accent = xres['*primary'] -- cgit v1.2.3