Replace nyxt with qutebrowser as default for better performance

Keep nyxt around, will switch back when blink support is added (in
progress at the moment)

Update mime entries so qutebrowser is the default browser, also
rewrote slightly so avoid the massive repetition in there previously
This commit is contained in:
Evie Litherland-Smith 2024-02-01 07:24:18 +00:00
parent 5a55c815b1
commit 1d4b2e9366
2 changed files with 30 additions and 25 deletions

View file

@ -240,7 +240,8 @@
"SUPER, Return, exec, ${alacritty.package}/bin/alacritty"
"SUPER SHIFT, Return, exec, ${emacs.finalPackage}/bin/emacsclient -c"
"SUPER, S, exec, ${alacritty.package}/bin/alacritty -e btm --group --battery"
"SUPER, W, exec, ${pkgs.nyxt}/bin/nyxt --no-socket --with-file bookmarks=${../nyxt/bookmarks.lisp}"
# "SUPER, W, exec, ${pkgs.nyxt}/bin/nyxt --no-socket --with-file bookmarks=${../nyxt/bookmarks.lisp}"
"SUPER, W, exec, ${qutebrowser.package}/bin/qutebrowser"
# Misc useful binds
'',Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"''

View file

@ -37,32 +37,36 @@
initial_session = {inherit command;};
};
};
xdg.mime = rec {
enable = true;
defaultApplications = {
"application/pdf" = ["emacsclient.desktop" "emacs.desktop"];
"application/epub+zip" = ["emacsclient.desktop" "emacs.desktop"];
"application/oxps" = ["emacsclient.desktop" "emacs.desktop"];
"image/jpeg" = ["swayimg.desktop" "emacsclient.desktop" "emacs.desktop"];
"image/png" = ["swayimg.desktop" "emacsclient.desktop" "emacs.desktop"];
xdg.mime = let
emacs = ["emacsclient.desktop" "emacs.desktop"];
browser = ["org.qutebrowser.qutebrowser.desktop" "nyxt.desktop" "chromium-browser.desktop" "firefox.desktop"];
applications = {
"application/pdf" = emacs;
"application/epub+zip" = emacs;
"application/oxps" = emacs;
"image/jpeg" = ["swayimg.desktop"] ++ emacs;
"image/png" = ["swayimg.desktop"] ++ emacs;
"video/mp4" = ["mpv.desktop"];
"text/csv" = ["emacsclient.desktop" "emacs.desktop"];
"text/html" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/http" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/https" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/about" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/chrome" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/x-extension-htm" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/x-extension-html" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/x-extension-shtml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/xhtml+xml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/x-extension-xhtml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/x-extension-xht" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/x-mozilla-bookmarks" = ["firefox.desktop" "chromium-browser.desktop"];
"x-scheme-handler/msteams" = ["firefox.desktop" "chromium-browser.desktop"];
"x-scheme-handler/zoomus" = ["firefox.desktop" "chromium-browser.desktop"];
"text/csv" = emacs;
"text/html" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/chrome" = browser;
"x-scheme-handler/webcal" = browser;
"x-scheme-handler/unknown" = browser;
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/xhtml+xml" = browser;
"application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser;
"application/x-mozilla-bookmarks" = browser;
};
addedAssociations = defaultApplications;
in {
enable = true;
defaultApplications = applications;
addedAssociations = applications;
};
programs = {
dconf.enable = true;