From c1a303f85255dd2a1c27c8aa8e1d5ccdf1c87e68 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Thu, 9 Nov 2023 11:48:26 -0600 Subject: [PATCH] home | enabled qutebrowser --- home/packages-gui.nix | 1 + home/qutebrowser.nix | 101 +++++++++++++++++++++++------------------- 2 files changed, 56 insertions(+), 46 deletions(-) diff --git a/home/packages-gui.nix b/home/packages-gui.nix index e3cfcee..701981d 100644 --- a/home/packages-gui.nix +++ b/home/packages-gui.nix @@ -8,6 +8,7 @@ ./kde.nix ./mpv.nix ./redshift.nix + ./qutebrowser.nix ./sway.nix ./terminals.nix ]; diff --git a/home/qutebrowser.nix b/home/qutebrowser.nix index bb50ab0..eb5b0a9 100644 --- a/home/qutebrowser.nix +++ b/home/qutebrowser.nix @@ -2,6 +2,7 @@ { programs.qutebrowser = { enable = true; + loadAutoconfig = true; keyBindings = { normal = { ",J" = "spawn /home/don/bin/vdi"; @@ -22,47 +23,58 @@ "xb" = "config-cycle statusbar.show always in-mode"; "xt" = "config-cycle tabs.show always switching"; "xx" = "config-cycle statusbar.show always in-mode ;; config-cycle tabs.show always switching"; - }l + }; }; searchEngines = { - w = "https://en.wikipedia.org/wiki/Special:Search?search={}&go=Go&ns0=1"; - aw = "https://wiki.archlinux.org/?search={}"; - nw = "https://nixos.wiki/index.php?search={}"; - g = "https://www.google.com/search?hl=en&q={}"; + w = "https://en.wikipedia.org/wiki/Special:Search?search={}&go=Go&ns0=1"; + aw = "https://wiki.archlinux.org/?search={}"; + nw = "https://nixos.wiki/index.php?search={}"; + g = "https://www.google.com/search?hl=en&q={}"; }; - settings = { - auto_save = { - session = true; - }; - bindings = { - key_mappings = {'': '', '': '', '': '', '': '', '': '', '': '', '': '', '': ''}; - }; + extraConfig = + '' + import dracula.draw + dracula.draw.blood(c, { + 'spacing': { + 'vertical': 6, + 'horizontal': 8 + } + }) + c.statusbar.padding = { 'top': 6, 'right': 8, 'bottom': 6, 'left': 8 } + c.tabs.padding = { 'top': 1, 'right': 8, 'bottom': 1, 'left': 8 } + #c.bindings = { key_mappings = ['': '' '': '' '': '' '': '' '': '' '': '' '': '' '': '']} + ''; + settings = { + auto_save = { + session = true; + }; + #}; colors = { webpage = { - bg = '#2d2d2d'; + bg = "#2d2d2d"; + preferred_color_scheme = "dark"; darkmode = { - algorithm = 'lightness-cielab'; + algorithm = "lightness-cielab"; enabled = true; policy = { - images = 'never'; - page = 'smart'; + images = "never"; + page = "smart"; }; threshold = { background = 128; text = 128; }; - preferred_color_scheme = 'dark'; }; }; }; completion = { - open_categories = ['quickmarks', 'searchengines', 'bookmarks', 'history']; + open_categories = ["quickmarks" "searchengines" "bookmarks" "history"]; }; content = { - autoplay = False; + autoplay = false; blocking = { adblock = { - lists = ['https://secure.fanboy.co.nz/fanboy-annoyance.txt','https://easylist.to/easylist/easylist.txt','https://easylist.to/easylist/easyprivacy.txt']; + lists = ["https://secure.fanboy.co.nz/fanboy-annoyance.txt" "https://easylist.to/easylist/easylist.txt" "https://easylist.to/easylist/easyprivacy.txt"]; }; enabled = true; }; @@ -72,49 +84,46 @@ }; fileselect = { folder = { - command = ['kitty', '-e', 'ranger', '--choosedir={}']; + command = ["kitty" "-e" "ranger" "--choosedir={}"]; }; - handler = 'external'; + handler = "external"; multiple_files = { - command = ['kitty', '-e', 'ranger', '--choosefile={}']; + command = ["kitty" "-e" "ranger" "--choosefile={}"]; }; single_file = { - command = ['kitty', '-e', 'ranger', '--choosefile={}']; + command = ["kitty" "-e" "ranger" "--choosefile={}"]; }; }; qt = { - args = ['widevine-path=/home/don/.config/qutebrowser/lib/libwidevinecdm.so']; + args = ["widevine-path=/home/don/.config/qutebrowser/lib/libwidevinecdm.so"]; workarounds = { remove_service_workers = true; }; }; spellcheck = { - languages = ['en-US']; + languages = ["en-US"]; }; statusbar = { - padding = {'top': 6, 'right': 8, 'bottom': 6, 'left': 8}; - statusbar = { - show = 'in-mode'; + show = "in-mode"; + }; + tabs = { + favicons = { + scale = 1; }; - tabs = { - favicons = { - scale = 1; - }; - indicator = { - width = 1; - }; - mode_on_change = 'restore'; - padding = {'top': 1, 'right': 8, 'bottom': 1, 'left': 8}; - position = 'bottom'; - select_on_remove = 'next'; - show = 'always'; - title = { - format = '{audio}{current_title}'; - }; + indicator = { + width = 1; }; - url = { - default_page = "about:blank"; + mode_on_change = "restore"; + position = "bottom"; + select_on_remove = "next"; + show = "always"; + title = { + format = "{audio}{current_title}"; }; }; + url = { + default_page = "about:blank"; + }; }; + }; }