mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Firefox userChrome Package + Substitutor
This commit is contained in:
parent
dc5d6552a1
commit
03975cc394
7 changed files with 132 additions and 114 deletions
|
|
@ -1,106 +0,0 @@
|
|||
{ profile, base16 }:
|
||||
|
||||
''
|
||||
* {
|
||||
font-family: "Cozette", monospace;
|
||||
}
|
||||
|
||||
:root {
|
||||
--animationSpeed : 0.15s;
|
||||
}
|
||||
|
||||
/* Hide main tabs toolbar */
|
||||
#TabsToolbar {
|
||||
visibility: collapse;
|
||||
}
|
||||
/* Hide splitter, when using Tree Style Tab. */
|
||||
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
|
||||
display: none !important;
|
||||
}
|
||||
/* Hide sidebar header, when using Tree Style Tab. */
|
||||
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
|
||||
#back-button { display: none !important }
|
||||
#forward-button { display: none !important }
|
||||
#urlbar-search-mode-indicator { display: none !important }
|
||||
#urlbar *|input::placeholder { opacity: 0 !important; }
|
||||
|
||||
#nav-bar, toolbar-menubar, #menubar-items, #main-menubar {
|
||||
background: ${base16.base00} !important;
|
||||
}
|
||||
|
||||
#urlbar-background {
|
||||
background: ${base16.base01} !important;
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
width: 50vw !important;
|
||||
}
|
||||
|
||||
#star-button{
|
||||
display:none;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
border : none !important;
|
||||
}
|
||||
|
||||
.titlebar-spacer {
|
||||
display : none !important;
|
||||
}
|
||||
|
||||
#urlbar:not(:hover):not([breakout][breakout-extend]) > #urlbar-background {
|
||||
box-shadow : none !important;
|
||||
background : ${base16.base01} !important;
|
||||
}
|
||||
|
||||
.urlbar-icon, #userContext-indicator, #userContext-label {
|
||||
fill : transparent !important;
|
||||
background : transparent !important;
|
||||
color : transparent !important;
|
||||
}
|
||||
|
||||
#nav-bar-customization-target > toolbarspring { max-width: none !important }
|
||||
|
||||
#urlbar:hover .urlbar-icon,
|
||||
#urlbar:active .urlbar-icon,
|
||||
#urlbar[focused] .urlbar-icon {
|
||||
fill : var(--toolbar-color) !important;
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
-moz-box-pack: center !important;
|
||||
}
|
||||
|
||||
/* animations */
|
||||
toolbarbutton,
|
||||
.toolbarbutton-icon,
|
||||
.subviewbutton,
|
||||
#urlbar-background,
|
||||
.urlbar-icon,
|
||||
#userContext-indicator,
|
||||
#userContext-label,
|
||||
.urlbar-input-box,
|
||||
#identity-box,
|
||||
#tracking-protection-icon-container,
|
||||
[anonid=urlbar-go-button],
|
||||
.urlbar-icon-wrapper,
|
||||
#tracking-protection-icon,
|
||||
#identity-box image,
|
||||
stack,
|
||||
vbox,
|
||||
tab:not(:active) .tab-background,
|
||||
tab:not([beforeselected-visible])::after,
|
||||
tab[visuallyselected] .tab-background::before,
|
||||
tab[visuallyselected] .tab-background::before,
|
||||
.tab-close-button {
|
||||
transition : var(--animationSpeed) !important;
|
||||
}
|
||||
''
|
||||
|
|
@ -9,6 +9,7 @@ let
|
|||
"browser.urlbar.placeholderName" = "DuckDuckGo";
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"svg.context-properties.content.enabled" = true;
|
||||
"extensions.pocket.enabled" = false;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -63,8 +64,8 @@ in
|
|||
main = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
settings = commonSettings // { };
|
||||
userChrome = import ./firefox-ucc.nix { profile = "main"; base16 = config.kw.hexColors; };
|
||||
settings = commonSettings;
|
||||
userChrome = builtins.readFile (pkgs.firefox-uc { base16 = config.kw.hexColors; });
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,13 @@ let
|
|||
(import ./nur { inherit sources; })
|
||||
(import sources.emacs-overlay)
|
||||
(import ./rustfmt)
|
||||
(import ./firefox-tst)
|
||||
(import ./ff-tst-style)
|
||||
(import ./ff-uc-style)
|
||||
/* # TODO: implement these
|
||||
(import ./waybar-style)
|
||||
(import ./wofi-style)
|
||||
(import ./vimrc)
|
||||
*/
|
||||
] ++ (map (path: import "${path}/overlay.nix") [
|
||||
sources.arcexprs
|
||||
sources.katexprs
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ final: prev: {
|
|||
firefox-tst = final.callPackage ({ stdenv, sass }: { base16 }:
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
pname = "firefox-tst-css";
|
||||
pname = "ff-tst-style";
|
||||
version = "0.0.1";
|
||||
|
||||
phases = [ "buildPhase" ];
|
||||
|
|
@ -14,8 +14,8 @@ final: prev: {
|
|||
];
|
||||
|
||||
buildPhase = ''
|
||||
substituteAll $src firefox-tst-substituted.sass
|
||||
sass firefox-tst-substituted.sass $out --sourcemap=none --style expanded
|
||||
substituteAll $src tst-sub.sass
|
||||
sass tst-sub.sass $out --sourcemap=none --style expanded
|
||||
'';
|
||||
} // base16)) {};
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
// Colours
|
||||
$base00: @base00@
|
||||
$base01: @base01@
|
||||
$base02: @base02@
|
||||
|
|
@ -15,7 +14,6 @@ $base0C: @base0C@
|
|||
$base0D: @base0D@
|
||||
$base0E: @base0E@
|
||||
$base0F: @base0F@
|
||||
// Fonts
|
||||
$font_0: "Cozette"
|
||||
$font_1: "monospace !important"
|
||||
|
||||
21
overlays/ff-uc-style/default.nix
Normal file
21
overlays/ff-uc-style/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
final: prev: {
|
||||
firefox-uc = final.callPackage ({ stdenv, sass }: { base16 }:
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
pname = "ff-uc-style";
|
||||
version = "0.0.1";
|
||||
|
||||
phases = [ "buildPhase" ];
|
||||
|
||||
src = ./userChrome.sass;
|
||||
|
||||
buildInputs = [
|
||||
sass
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
substituteAll $src userChrome-sub.sass
|
||||
sass userChrome-sub.sass $out --sourcemap=none --style expanded
|
||||
'';
|
||||
} // base16)) {};
|
||||
}
|
||||
98
overlays/ff-uc-style/userChrome.sass
Normal file
98
overlays/ff-uc-style/userChrome.sass
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
$base00: @base00@
|
||||
$base01: @base01@
|
||||
$base02: @base02@
|
||||
$base03: @base03@
|
||||
$base04: @base04@
|
||||
$base05: @base05@
|
||||
$base06: @base06@
|
||||
$base07: @base07@
|
||||
$base08: @base08@
|
||||
$base09: @base09@
|
||||
$base0A: @base0A@
|
||||
$base0B: @base0B@
|
||||
$base0C: @base0C@
|
||||
$base0D: @base0D@
|
||||
$base0E: @base0E@
|
||||
$base0F: @base0F@
|
||||
$font_0: "Cozette"
|
||||
$font_1: "monospace !important"
|
||||
|
||||
$animations: "toolbarbutton", ".toolbarbutton-icon", ".subviewbutton", "#urlbar-background", ".urlbar-icon", "#userContext-indicator", "#userContext-label", ".urlbar-input-box", "#identity-box", "#tracking-protection-icon-container", "[anonid=urlbar-go-button]", ".urlbar-icon-wrapper", "#tracking-protection-icon", "#identity-box image", "stack", "vbox", "tab:not(:active) .tab-background", "tab:not([beforeselected-visible])::after", "tab[visuallyselected] .tab-background::before", "tab[visuallyselected] .tab-background::before", ".tab-close-button"
|
||||
$base00_backgrounds: "#nav-bar", "toolbar-menubar", "#menubar-items", "#main-menubar"
|
||||
$extendables: ".urlbar-icon", "#userContext-indicator", "#userContext-label"
|
||||
|
||||
%extend_1
|
||||
fill: transparent !important
|
||||
background: transparent !important
|
||||
color: transparent !important
|
||||
|
||||
@each $selector in $extendables
|
||||
#{$selector}
|
||||
@extend %extend_1
|
||||
|
||||
\:root
|
||||
--animationSpeed: 0.15s
|
||||
|
||||
*
|
||||
font-family: $font_0, $font_1
|
||||
|
||||
#TabsToolbar
|
||||
visibility: collapse
|
||||
|
||||
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]
|
||||
#sidebar-header
|
||||
visibility: collapse
|
||||
|
||||
+ #sidebar-splitter
|
||||
display: none !important
|
||||
|
||||
|
||||
#back-button
|
||||
display: none !important
|
||||
|
||||
#forward-button
|
||||
display: none !important
|
||||
|
||||
#urlbar-search-mode-indicator
|
||||
display: none !important
|
||||
|
||||
#urlbar
|
||||
text-align: center
|
||||
*|input::placeholder
|
||||
opacity: 0 !important
|
||||
|
||||
&:not(:hover):not([breakout][breakout-extend]) > #urlbar-background
|
||||
box-shadow: none !important
|
||||
background: @base01@ !important
|
||||
|
||||
&:hover .urlbar-icon
|
||||
fill: var(--toolbar-color) !important
|
||||
|
||||
&:active .urlbar-icon
|
||||
fill: var(--toolbar-color) !important
|
||||
|
||||
@each $selector in $base00_backgrounds
|
||||
#{$selector}
|
||||
background: @base00@ !important
|
||||
|
||||
#urlbar-background
|
||||
background: @base01@ !important
|
||||
|
||||
#star-button
|
||||
display: none
|
||||
|
||||
#navigator-toolbox
|
||||
border: none !important
|
||||
|
||||
.titlebar-spacer
|
||||
display: none !important
|
||||
|
||||
@each $selector in $animations
|
||||
#{$selector}
|
||||
transition: var(--animationSpeed) !important
|
||||
|
||||
#nav-bar-customization-target > toolbarspring
|
||||
max-width: none !important
|
||||
|
||||
#urlbar[focused] .urlbar-icon
|
||||
fill: var(--toolbar-color) !important
|
||||
Loading…
Add table
Add a link
Reference in a new issue