changes, add mpv

This commit is contained in:
Sean Kovacs 2025-12-14 17:53:34 -05:00
commit c0962d5639
Signed by: sckova
GPG key ID: 00F325187C68651A
11 changed files with 50 additions and 10 deletions

View file

@ -0,0 +1,105 @@
/* Dark theme */
@media (prefers-color-scheme: dark) {
:root {
.tabbrowser-tab[selected="true"] .tab-background {
border: 1px solid #313244 !important;
}
--toolbar-bgcolor: rgb(24, 24, 37) !important;
--toolbox-non-lwt-bgcolor: rgb(17, 17, 27) !important;
--toolbox-non-lwt-textcolor: rgb(205, 214, 244) !important;
--input-bgcolor: rgb(17, 17, 27) !important;
--toolbar-field-background-color: var(--input-bgcolor) !important;
--input-color: rgb(205, 214, 244) !important;
--toolbar-field-color: var(--input-color) !important;
.tab-background[selected]:not([multiselected]) {
outline: 1px solid rgb(49, 50, 68);
outline-offset: -1px;
}
.tab-background[multiselected] {
--focus-outline-color: rgb(49, 50, 68);
}
--arrowpanel-background: rgb(49, 50, 68) !important;
--arrowpanel-color: rgb(205, 214, 244) !important;
--toolbarbutton-active-background: rgb(108, 112, 134) !important;
&:where([tabsintitlebar]) {
--toolbox-non-lwt-bgcolor-inactive: rgb(17, 17, 27) !important;
}
--toolbarbutton-icon-fill-attention: rgb(205, 214, 244) !important;
--toolbarbutton-icon-fill: rgb(205, 214, 244) !important;
--arrowpanel-border-color: rgb(49, 50, 68) !important;
--urlbarView-highlight-color: rgb(205, 214, 244) !important;
--urlbarView-highlight-background: rgb(108, 112, 134) !important;
#tabbrowser-tabs {
--tab-loading-fill: rgb(205, 214, 244) !important;
}
--tab-selected-bgcolor: rgb(30, 30, 46) !important;
--tab-selected-textcolor: rgb(205, 214, 244) !important;
--chrome-content-separator-color: rgb(49, 50, 68) !important;
--toolbar-field-focus-border-color: rgb(49, 50, 68) !important;
--input-border-color: rgb(24, 24, 37) !important;
--toolbar-field-border-color: var(--input-border-color) !important;
--toolbar-field-focus-background-color: rgb(30, 30, 46) !important;
#urlbar-input:focus::selection,
.searchbar-textbox:focus::selection {
color: rgb(49, 50, 68);
}
#urlbar-input:focus::selection,
.searchbar-textbox:focus::selection {
background-color: rgb(205, 214, 244);
}
--toolbarseparator-color: rgb(205, 214, 244) !important;
}
}
/* Light theme */
@media (prefers-color-scheme: light) {
:root {
.tabbrowser-tab[selected="true"] .tab-background {
border: 1px solid #ccd0da !important;
}
--toolbar-bgcolor: rgb(230, 233, 239) !important;
--toolbox-non-lwt-bgcolor: rgb(220, 224, 232) !important;
--toolbox-non-lwt-textcolor: rgb(76, 79, 105) !important;
--input-bgcolor: rgb(220, 224, 232) !important;
--toolbar-field-background-color: var(--input-bgcolor) !important;
--input-color: rgb(76, 79, 105) !important;
--toolbar-field-color: var(--input-color) !important;
.tab-background[selected]:not([multiselected]) {
outline: 1px solid rgb(76, 79, 105);
outline-offset: -1px;
}
.tab-background[multiselected] {
--focus-outline-color: rgb(76, 79, 105);
}
--arrowpanel-background: rgb(239, 241, 245) !important;
--arrowpanel-color: rgb(76, 79, 105) !important;
--toolbarbutton-active-background: rgb(156, 160, 176) !important;
&:where([tabsintitlebar]) {
--toolbox-non-lwt-bgcolor-inactive: rgb(220, 224, 232) !important;
}
--toolbarbutton-icon-fill-attention: rgb(76, 79, 105) !important;
--toolbarbutton-icon-fill: rgb(76, 79, 105) !important;
--arrowpanel-border-color: rgb(76, 79, 105) !important;
--urlbarView-highlight-color: rgb(76, 79, 105) !important;
--urlbarView-highlight-background: rgb(156, 160, 176) !important;
#tabbrowser-tabs {
--tab-loading-fill: rgb(76, 79, 105) !important;
}
--tab-selected-bgcolor: rgb(239, 241, 245) !important;
--tab-selected-textcolor: rgb(76, 79, 105) !important;
--chrome-content-separator-color: rgb(239, 241, 245) !important;
--toolbar-field-focus-border-color: rgb(76, 79, 105) !important;
--input-border-color: rgb(230, 233, 239) !important;
--toolbar-field-border-color: var(--input-border-color) !important;
--toolbar-field-focus-background-color: rgb(239, 241, 245) !important;
#urlbar-input:focus::selection,
.searchbar-textbox:focus::selection {
color: rgb(204, 208, 218);
}
#urlbar-input:focus::selection,
.searchbar-textbox:focus::selection {
background-color: rgb(76, 79, 105);
}
--toolbarseparator-color: rgb(76, 79, 105) !important;
}
}

