diff --git a/home-modules/firefox/userChrome.nix b/home-modules/firefox/userChrome.nix new file mode 100644 index 0000000..27b2309 --- /dev/null +++ b/home-modules/firefox/userChrome.nix @@ -0,0 +1,92 @@ +rice: with rice.color; let + f = rice.lib.hex-to-rgb-comma-string; + # blur = builtins.toString 20; +in /* css */ '' + :root{ + /* Popup panels */ + --arrowpanel-background : rgba(${f background}, ${builtins.toString rice.transparency}) !important; + --arrowpanel-border-color : ${border} !important; + --arrowpanel-color : ${secondary.base} !important; + --arrowpanel-dimmed : rgba(${f background},0.4) !important; + --arrowpanel-dimmed-further : rgba(${f background},0.6) !important; + --arrowpanel-dimmed-even-further : rgba(${f background},0.8) !important; + + /* Autocomplete */ + --autocomplete-popup-background : rgba(${f background}, ${builtins.toString rice.transparency}) !important; + --autocomplete-popup-color : ${foreground} !important; + --autocomplete-popup-highlight-background: ${accent.base} !important; + --autocomplete-popup-highlight-color : ${foreground} !important; + + /* Toolbar background */ + --toolbar-bgcolor : transparent !important; + --toolbar-non-lwt-bgcolor : rgba(${f background}, ${builtins.toString rice.transparency}) !important; + --toolbar-non-lwt-bgimage : none !important; + --toolbar-color : ${foreground} !important; + + /* Tabs */ + --tab-selected-bgcolor : ${accent.base} !important; + --tabs-border-color : ${border} !important; + --tab-line-color : ${accent.base} !important; + --tab-loader-size : 16px !important; + + /* Sidebar */ + --lwt-sidebar-background-color : rgba(${f background}, ${builtins.toString rice.transparency}) !important; + --lwt-sidebar-text-color : ${foreground} !important; + --sidebar-background-color : rgba(${f background}, ${builtins.toString rice.transparency}) !important; + --sidebar-text-color : ${foreground} !important; + --sidebar-border-color : ${border} !important; + + /* URL bar */ + --urlbar-popup-url-color : ${foreground} !important; + --urlbar-popup-action-color : ${secondary.base} !important; + --toolbar-field-background-color : rgba(${f background}, ${builtins.toString rice.transparency}) !important; + --toolbar-field-focus-background-color : rgba(${f background}, ${builtins.toString rice.transparency}) !important; + --toolbar-field-color : ${accent.base} !important; + --toolbar-field-focus-color : ${foreground} !important; + --toolbar-field-focus-border-color : ${accent.base} !important; + + /* Buttons */ + --toolbarbutton-icon-fill : ${foreground} !important; + --toolbarbutton-hover-background : rgba(${f accent.base}, 0.2) !important; + --toolbarbutton-active-background : rgba(${f accent.base}, 0.4) !important; + + /* Notification and panel */ + --panel-disabled-color : rgba(${f foreground},0.3) !important; + --panel-separator-color : ${border} !important; + + /* New tab page */ + --newtab-background-color : transparent !important; + --newtab-background-color-secondary : ${secondary.dark} !important; + --newtab-text-primary-color : ${foreground} !important; + --newtab-text-secondary-color : ${secondary.base} !important; + --newtab-search-icon-color : ${accent.base} !important; + --newtab-background-card : ${accent.dark} !important; + --tabpanel-background-color : transparent !important; + + background : linear-gradient(180deg,rgba(${f secondary.dark}, ${builtins.toString rice.transparency}) 0%, rgba(${f accent.dark}, ${builtins.toString rice.transparency}) 100%) !important; + } + .tabbrowser-tab[selected="true"] { + color: ${background} !important; + } + hbox#browser { + backround-color: transparent: !important; + } + + #appcontent { + background: transparent !important; + } + #navigator-toolbox { + --tabs-border-color: transparent !important; + } + #toolbar-menubar, #TabsToolbar, #PersonalToolbar, #navigator-toolbox, #sidebar-box { + background-color: transparent !important; + -moz-appearance: none !important; + background-image: none !important; + } + + window, #nav-bar{ + background-color: transparent !important; + -moz-appearance: none !important; + background-image: none !important; + } +'' diff --git a/home-modules/firefox/userContent.nix b/home-modules/firefox/userContent.nix new file mode 100644 index 0000000..9deaa2e --- /dev/null +++ b/home-modules/firefox/userContent.nix @@ -0,0 +1,179 @@ +rice: with rice.color; let + f = rice.lib.hex-to-rgb-comma-string; + blur = builtins.toString 20; +in /* css */ '' + /* Removes the white loading page */ + /* url(about:newtab), url(about:home) */ + @-moz-document url(about:blank) { + html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay { + background: transparent !important; + } + } + + /* Sets up minimal incognito scrollbar */ + @-moz-document url(about:privatebrowsing) { + :root{ + scrollbar-width: thin !important; + scrollbar-color: rgb(161, 161, 161) transparent !important; + } + } + + /* new-tab */ + @-moz-document url-prefix(about:home), url-prefix(about:newtab) { + :root{ + --newtab-background-color-secondary: rgba(${f background},0.5) !important; + } + body, html { + background: transparent !important; + } + .tile, .search-handoff-button { + border: ${builtins.toString rice.border-width}px solid ${border} !important; + } + } + + @-moz-document domain(reddit.com) { + header { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + backdrop-filter: blur(${blur}px); + } + body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree{ + background-color: transparent !important; + } + } + + @-moz-document domain(reddit.com) { + header { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + } + body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{ + background-color: transparent !important; + } + } + + @-moz-document domain(google.com) { + .sfbg { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + backdrop-filter: blur(${blur}px); + } + body, html, div#search > * { + background-color: transparent !important; + border: ${builtins.toString rice.border-width} solid ${border}; + } + .g, .appbar { + background-color: transparent !important; + border: ${builtins.toString rice.border-width} solid ${border}; + } + div#rso { + * { + background-color: transparent !important; + border: ${builtins.toString rice.border-width} solid ${border}; + } + } + div#cnt > div { + + } + } + + @media (prefers-color-scheme: dark) { + :root .theme-system { + --color-bg: transtparent !important; + --color-text: ${rice.color.foreground} + } + } + + @-moz-document domain(developer.mozilla.org) { + html, body { + background-color: transparent !important; + } + .top-navigation, .article-actions-container { + background-color: rgba(0,0,0,1) !important; + backdrop-filter: blur(100px); + border-radius: ${builtins.toString rice.rounding}px; + } + } + + @-moz-document domain(github.com) { + body, html, header, #repository-container-header, .bgColor-muted, section { + background-color: transparent !important; + } + } + @-moz-document domain(youtube.com) { + body, html, div#content, ytd-app, #frosted-glass.with-chipbar.ytd-app, ytd-shorts[is-dark] #cinematic-shorts-scrim.ytd-shorts { + background-color: transparent !important; + } + #background.ytd-masthead, div#background { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + backdrop-filter: blur(100px); + } + * { + --yt-spec-base-background: transparent; + --yt-spec-raised-background: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --yt-spec-menu-background: rgba(${rice.lib.hex-to-rgb-comma-string accent.dark}, ${builtins.toString rice.transparency}) !important; + --yt-spec-inverted-background: rgba(${rice.lib.hex-to-rgb-comma-string secondary.dark}, ${builtins.toString rice.transparency}) !important; + } + } + + @-moz-document domain(mynixos.com) { + body, html { + background-color: transparent !important; + } + header, footer { + background-color: rgba(0,0,0,1) !important; + backdrop-filter: blur(100px); + border-radius: ${builtins.toString rice.rounding}px; + } + } + + @-moz-document domain(moodle.informatik.tu-darmstadt.de) { + body, html , .main-inner, .main-inner * { + background-color: transparent !important; + } + .bg-primary { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base},0.5) !important; + } + } + + @-moz-document url-prefix("https://nx2.site/") { + html { + background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; + background-repeat: repeat !important; + background-size: 2vmin 2vmin !important; + } + } + + @-moz-document url-prefix("pw.nx2.site") { + html { + background: black; + } + } + + @-moz-document url-prefix("pw.nx2.site") { + html { + background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; + background-repeat: repeat !important; + background-size: 2vmin 2vmin !important; + } + body, .tw-bg-background-alt3, main, .card-header, .card-body, .modal-body { + background-color: transparent !important; + } + .modal-open, .modal-header, form.modal-content, .modal-footer { + background-color: rgba(0,0,0,0.8) !important; + backdrop-filter: blur(5px); + } + .cdk-virtual-scroll-content-wrapper, .card, .tw-bg-background, .modal-content { + background-color: rgba(0,0,0,0.8) !important; + border-radius: 10px !important; + border: ${toString rice.border-width}px solid ${border} !important; + } + } +'' + # @-moz-document domain(chatgpt.com) { + # body, html , .bg-token-sidebar-surface-primary { + # background-color: transparent !important; + # } + # .bg-token-main-surface-primary { + # background-color: rgba(0,0,0,1) !important; + # backdrop-filter: blur(100px) !important; + # border-radius: ${builtins.toString rice.rounding}px !important; + # } + # } diff --git a/home-modules/pkgs-list/programs.nix b/home-modules/pkgs-list/programs.nix index c936a71..3c40374 100644 --- a/home-modules/pkgs-list/programs.nix +++ b/home-modules/pkgs-list/programs.nix @@ -1,6 +1,10 @@ { pkgs, hyper, ... }: { home.packages = with pkgs; [ chromium + gnome-clocks + gnome-calculator + gnome-characters + gnome-2048 element-desktop qbittorrent unstable.spotify