fix: poweroff action, working userChrome.css for zen browser
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
./eww
|
./eww
|
||||||
./nvim
|
./nvim
|
||||||
./rofi
|
./rofi
|
||||||
|
./zen
|
||||||
|
|
||||||
./btop.nix
|
./btop.nix
|
||||||
./carapace.nix
|
./carapace.nix
|
||||||
@@ -14,6 +15,5 @@
|
|||||||
./tmux.nix
|
./tmux.nix
|
||||||
./vesktop.nix
|
./vesktop.nix
|
||||||
./zathura.nix
|
./zathura.nix
|
||||||
./zen.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
betterfox = pkgs.fetchFromGitHub {
|
||||||
|
owner = "yokoffing";
|
||||||
|
repo = "Betterfox";
|
||||||
|
rev = "116.1";
|
||||||
|
hash = "sha256-Ai8Szbrk/4FhGhS4r5gA2DqjALFRfQKo2a/TwWCIA6g=";
|
||||||
|
};
|
||||||
|
|
||||||
|
catppuccinUserChrome = pkgs.fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "zen-browser";
|
||||||
|
rev = "0893393f721facb884365a318111c4a7fce96b45";
|
||||||
|
hash = "sha256-+Nf7TUairZBnhYCFVBqiQW9QodV/xWSOnH6X9o6S7rM=";
|
||||||
|
};
|
||||||
|
replaceWithStylixColours =
|
||||||
|
textFile:
|
||||||
|
with config.lib.stylix.colors;
|
||||||
|
builtins.replaceStrings
|
||||||
|
[
|
||||||
|
"1e1e2e"
|
||||||
|
"181825"
|
||||||
|
"313244"
|
||||||
|
"45475a"
|
||||||
|
"585b70"
|
||||||
|
"cdd6f4"
|
||||||
|
"f5e0dc"
|
||||||
|
"b4befe"
|
||||||
|
"f38ba8"
|
||||||
|
"fab387"
|
||||||
|
"f9e2af"
|
||||||
|
"a6e3a1"
|
||||||
|
"94e2d5"
|
||||||
|
"89b4fa"
|
||||||
|
"cba6f7"
|
||||||
|
"f2cdcd"
|
||||||
|
"rgb(204, 190, 246)"
|
||||||
|
]
|
||||||
|
[
|
||||||
|
base00
|
||||||
|
base01
|
||||||
|
base02
|
||||||
|
base03
|
||||||
|
base04
|
||||||
|
base05
|
||||||
|
base06
|
||||||
|
base07
|
||||||
|
base08
|
||||||
|
base09
|
||||||
|
base0A
|
||||||
|
base0B
|
||||||
|
base0C
|
||||||
|
base0D
|
||||||
|
base0E
|
||||||
|
base0F
|
||||||
|
"#${base0E}"
|
||||||
|
]
|
||||||
|
(builtins.readFile textFile);
|
||||||
|
|
||||||
|
#userChromeText = replaceWithStylixColours "${catppuccinUserChrome}/themes/Mocha/Mauve/userChrome.css";
|
||||||
|
userChromeText = builtins.readFile (
|
||||||
|
with config.lib.stylix.colors;
|
||||||
|
pkgs.replaceVars ./userChrome.css {
|
||||||
|
inherit
|
||||||
|
base00
|
||||||
|
base01
|
||||||
|
base02
|
||||||
|
# base03
|
||||||
|
# base04
|
||||||
|
base05
|
||||||
|
base06
|
||||||
|
# base07
|
||||||
|
base08
|
||||||
|
base09
|
||||||
|
base0A
|
||||||
|
base0B
|
||||||
|
base0C
|
||||||
|
base0D
|
||||||
|
base0E
|
||||||
|
# base0F
|
||||||
|
;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
userContentText = replaceWithStylixColours "${catppuccinUserChrome}/themes/Mocha/Mauve/userContent.css";
|
||||||
|
|
||||||
|
installExtension = name: {
|
||||||
|
inherit name;
|
||||||
|
value = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
profileName = "tvqbzcy7.Default Profile";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.file.".zen/${profileName}/chrome/userChrome.css".text = userChromeText;
|
||||||
|
home.file.".zen/${profileName}/chrome/userContent.css".text = userContentText;
|
||||||
|
programs.zen-browser = {
|
||||||
|
enable = true;
|
||||||
|
policies = {
|
||||||
|
DisableTelemtry = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
};
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableFirefoxAccounts = true;
|
||||||
|
DisableAccounts = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
|
OverrideFirstRunPage = "";
|
||||||
|
OverridePostUpdatePage = "";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
DisplayBookmarksToolbar = "never";
|
||||||
|
DisplayMenuBar = "default-off";
|
||||||
|
SearchBar = "unified";
|
||||||
|
ExtensionSettings = builtins.listToAttrs (
|
||||||
|
builtins.map (name: installExtension name) [
|
||||||
|
# BitWarden
|
||||||
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}"
|
||||||
|
|
||||||
|
# Catppuccin Mocha Mauve
|
||||||
|
"{76aabc99-c1a8-4c1e-832b-d4f2941d5a7a}"
|
||||||
|
|
||||||
|
# Dark Reader
|
||||||
|
"addon@darkreader.org"
|
||||||
|
|
||||||
|
# Language Tool
|
||||||
|
"languagetool-webextension@languagetool.org"
|
||||||
|
|
||||||
|
# Return dislikes to YouTube
|
||||||
|
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}"
|
||||||
|
|
||||||
|
# SponsorBlocker
|
||||||
|
"sponsorBlocker@ajay.app"
|
||||||
|
|
||||||
|
# uBlock Origin:
|
||||||
|
"uBlock0@raymondhill.net"
|
||||||
|
|
||||||
|
# Shinigami Eyes
|
||||||
|
"shinigamieyes@shinigamieyes"
|
||||||
|
|
||||||
|
# Hide shorts for Youtube
|
||||||
|
"{88ebde3a-4581-4c6b-8019-2a05a9e3e938}"
|
||||||
|
|
||||||
|
# Vimium
|
||||||
|
"{d7742d87-e61d-4b78-b8a1-b469842139fa}"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
profiles.default = {
|
||||||
|
id = 0;
|
||||||
|
isDefault = true;
|
||||||
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
|
(builtins.readFile "${betterfox}/Securefox.js")
|
||||||
|
(builtins.readFile "${betterfox}/Fastfox.js")
|
||||||
|
(builtins.readFile "${betterfox}/Peskyfox.js")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
/* https://github.com/catppuccin/zen-browser/blob/main/themes/Mocha/Pink/userChrome.css */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--zen-colors-primary: #@base02@ !important;
|
||||||
|
--zen-primary-color: #@base0D@ !important;
|
||||||
|
--zen-colors-secondary: #@base02@ !important;
|
||||||
|
--zen-colors-tertiary: #@base01@ !important;
|
||||||
|
--zen-colors-border: #base0D# !important;
|
||||||
|
--toolbarbutton-icon-fill: #@base0D@ !important;
|
||||||
|
--lwt-text-color: #@base05@ !important;
|
||||||
|
--toolbar-field-color: #@base05@ !important;
|
||||||
|
--tab-selected-textcolor: #@base06@ !important;
|
||||||
|
--toolbar-field-focus-color: #@base05@ !important;
|
||||||
|
--toolbar-color: #@base05@ !important;
|
||||||
|
--newtab-text-primary-color: #@base05@ !important;
|
||||||
|
--arrowpanel-color: #@base05@ !important;
|
||||||
|
--arrowpanel-background: #@base01@ !important;
|
||||||
|
--sidebar-text-color: #@base05@ !important;
|
||||||
|
--lwt-sidebar-text-color: #@base05@ !important;
|
||||||
|
--lwt-sidebar-background-color: #@base00@ !important;
|
||||||
|
--toolbar-bgcolor: #@base02@ !important;
|
||||||
|
--newtab-background-color: #@base01@ !important;
|
||||||
|
--zen-themed-toolbar-bg: #@base01@ !important;
|
||||||
|
--zen-main-browser-background: #@base01@ !important;
|
||||||
|
--toolbox-bgcolor-inactive: #@base01@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#permissions-granted-icon {
|
||||||
|
color: #@base01@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-placesTree {
|
||||||
|
background-color: #@base01@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zen-workspaces-button {
|
||||||
|
background-color: #@base01@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#TabsToolbar {
|
||||||
|
background-color: #@base01@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.urlbar-background {
|
||||||
|
background-color: #@base01@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-shortcuts {
|
||||||
|
background-color: #@base01@ !important;
|
||||||
|
border-color: #@base0D@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.urlbarView-url {
|
||||||
|
color: #@base0D@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zenEditBookmarkPanelFaviconContainer {
|
||||||
|
background: #@base00@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zen-media-controls-toolbar {
|
||||||
|
& #zen-media-progress-bar {
|
||||||
|
&::-moz-range-track {
|
||||||
|
background: #@base02@ !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
toolbar .toolbarbutton-1 {
|
||||||
|
&:not([disabled]) {
|
||||||
|
&:is([open], [checked])
|
||||||
|
> :is(
|
||||||
|
.toolbarbutton-icon,
|
||||||
|
.toolbarbutton-text,
|
||||||
|
.toolbarbutton-badge-stack
|
||||||
|
) {
|
||||||
|
fill: #@base00@;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.identity-color-blue {
|
||||||
|
--identity-tab-color: #@base0D@ !important;
|
||||||
|
--identity-icon-color: #@base0D@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.identity-color-turquoise {
|
||||||
|
--identity-tab-color: #@base0C@ !important;
|
||||||
|
--identity-icon-color: #@base0C@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.identity-color-green {
|
||||||
|
--identity-tab-color: #@base0B@ !important;
|
||||||
|
--identity-icon-color: #@base0B@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.identity-color-yellow {
|
||||||
|
--identity-tab-color: #@base0A@ !important;
|
||||||
|
--identity-icon-color: #@base0A@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.identity-color-orange {
|
||||||
|
--identity-tab-color: #@base09@ !important;
|
||||||
|
--identity-icon-color: #@base09@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.identity-color-red {
|
||||||
|
--identity-tab-color: #@base08@ !important;
|
||||||
|
--identity-icon-color: #@base08@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.identity-color-pink {
|
||||||
|
--identity-tab-color: #@base0D@ !important;
|
||||||
|
--identity-icon-color: #@base0D@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.identity-color-purple {
|
||||||
|
--identity-tab-color: #@base0E@ !important;
|
||||||
|
--identity-icon-color: #@base0E@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
hbox#titlebar {
|
||||||
|
background-color: #@base01@ !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zen-appcontent-navbar-container {
|
||||||
|
background-color: #@base01@ !important;
|
||||||
|
}
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
if (subject.isInGroup("wheel") &&
|
if (subject.isInGroup("wheel") &&
|
||||||
(action.id == "org.freedesktop.login1.reboot" ||
|
(action.id == "org.freedesktop.login1.reboot" ||
|
||||||
action.id == "org.freedesktop.login1.suspend" ||
|
action.id == "org.freedesktop.login1.suspend" ||
|
||||||
action.id == "org.freedesktop.login1.poweroff" ||
|
action.id == "org.freedesktop.login1.power-off" ||
|
||||||
action.id == "org.freedesktop.login1.shutdown")) {
|
action.id == "org.freedesktop.login1.shutdown")) {
|
||||||
return polkit.Result.YES;
|
return polkit.Result.YES;
|
||||||
}
|
}
|
||||||
@@ -159,6 +159,7 @@
|
|||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
"seat"
|
"seat"
|
||||||
|
"audio"
|
||||||
];
|
];
|
||||||
packages = [ ];
|
packages = [ ];
|
||||||
shell = pkgs.tcsh;
|
shell = pkgs.tcsh;
|
||||||
|
|||||||
Reference in New Issue
Block a user