pinwheel: Add ff-alex and use it as the default browser

This commit is contained in:
Alexander Heldt
2023-11-30 10:22:58 +01:00
parent b363998759
commit 28f94e89d5
3 changed files with 46 additions and 5 deletions

View File

@@ -402,6 +402,10 @@ Setup prefix for keybindings.
"ts" '(hydra-text-scale/body :which-key "scale text")) "ts" '(hydra-text-scale/body :which-key "scale text"))
#+END_SRC #+END_SRC
* Browser
#+BEGIN_SRC emacs-lisp
(setq browse-url-firefox-program "ff-alex")
#+END_SRC
* Evil * Evil
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package evil (use-package evil

View File

@@ -29,7 +29,14 @@ let
ff = pkgs.writeShellApplication { ff = pkgs.writeShellApplication {
name = "ff"; name = "ff";
text = '' text = ''
${wrapped}/bin/firefox -p ${wrapped}/bin/firefox --ProfileManager
'';
};
ff-alex = pkgs.writeShellApplication {
name = "ff-alex";
text = ''
${wrapped}/bin/firefox -P alex --new-window "$@"
''; '';
}; };
@@ -49,6 +56,7 @@ in
alex = { alex = {
id = 0; id = 0;
name = "alex"; name = "alex";
isDefault = true;
settings = sharedSettings // {}; settings = sharedSettings // {};
}; };
@@ -70,6 +78,39 @@ in
}; };
}; };
xdg = {
# /etc/profiles/per-user/alex/share/applications
desktopEntries = {
ff-alex = {
name = "ff-alex";
exec = "${ff-alex}/bin/ff-alex %U";
terminal = false;
};
};
mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "ff-alex.desktop";
"x-scheme-handler/http" = "ff-alex.desktop";
"x-scheme-handler/https" = "ff-alex.desktop";
"application/x-exension-htm" = "ff-alex.desktop";
"application/x-exension-html" = "ff-alex.desktop";
"application/x-exension-shtml" = "ff-alex.desktop";
"application/xhtml+xml" = "ff-alex.desktop";
"application/x-exension-xhtml" = "ff-alex.desktop";
"application/x-exension-xht" = "ff-alex.desktop";
};
};
# https://github.com/nix-community/home-manager/issues/1213
configFile."mimeapps.list".force = true;
};
home.packages = [ ff ]; home.packages = [ ff ];
}; };
environment.variables.BROWSER = "${ff-alex}/bin/ff-alex $@";
} }

View File

@@ -49,10 +49,6 @@ in
} }
]; ];
envExtra = lib.strings.concatStringsSep "\n" [
"BROWSER=firefox"
];
initExtra = lib.strings.concatStringsSep "\n" [ initExtra = lib.strings.concatStringsSep "\n" [
"export KEYTIMEOUT=1" "export KEYTIMEOUT=1"
"bindkey -v '^?' backward-delete-char" "bindkey -v '^?' backward-delete-char"