Gentoo Archives: gentoo-user

From: Caveman Al Toraboran <toraboracaveman@××××××××××.com>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] tuning desktop appearance for legibility
Date: Thu, 03 Sep 2020 20:07:06
Message-Id: FSNTDqcUEhqGHqJp_fN9R-oCHEK1HQMKiEzRg1vhPxH3TOO-HAxuyIO2QJ-TRNjQiMQgE_RhKq4NllpK_2mVaQ1tQQM6x7p8HgnVGrwxxQo=@protonmail.com
In Reply to: Re: [gentoo-user] tuning desktop appearance for legibility by John Blinka
1 ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
2 On Thursday, September 3, 2020 11:19 PM, John Blinka <john.blinka@×××××.com> wrote:
3
4 > Could you elaborate on this?  Don’t know css, but could pick it up.  I’m
5 > assuming that web pages already contain css code to direct their
6 > appearance. 
7
8 yes.
9
10 > So you apparently have some alternate appearance you prefer,
11 > with your own alternate coding, and you somehow tell the browser to use
12 > yours instead.  Am I anywhere close to getting the broad outlines of the
13 > process correct? 
14
15 correct. we basically create a custom css
16 file, with colors defined for various html
17 tags/elements as per our preference.
18
19 we then hand the browser that css file, and tell
20 it "after you load the site, add our custom css,
21 and overwrite whatever the site originally
22 wanted".
23
24 the way to do this, we add "!important" in our new
25 css. "!important" will make the overwrite.
26 here is an example of such css with "!important":
27
28 https://github.com/alphapapa/solarized-everything-css/blob/master/css/solarized-dark/solarized-dark-all-sites.css
29
30 this is how i look at it. maybe some gurus can
31 further elaborate on this with better technical
32 correctness.
33
34
35 > If so, how does this intercept and substitute process
36 > work?  (I see you provide a link below, but it doesn’t work here...)
37
38 with firefox/chrome there is "stylish"
39 plugin/add-on. i don't know how it is today, of
40 if there is any better ones. i used to use them
41 several years in the past. you basically select
42 the css you want to use to overwrite site's css.
43
44 with qutebrowser, i added these in my config.py
45 file:
46
47 c.aliases['style-none'] = 'config-unset -t content.user_stylesheets'
48 c.aliases['style-night'] = 'set -t content.user_stylesheets night.css'
49 c.aliases['style-wiki'] = 'set -t content.user_stylesheets wiki.css'
50
51 where "night.css" and "wiki.css" are names of user
52 style sheets that i downloaded from the web
53
54 here "style-none", "style-night", ..., are nothing
55 but commands in qutebrowser, that you execute by
56 typing ":COMMAND". so if i want to activate night
57 mode, i type ":style-night" without double quotes,
58 then the whole thing becomes dark bg with white
59 fg. of course qutebrowser has tab completion, so
60 i don't need to type full thing. e.g. usually i
61 just type ":sty<tab><tab>..." until i pick one i
62 want.
63
64 of course you can add as many as you want.
65 since different ones work better for different
66 sites.
67
68 there, i added "style-wiki" that's specifically
69 made for wikipedia. i got it from userstyles.org
70 years ago before it was so slow.
71
72
73 > Not promising.  The page doesn’t load except for a rotating colorwheel in
74 > the center followed by a 504 gateway timeout.  Will try again later.
75
76 yes. sadly https://userstyles.org/ is now too
77 slow and doomed with excess javascript. it was
78 not like this some years ago.
79
80 either way, you can obtain those css files by
81 other means (not limited to userstyles.org). e.g.
82 google for them around, or even make your own.

Replies

Subject Author
Re: [gentoo-user] tuning desktop appearance for legibility Caveman Al Toraboran <toraboracaveman@××××××××××.com>