Update configuration file for latest Qutebrowser version

This commit is contained in:
Lucien Cartier-Tilet 2021-11-18 17:39:00 +01:00
parent 94a8cb1fce
commit f193cb134a
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
5 changed files with 98 additions and 11 deletions

View File

@ -1,6 +1,7 @@
MIT License
Copyright (c) 2018 Linus Marton
Copyright (c) 2021 Lucien “Phundrak” Cartier-Tilet
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,11 +0,0 @@
# Nord Qutebrowser Theme
A theme for [Qutebrowser](https://qutebrowser.org) based on the [Nord](https://github.com/arcticicestudio/nord) theme.
![Screenshot](https://raw.githubusercontent.com/Linuus/nord-qutebrowser/master/screenshot.png "Screenshot")
## Install
1. Clone this repo or copy `nord-qutebrowser.py`.
2. Symlink (or just copy) the file `nord-qutebrowser.py` to your `.qutebrowser` directory.
3. Add `config.source('nord-qutebrowser.py')` at the _end_ of your `config.py` file.

26
README.org Normal file
View File

@ -0,0 +1,26 @@
#+title: Nord Theme for Qutebrowser
A simple Nord theme for Qutebrowser.
* Install
Clone this repository wherever you whish. I generally use the directory ~~/fromGIT~.
#+begin_src sh
git clone https://labs.phundrak.com/phundrak/qutebrowser-nord.git # HTTPS clone
git clone git@labs.phundrak.com:phundrak/qutebrowser-nord.git # SSH clone
#+end_src
You can then symlink ~nord-qutebrowser.py~ in ~~/.config/qutebrowser~ like so:
#+begin_src sh
# assuming you cd'd in the cloned repository
ln -s nord-qutebrowser.py ~/.config/qutebrowser/nord-qutebrowser.py
#+end_src
Finally, add the following line at the end of your ~config.py~ file.
#+begin_src python
config.source('nord-qutebrowser.py')
#+end_src
And you should be good to go!
* Acknowlegements
This project is a fork of Linuus theme you can find [[https://github.com/Linuus/nord-qutebrowser][here]].

View File

@ -439,3 +439,74 @@ c.colors.webpage.darkmode.algorithm = 'lightness-cielab'
# `brightness-rgb`.
# Type: Float
c.colors.webpage.darkmode.contrast = 0.0
# Render all web contents using a dark theme. Example configurations
# from Chromium's `chrome://flags`: - "With simple HSL/CIELAB/RGB-based
# inversion": Set `colors.webpage.darkmode.algorithm` accordingly. -
# "With selective image inversion": Set
# `colors.webpage.darkmode.policy.images` to `smart`. - "With selective
# inversion of non-image elements": Set
# `colors.webpage.darkmode.threshold.text` to 150 and
# `colors.webpage.darkmode.threshold.background` to 205. - "With
# selective inversion of everything": Combines the two variants above.
# Type: Bool
c.colors.webpage.darkmode.enabled = False
# Render all colors as grayscale. This only has an effect when
# `colors.webpage.darkmode.algorithm` is set to `lightness-hsl` or
# `brightness-rgb`.
# Type: Bool
c.colors.webpage.darkmode.grayscale.all = False
# Desaturation factor for images in dark mode. If set to 0, images are
# left as-is. If set to 1, images are completely grayscale. Values
# between 0 and 1 desaturate the colors accordingly.
# Type: Float
c.colors.webpage.darkmode.grayscale.images = 0.0
# Which images to apply dark mode to. With QtWebEngine 5.15.0, this
# setting can cause frequent renderer process crashes due to a
# https://codereview.qt-project.org/c/qt/qtwebengine-
# chromium/+/304211[bug in Qt].
# Type: String
# Valid values:
# - always: Apply dark mode filter to all images.
# - never: Never apply dark mode filter to any images.
# - smart: Apply dark mode based on image content. Not available with Qt 5.15.0.
c.colors.webpage.darkmode.policy.images = 'smart'
# Which pages to apply dark mode to. The underlying Chromium setting has
# been removed in QtWebEngine 5.15.3, thus this setting is ignored
# there. Instead, every element is now classified individually.
# Type: String
# Valid values:
# - always: Apply dark mode filter to all frames, regardless of content.
# - smart: Apply dark mode filter to frames based on background color.
c.colors.webpage.darkmode.policy.page = 'smart'
# Threshold for inverting background elements with dark mode. Background
# elements with brightness above this threshold will be inverted, and
# below it will be left as in the original, non-dark-mode page. Set to
# 256 to never invert the color or to 0 to always invert it. Note: This
# behavior is the opposite of `colors.webpage.darkmode.threshold.text`!
# Type: Int
c.colors.webpage.darkmode.threshold.background = 0
# Threshold for inverting text with dark mode. Text colors with
# brightness below this threshold will be inverted, and above it will be
# left as in the original, non-dark-mode page. Set to 256 to always
# invert text color or to 0 to never invert text color.
# Type: Int
c.colors.webpage.darkmode.threshold.text = 256
# Value to use for `prefers-color-scheme:` for websites. The "light"
# value is only available with QtWebEngine 5.15.2+. On older versions,
# it is the same as "auto". The "auto" value is broken on QtWebEngine
# 5.15.2 due to a Qt bug. There, it will fall back to "light"
# unconditionally.
# Type: String
# Valid values:
# - auto: Use the system-wide color scheme setting.
# - light: Force a light theme.
# - dark: Force a dark theme.
c.colors.webpage.preferred_color_scheme = 'auto'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB