2019-05-22 17:58:30 +00:00
|
|
|
import os
|
|
|
|
|
2020-07-08 07:52:14 +00:00
|
|
|
from qutebrowser.config.config import ConfigContainer # noqa: F401
|
|
|
|
from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
|
|
|
|
|
2019-05-16 12:25:19 +00:00
|
|
|
# Autogenerated config.py
|
|
|
|
# Documentation:
|
|
|
|
# qute://help/configuring.html
|
|
|
|
# qute://help/settings.html
|
|
|
|
|
2020-06-15 19:07:21 +00:00
|
|
|
# load additional settings configured via autoconfig.yml
|
2019-05-22 17:58:30 +00:00
|
|
|
config.load_autoconfig()
|
2019-05-16 12:25:19 +00:00
|
|
|
|
kitty: Switch to kitty terminal emulator
Finally made the switch from alacritty to kitty. I have been thinking
about this for a while. Both, fundamentally, serve my purposes just
fine. Both are fast, customizable, gpu accelerated, and so on.
Kitty feels a little faster on the input, but this should not provide
major differences.
One big difference, however, is now very apparent and I can feel it:
Alacritty, on wayland, does not support any picture preview. It does not
support sixel, and things like w3mimg or ueberzug are based on and
require X11 to run.
Kitty brings its own graphics display library and it seems both pretty
stable and fast.
I have not done much more with it than use it in things like vifm image
previews but it should be much more stable than things like ueberzug,
much faster than things like sixel. Time will tell.
Switched other modules to make use of kitty instead of alacritty:
vifm uses kitty previews,
river spawns kitty instances,
systemd units use kitty instances,
waybar presents extra mouse-click interactions through kitty,
and styler contains a processor to style kitty permanently.
I would love to converge this all a bit more on the `$TERMINAL` env var,
but this is unfortunately difficult for things like systemd and waybar.
For waybar I currently see no real way except for a custom
`ideal-terminal` script which just goes down the list of terminal
emulators I want to run, depending on which is installed,
since it does not read env vars,
while for systemd it might be feasible to import user environment
variables,
but also connected to additional complexity and overhead which it does
not seem worth for the currently two simple service units it affects.
Also removed some obsolete sxhkd and sh settings from the move to
wayland.
2022-01-16 14:18:07 +00:00
|
|
|
term = os.getenv("TERMINAL", "xterm")
|
|
|
|
|
2019-08-06 07:25:57 +00:00
|
|
|
c.completion.web_history.max_items = 1000
|
|
|
|
c.hints.uppercase = True
|
2021-04-22 09:07:49 +00:00
|
|
|
c.editor.command = [
|
kitty: Switch to kitty terminal emulator
Finally made the switch from alacritty to kitty. I have been thinking
about this for a while. Both, fundamentally, serve my purposes just
fine. Both are fast, customizable, gpu accelerated, and so on.
Kitty feels a little faster on the input, but this should not provide
major differences.
One big difference, however, is now very apparent and I can feel it:
Alacritty, on wayland, does not support any picture preview. It does not
support sixel, and things like w3mimg or ueberzug are based on and
require X11 to run.
Kitty brings its own graphics display library and it seems both pretty
stable and fast.
I have not done much more with it than use it in things like vifm image
previews but it should be much more stable than things like ueberzug,
much faster than things like sixel. Time will tell.
Switched other modules to make use of kitty instead of alacritty:
vifm uses kitty previews,
river spawns kitty instances,
systemd units use kitty instances,
waybar presents extra mouse-click interactions through kitty,
and styler contains a processor to style kitty permanently.
I would love to converge this all a bit more on the `$TERMINAL` env var,
but this is unfortunately difficult for things like systemd and waybar.
For waybar I currently see no real way except for a custom
`ideal-terminal` script which just goes down the list of terminal
emulators I want to run, depending on which is installed,
since it does not read env vars,
while for systemd it might be feasible to import user environment
variables,
but also connected to additional complexity and overhead which it does
not seem worth for the currently two simple service units it affects.
Also removed some obsolete sxhkd and sh settings from the move to
wayland.
2022-01-16 14:18:07 +00:00
|
|
|
term,
|
2022-11-16 17:28:33 +00:00
|
|
|
"start",
|
2023-03-09 20:17:24 +00:00
|
|
|
"--always-new-process",
|
2021-04-22 09:07:49 +00:00
|
|
|
"nvim",
|
|
|
|
"-f",
|
|
|
|
"{file}",
|
|
|
|
"-c",
|
|
|
|
"normal {line}G{column0}l",
|
|
|
|
]
|
|
|
|
|
|
|
|
# change filepicker
|
|
|
|
c.fileselect.handler = "external"
|
|
|
|
picker = [
|
kitty: Switch to kitty terminal emulator
Finally made the switch from alacritty to kitty. I have been thinking
about this for a while. Both, fundamentally, serve my purposes just
fine. Both are fast, customizable, gpu accelerated, and so on.
Kitty feels a little faster on the input, but this should not provide
major differences.
One big difference, however, is now very apparent and I can feel it:
Alacritty, on wayland, does not support any picture preview. It does not
support sixel, and things like w3mimg or ueberzug are based on and
require X11 to run.
Kitty brings its own graphics display library and it seems both pretty
stable and fast.
I have not done much more with it than use it in things like vifm image
previews but it should be much more stable than things like ueberzug,
much faster than things like sixel. Time will tell.
Switched other modules to make use of kitty instead of alacritty:
vifm uses kitty previews,
river spawns kitty instances,
systemd units use kitty instances,
waybar presents extra mouse-click interactions through kitty,
and styler contains a processor to style kitty permanently.
I would love to converge this all a bit more on the `$TERMINAL` env var,
but this is unfortunately difficult for things like systemd and waybar.
For waybar I currently see no real way except for a custom
`ideal-terminal` script which just goes down the list of terminal
emulators I want to run, depending on which is installed,
since it does not read env vars,
while for systemd it might be feasible to import user environment
variables,
but also connected to additional complexity and overhead which it does
not seem worth for the currently two simple service units it affects.
Also removed some obsolete sxhkd and sh settings from the move to
wayland.
2022-01-16 14:18:07 +00:00
|
|
|
term,
|
2022-11-16 17:28:33 +00:00
|
|
|
"start",
|
2021-04-22 09:07:49 +00:00
|
|
|
"--class",
|
2021-11-27 14:52:54 +00:00
|
|
|
"float",
|
2021-04-22 09:07:49 +00:00
|
|
|
"vifm",
|
|
|
|
"--choose-files",
|
|
|
|
"{}",
|
|
|
|
]
|
|
|
|
c.fileselect.single_file.command = picker
|
|
|
|
c.fileselect.multiple_files.command = picker
|
2019-05-16 14:14:09 +00:00
|
|
|
|
2021-04-22 09:07:49 +00:00
|
|
|
c.downloads.location.directory = os.getenv("XDG_DOWNLOAD_DIR", "~/downloads")
|
|
|
|
c.downloads.location.prompt = False
|
|
|
|
|
|
|
|
config.source("alias.py")
|
qutebrowser: Add proxying support for websites
Added automatic proxying to floss alternative frontends for proprietary
websites like reddit (teddit), youtube (invidious), twitter (nitter),
and instagram (bibliogram).
Often does not work on calling cached websites, meaning when it does not
load the correct page a full reload (shift-R) should call up the correct
frontend on first use of a previously visited page.
Squashed commit of the following:
commit ccf5a9f9a001c466e4fe00763f561d09a598bd70
Author: Marty Oehme <marty.oehme@gmail.com>
Date: Wed Jul 28 10:05:37 2021 +0200
qutebrowser: Add LocalLeader key concept
Added differentiation between leader mappings and local leader mappings,
with a similar idea to vim:
leader mappings enact changes within qutebrowser on a more general level
(currently e.g. changing tab display, javascript switch, stylesheet
setting) while
local leader mappings enact changes or interact with the current page
context
(e.g. start mpv stream, display in readability mode, download pdf
version of page, and so on).
This will be hard for my muscle memory, but I think such a switch
benefits logical action separation in the long run, especially in case I
add more action shortcuts over time.
An interesting thing this separation also allows is a more
buffer-specific action repertoire (for example through recognition of
current page context with interceptors) so specific pages contain
different actions.
commit afbe573d527b70fa57d643ede78cd5e71f3ca4c1
Author: Marty Oehme <marty.oehme@gmail.com>
Date: Tue Jul 27 16:00:37 2021 +0200
qutebrowser: Rename key mapping file
Renamed from `keys.py` to `maps.py` to keep some coherence with nvim
naming scheme.
commit cc78cbb67953bba7ab4d5a6dd48dfa50fbcfe2fc
Author: Marty Oehme <marty.oehme@gmail.com>
Date: Tue Jul 27 10:19:34 2021 +0200
qutebrowser: Add reddit redirection
Added redirection to old.reddit whenever a link on reddit is opened.
Added redirection of youtube links to yewtu.be invidious instance.
2021-08-18 20:28:50 +00:00
|
|
|
config.source("maps.py")
|
2021-04-22 09:07:49 +00:00
|
|
|
config.source("content.py")
|
2023-01-16 16:36:14 +00:00
|
|
|
config.source("searchengines.py")
|
|
|
|
config.source("redirects.py")
|
2019-05-16 14:14:09 +00:00
|
|
|
|
2019-05-22 17:58:30 +00:00
|
|
|
# Tab-Bar
|
2019-05-16 14:14:09 +00:00
|
|
|
# have tab bar on the right, not on the top
|
2019-08-06 07:25:57 +00:00
|
|
|
c.tabs.background = True
|
2020-07-08 07:52:14 +00:00
|
|
|
c.tabs.title.format = "{index} {audio}{perc}{current_title}"
|
2019-05-16 14:14:09 +00:00
|
|
|
c.tabs.position = "right"
|
2019-05-22 17:58:30 +00:00
|
|
|
c.tabs.width = "15%"
|
2022-06-12 14:09:35 +00:00
|
|
|
c.tabs.show = "multiple"
|
2023-10-02 17:12:56 +00:00
|
|
|
c.tabs.show_switching_delay = 2000
|
2022-06-12 14:09:35 +00:00
|
|
|
c.statusbar.show = "always"
|
2019-05-22 17:58:30 +00:00
|
|
|
|
2020-06-15 19:07:21 +00:00
|
|
|
c.colors.webpage.bg = "#555555"
|
|
|
|
|
2019-05-22 17:58:30 +00:00
|
|
|
# Prevents *all* tabs from being loaded on restore, only loads on activating them
|
|
|
|
c.session.lazy_restore = True
|
|
|
|
|
2021-04-22 09:07:49 +00:00
|
|
|
# for code_select.py userscript
|
|
|
|
# Allows copying code sections to clipboard easily
|
|
|
|
c.hints.selectors["code"] = [
|
|
|
|
# Selects all code tags whose direct parent is not a pre tag
|
|
|
|
":not(pre) > code",
|
|
|
|
"pre",
|
2021-04-21 09:12:34 +00:00
|
|
|
]
|
|
|
|
|
2021-03-16 13:37:38 +00:00
|
|
|
# give the browser nice theme colors
|
2023-03-03 17:48:55 +00:00
|
|
|
state_dir=os.environ.get('XDG_STATE_HOME', f"{os.environ['HOME']}/.local/state")
|
|
|
|
colorscheme=f"{state_dir}/qutebrowser/colorscheme.py"
|
|
|
|
if os.path.isfile(colorscheme):
|
|
|
|
config.source(colorscheme)
|