qutebrowser: use catppuccin mocha theme
This commit is contained in:
parent
35de512300
commit
7010e44c54
@ -2,7 +2,11 @@
|
|||||||
# pyflakes: noqa
|
# pyflakes: noqa
|
||||||
from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
|
from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
|
||||||
from qutebrowser.config.config import ConfigContainer # noqa: F401
|
from qutebrowser.config.config import ConfigContainer # noqa: F401
|
||||||
import dracula.draw
|
# import dracula.draw
|
||||||
|
|
||||||
|
import os
|
||||||
|
from urllib.request import urlopen
|
||||||
|
|
||||||
config: ConfigAPI = config # noqa: F821 pylint: disable=E0602,C0103
|
config: ConfigAPI = config # noqa: F821 pylint: disable=E0602,C0103
|
||||||
c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103
|
c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103
|
||||||
# ref: https://www.qutebrowser.org/doc/help/configuring.html
|
# ref: https://www.qutebrowser.org/doc/help/configuring.html
|
||||||
@ -23,6 +27,18 @@ c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103
|
|||||||
# autoconfig.yml
|
# autoconfig.yml
|
||||||
config.load_autoconfig(False)
|
config.load_autoconfig(False)
|
||||||
|
|
||||||
|
|
||||||
|
if not os.path.exists(config.configdir / "theme.py"):
|
||||||
|
theme = "https://raw.githubusercontent.com/catppuccin/qutebrowser/main/setup.py"
|
||||||
|
with urlopen(theme) as themehtml:
|
||||||
|
with open(config.configdir / "theme.py", "a") as file:
|
||||||
|
file.writelines(themehtml.read().decode("utf-8"))
|
||||||
|
|
||||||
|
if os.path.exists(config.configdir / "theme.py"):
|
||||||
|
import theme
|
||||||
|
theme.setup(c, 'mocha', True)
|
||||||
|
|
||||||
|
|
||||||
# Aliases for commands. The keys of the given dictionary are the
|
# Aliases for commands. The keys of the given dictionary are the
|
||||||
# aliases, while the values are the commands they map to.
|
# aliases, while the values are the commands they map to.
|
||||||
# Type: Dict
|
# Type: Dict
|
||||||
@ -408,10 +424,10 @@ config.bind('<Ctrl-->', 'zoom-out')
|
|||||||
config.bind(',sm', 'set-cmd-text :download --mhtml')
|
config.bind(',sm', 'set-cmd-text :download --mhtml')
|
||||||
|
|
||||||
|
|
||||||
dracula.draw.blood(c, {
|
#dracula.draw.blood(c, {
|
||||||
'spacing': {
|
# 'spacing': {
|
||||||
# set to zero to not alter the default tab sizes
|
# # set to zero to not alter the default tab sizes
|
||||||
'vertical': 0,
|
# 'vertical': 0,
|
||||||
'horizontal': 0
|
# 'horizontal': 0
|
||||||
}
|
# }
|
||||||
})
|
#})
|
||||||
|
Loading…
Reference in New Issue
Block a user