View file

@ -0,0 +1,15 @@
#tracking-protection-icon-container {
display: none;
}
.bookmark-item[container] {
list-style-image: url("chrome://global/skin/dirListing/folder.png") !important;
}
#toolbar-menubar {
display: none !important;
}
#menubar-items {
visibility: hidden !important;
}

View file

@ -0,0 +1,2 @@
@import "./theme/colors.css";
@import "./theme/hide.css";

View file

@ -0,0 +1,222 @@
# https://discourse.nixos.org/t/combining-best-of-system-firefox-and-home-manager-firefox-settings/37721
# https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265
{
pkgs,
config,
lib,
...
}:
{
home.file.".mozilla/firefox/default/chrome" = {
source = ./chrome;
force = true;
};
programs.firefox = {
enable = true;
package = pkgs.firefox.override {
nativeMessagingHosts = with pkgs; [
firefoxpwa
];
};
policies = {
BlockAboutConfig = false;
DefaultDownloadDirectory = "\${home}/Downloads";
# Check about:support for extension/add-on ID strings.
# Valid strings for installation_mode are "allowed", "blocked",
# "force_installed" and "normal_installed".
ExtensionSettings = {
"*" = {
"installation_mode" = "blocked";
};
"uBlock0@raymondhill.net" = {
installation_mode = "allowed";
};
"gdpr@cavi.au.dk" = {
installation_mode = "allowed";
};
"{5cce4ab5-3d47-41b9-af5e-8203eea05245}" = {
installation_mode = "allowed";
};
"plasma-browser-integration@kde.org" = {
installation_mode = "allowed";
};
"jid1-MnnxcxisBPnSXQ@jetpack" = {
installation_mode = "allowed";
};
"firefoxpwa@filips.si" = {
installation_mode = "allowed";
};
"sponsorBlocker@ajay.app" = {
installation_mode = "allowed";
};
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" = {
installation_mode = "allowed";
};
"{aecec67f-0d10-4fa7-b7c7-609a2db280cf}" = {
installation_mode = "allowed";
};
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
installation_mode = "allowed";
};
};
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisablePocket = true;
DisableFirefoxAccounts = false;
DisableAccounts = false;
DisableFirefoxScreenshots = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
DisplayBookmarksToolbar = "newtab"; # alternatives: "always" or "newtab"
DisplayMenuBar = "always"; # alternatives: "always", "never" or "default-on"
SearchBar = "unified"; # alternative: "separate"
};
profiles = {
default = {
id = 0;
name = "default";
isDefault = true;
extensions = {
force = true;
packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
plasma-integration
stylus
violentmonkey
consent-o-matic
privacy-badger
sponsorblock
pwas-for-firefox
control-panel-for-twitter
bitwarden
];
settings = {
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}".settings = {
force = true;
settings = {
dbInChromeStorage = true;
};
};
};
};
settings = {
"extensions.autoDisableScopes" = 0; # enables all extensions automatically
"xpinstall.signatures.required" = false;
"extensions.update.autoUpdateDefault" = false;
"extensions.update.enabled" = false;
"browser.search.defaultenginename" = "google";
"browser.search.order.1" = "google";
"browser.toolbars.bookmarks.visibility" = "newtab";
"signon.rememberSignons" = false;
"widget.use-xdg-desktop-portal.file-picker" = 1;
"browser.aboutConfig.showWarning" = false;
"browser.compactmode.show" = true;
"browser.cache.disk.enable" = true; # Set to false if you have a HDD
"browser.warnOnQuitShortcut" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"widget.disable-workspace-management" = true;
"browser.contentblocking.category" = {
Value = "strict";
Status = "locked";
};
"widget.gtk.global-menu.enabled" = true;
"widget.gtk.global-menu.wayland.enabled" = true;
"browser.tabs.inTitlebar" = 0;
"extensions.pocket.enabled" = false;
"extensions.screenshots.disabled" = true;
"browser.topsites.contile.enabled" = false;
"browser.formfill.enable" = false;
"browser.search.suggest.enabled" = false;
"browser.search.suggest.enabled.private" = false;
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.snippets" = false;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.system.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.showWeather" = false;
"media.gmp-widevinecdm.version" = "system-installed";
"media.gmp-widevinecdm.visible" = true;
"media.gmp-widevinecdm.enabled" = true;
"media.gmp-widevinecdm.autoupdate" = false;
"media.eme.enabled" = true;
"media.eme.encrypted-media-encryption-scheme.enabled" = true;
# Vertical tabs
"sidebar.verticalTabs" = true;
"sidebar.verticalTabs.dragToPinPromo.dismissed" = true;
"browser.uiCustomization.navBarWhenVerticalTabs" = [
"back-button"
"forward-button"
"stop-reload-button"
"urlbar-container"
"downloads-button"
"fxa-toolbar-menu-button"
"unified-extensions-button"
];
# Undo a bunch of stuff that LibreWolf does
# "browser.safebrowsing.malware.enabled" = true;
# "browser.safebrowsing.phishing.enabled" = true;
# "browser.safebrowsing.blockedURIs.enabled" = true;
# "browser.safebrowsing.provider.google4.gethashURL" =
# "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST";
# "browser.safebrowsing.provider.google4.updateURL" =
# "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST";
# "browser.safebrowsing.provider.google.gethashURL" =
# "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2";
# "browser.safebrowsing.provider.google.updateURL" =
# "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%";
# "browser.safebrowsing.downloads.enabled" = true;
# "privacy.resistFingerprinting.letterboxing" = false;
# "webgl.disabled" = false;
# "identity.fxaccounts.enabled" = true;
# "privacy.clearOnShutdown.history" = false;
# "privacy.clearOnShutdown.downloads" = false;
# "privacy.fingerprintingProtection" = false;
# "network.cookie.lifetimePolicy" = 0;
};
bookmarks = {
force = true;
settings = [
{
name = "Nix sites";
toolbar = true;
bookmarks = [
{
name = "NixOS";
url = "https://nixos.org/";
}
];
}
];
};
search = {
force = true;
default = "google";
order = [
"google"
];
};
};
};
};
}

View file

@ -0,0 +1,33 @@
{ config, pkgs, ... }:
let
catppuccin-mpv = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "mpv";
rev = "08e90daf511eee2c10c98f0031b51bb9de240d60";
sha256 = "sha256-oUheJNWk2R6gNEmkK8H6PWX0iofx2KMGDoFWtnr420A=";
};
mergedConfig = pkgs.runCommand "mergedConfig" { } ''
mkdir -p $out
${pkgs.gnused}/bin/sed 's/#1e1e2e/#000000/g' \
${catppuccin-mpv}/themes/${config.catppuccin.flavor}/${config.catppuccin.accent}.conf \
> $out/mpv.conf
'';
in
{
home.packages = with pkgs; [
(mpv.override {
scripts = with mpvScripts; [
uosc
sponsorblock
mpris
];
})
];
home.file.".config/mpv" = {
source = mergedConfig;
recursive = true;
force = true;
};
}