2024-04-11 11:35:18 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (config.xdg.userDirs) download;
|
|
|
|
in
|
2023-06-22 17:13:46 +02:00
|
|
|
{
|
2023-06-16 13:23:35 +02:00
|
|
|
programs.qutebrowser = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
confirm_quit = [
|
|
|
|
"multiple-tabs"
|
|
|
|
"downloads"
|
|
|
|
];
|
|
|
|
|
|
|
|
session.lazy_restore = true;
|
|
|
|
|
|
|
|
tabs = {
|
|
|
|
show = "multiple";
|
|
|
|
mousewheel_switching = false;
|
|
|
|
last_close = "close";
|
|
|
|
new_position.unrelated = "next";
|
2023-05-26 17:01:47 +02:00
|
|
|
};
|
2023-06-16 13:23:35 +02:00
|
|
|
|
|
|
|
content = {
|
|
|
|
persistent_storage = true;
|
|
|
|
notifications.enabled = true;
|
|
|
|
register_protocol_handler = true;
|
|
|
|
mute = true;
|
|
|
|
headers.accept_language = "ja,en-US;q=0.9,en;q=0.8";
|
|
|
|
};
|
|
|
|
|
|
|
|
fileselect = {
|
|
|
|
handler = "external";
|
2024-03-30 22:47:32 +01:00
|
|
|
folder.command = [ "kitty" "-e" "yazi" "--cwd-file" "{}" ];
|
|
|
|
multiple_files.command = [ "kitty" "-e" "yazi" "--chooser-file" "{}" ];
|
|
|
|
single_file.command = [ "kitty" "-e" "yazi" "--chooser-file" "{}" ];
|
2023-06-16 13:23:35 +02:00
|
|
|
};
|
|
|
|
|
2023-06-24 03:08:55 +02:00
|
|
|
downloads = {
|
2024-04-11 11:35:18 +02:00
|
|
|
location.directory = download;
|
2023-06-24 03:08:55 +02:00
|
|
|
location.prompt = false;
|
|
|
|
position = "bottom";
|
|
|
|
remove_finished = 5000;
|
|
|
|
};
|
|
|
|
|
|
|
|
qt = {
|
|
|
|
args = [ "disable-backing-store-limit" "enable-accelerated-video-decode" "disable-gpu-driver-bug-workarounds" ];
|
|
|
|
chromium.low_end_device_mode = "never";
|
|
|
|
};
|
|
|
|
|
2023-06-16 13:23:35 +02:00
|
|
|
editor.command = [ "kitty" "-e" "nvim" "{}" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
keyBindings = {
|
|
|
|
normal = {
|
|
|
|
d = "scroll-page 0 0.5";
|
|
|
|
u = "scroll-page 0 -0.5";
|
|
|
|
D = "scroll-page 0 0.5";
|
|
|
|
U = "scroll-page 0 -0.5";
|
|
|
|
"<Alt+Left>" = "back";
|
|
|
|
"<Alt+Right>" = "forward";
|
|
|
|
"<Ctrl+Shift+Tab>" = "tab-prev";
|
|
|
|
"<Ctrl+Tab>" = "tab-next";
|
|
|
|
J = "tab-prev";
|
|
|
|
K = "tab-next";
|
|
|
|
"<F12>" = "devtools";
|
|
|
|
zb = "bookmark-del";
|
|
|
|
x = "tab-close";
|
|
|
|
X = "undo";
|
|
|
|
st = "config-cycle tabs.show multiple switching";
|
|
|
|
sTh = "set tabs.position left";
|
|
|
|
sTj = "set tabs.position bottom";
|
|
|
|
sTk = "set tabs.position top";
|
|
|
|
sTl = "set tabs.position right";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
extraConfig = /* python */ ''
|
|
|
|
from qutebrowser.mainwindow import tabwidget
|
2024-04-07 16:23:09 +02:00
|
|
|
|
2023-06-16 13:23:35 +02:00
|
|
|
tabwidget.TabWidget.MUTE_STRING = ""
|
|
|
|
tabwidget.TabWidget.AUDIBLE_STRING = "[A]"
|
|
|
|
|
|
|
|
c.colors.contextmenu.disabled.fg = '#808080'
|
|
|
|
c.colors.contextmenu.menu.bg = '#353535'
|
|
|
|
c.colors.contextmenu.menu.fg = '#ffffff'
|
|
|
|
c.colors.contextmenu.selected.bg = '#909090'
|
|
|
|
|
2024-01-08 00:45:26 +01:00
|
|
|
c.colors.webpage.darkmode.enabled = False
|
|
|
|
|
2023-06-16 13:23:35 +02:00
|
|
|
config.unbind('pp', mode='normal')
|
|
|
|
config.unbind('pP', mode='normal')
|
|
|
|
config.unbind('Pp', mode='normal')
|
|
|
|
config.unbind('PP', mode='normal')
|
|
|
|
config.unbind('wp', mode='normal')
|
|
|
|
config.unbind('wP', mode='normal')
|
|
|
|
|
|
|
|
config.bind('zl', 'spawn --userscript qute-pass')
|
|
|
|
config.bind('zpl', 'spawn --userscript qute-pass --password-only')
|
|
|
|
config.bind('zol', 'spawn --userscript qute-pass --otp-only')
|
|
|
|
|
|
|
|
config.bind('zM', 'spawn mpv --force-window=immediate {url}')
|
|
|
|
config.bind('zm', 'hint links spawn mpv --force-window=immediate {hint-url}')
|
|
|
|
|
|
|
|
c.url.start_pages = ['about:blank']
|
|
|
|
c.url.default_page = "about:blank"
|
|
|
|
c.url.searchengines = {
|
|
|
|
'DEFAULT': 'https://search.goo.ne.jp/web.jsp?MT={}'
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
2023-05-16 23:09:05 +02:00
|
|
|
}
|