76 lines
1.9 KiB
Nix
76 lines
1.9 KiB
Nix
{ lib, config, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.snowhawk.firefox;
|
|
in
|
|
{
|
|
options.snowhawk.firefox = {
|
|
enable = lib.mkEnableOption "firefox home-manager module";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs.firefox = {
|
|
enable = true;
|
|
package = pkgs.firefox;
|
|
|
|
profiles.default = {
|
|
isDefault = true;
|
|
path = "x56262ch.default";
|
|
userChrome = /* css */ ''
|
|
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
|
|
visibility: collapse !important;
|
|
}
|
|
|
|
#titlebar {display: none !important;}
|
|
#main-window {-moz-appearance:none !important;}
|
|
|
|
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
|
|
display: none;
|
|
}
|
|
'';
|
|
};
|
|
profiles.alt = {
|
|
id = 1;
|
|
path = "05fb1no8.casualypurple";
|
|
userChrome = config.programs.firefox.profiles.default.userChrome;
|
|
};
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
(writeShellScriptBin "alt-firefox" ''
|
|
${lib.getExe config.programs.firefox.package} -P "alt"
|
|
'')
|
|
];
|
|
|
|
xdg.desktopEntries = {
|
|
AltFirefox = {
|
|
name = "Alt Firefox";
|
|
genericName = "Web Browser";
|
|
icon = "firefox";
|
|
exec = ''
|
|
${lib.getExe config.programs.firefox.package} -P "alt"
|
|
'';
|
|
terminal = false;
|
|
type = "Application";
|
|
mimeType = [
|
|
"text/html"
|
|
"text/xml"
|
|
"application/xhtml+xml"
|
|
"application/vnd.mozilla.xul+xml"
|
|
"x-scheme-handler/http"
|
|
"x-scheme-handler/https"
|
|
];
|
|
categories = [
|
|
"Network"
|
|
"WebBrowser"
|
|
];
|
|
startupNotify = false;
|
|
};
|
|
};
|
|
};
|
|
}
|