refactor: complete rewrite
This commit is contained in:
parent
19a4bbda3c
commit
8e81943cf9
399 changed files with 3396 additions and 8042 deletions
5
modules/home/workstation/browser/default.nix
Normal file
5
modules/home/workstation/browser/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./firefox
|
||||
];
|
||||
}
|
||||
71
modules/home/workstation/browser/firefox/default.nix
Normal file
71
modules/home/workstation/browser/firefox/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs',
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkMerge;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) default;
|
||||
|
||||
addons = inputs'.firefox-addons.packages;
|
||||
cfg = osConfig.ooknet.workstation.programs.firefox;
|
||||
firefoxMime = {
|
||||
"text/html" = ["firefox.desktop"];
|
||||
"x-scheme-handler/http" = ["firefox.desktop"];
|
||||
"x-scheme-handler/https" = ["firefox.desktop"];
|
||||
"x-scheme-handler/ftp" = ["firefox.desktop"];
|
||||
"x-scheme-handler/about" = ["firefox.desktop"];
|
||||
"x-scheme-handler/unknown" = ["firefox.desktop"];
|
||||
"application/x-extension-htm" = ["firefox.desktop"];
|
||||
"application/x-extension-html" = ["firefox.desktop"];
|
||||
"application/x-extension-shtml" = ["firefox.desktop"];
|
||||
"application/xhtml+xml" = ["firefox.desktop"];
|
||||
"application/x-extension-xhtml" = ["firefox.desktop"];
|
||||
"application/x-extension-xht" = ["firefox.desktop"];
|
||||
"application/json" = ["firefox.desktop"];
|
||||
};
|
||||
in {
|
||||
imports = [./tridactyl.nix];
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.enable || default.browser == "firefox") {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
nativeMessagingHosts = [pkgs.tridactyl-native];
|
||||
profiles.${admin.name} = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
extensions = with addons; [
|
||||
ublock-origin
|
||||
darkreader
|
||||
tridactyl
|
||||
# onepassword-password-manager # cannot get this to work unfree issue.
|
||||
];
|
||||
settings = import ./settings/ooksJs.nix;
|
||||
userChrome = import ./theme/ooksfox.nix {inherit fonts palette;};
|
||||
userContent = import ./theme/penguinFoxContent.nix;
|
||||
};
|
||||
profiles.testing = {
|
||||
id = 1;
|
||||
extensions = with addons; [
|
||||
ublock-origin
|
||||
tridactyl
|
||||
darkreader
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (default.browser == "firefox") {
|
||||
home.sessionVariables.BROWSER = "firefox";
|
||||
ooknet.binds.browser = "firefox";
|
||||
xdg.mimeApps = {
|
||||
associations.added = firefoxMime;
|
||||
defaultApplications = firefoxMime;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
72
modules/home/workstation/browser/firefox/settings/ooksJs.nix
Normal file
72
modules/home/workstation/browser/firefox/settings/ooksJs.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
#Basic Settings
|
||||
"browser.disableResetPrompt" = true;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"browser.cache.disk.enable" = false;
|
||||
"browser.cache.memory.enable" = true;
|
||||
"browser.cache.memory.capacity" = 524288;
|
||||
"browser.sessionstore.interval" = 15000000;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"reader.parse-on-load.enabled" = false;
|
||||
"accessibility.force_disabled" = 1;
|
||||
"browser.helperApps.deleteTempFileOnExit" = true;
|
||||
"browser.uitour.enabled" = false;
|
||||
|
||||
#Appearance
|
||||
"browser.uidensity" = 1;
|
||||
"browser.compactmode.show" = true;
|
||||
|
||||
#Startup
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
"browser.newtabpage.activity-stream.default.sites" = "";
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
|
||||
#Disable Recommendations
|
||||
"extensions.getAddons.showPane" = false;
|
||||
"extensions.htmlaboutaddons.recommendations.enabled" = false;
|
||||
"browser.discovery.enabled" = false;
|
||||
|
||||
#Telemetry
|
||||
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.server" = "data:,";
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"toolkit.telemetry.coverage.opt-out" = true;
|
||||
"toolkit.coverage.opt-out" = true;
|
||||
"toolkit.coverage.endpoint.base" = "";
|
||||
"browser.ping-centre.telemetry" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
||||
"toolkit.telemetry.shutdownPingSender.enabledFirstsession" = false;
|
||||
"browser.vpn_promo.enabled" = false;
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
"app.normandy.enabled" = false;
|
||||
"app.normandy.api_url" = "";
|
||||
|
||||
#Crash Reports
|
||||
"breakpad.reportURL" = "";
|
||||
"browser.tabs.crashReporting.sendReport" = false;
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
|
||||
|
||||
#Other
|
||||
"captivedetect.canonicalURL" = "";
|
||||
"network.captive-portal-service.enabled" = false;
|
||||
"network.connectivity-service.enabled" = false;
|
||||
|
||||
#Geolocation
|
||||
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
|
||||
"geo.provider.use_gpsd" = false;
|
||||
"geo.provider.use_geoclue" = false;
|
||||
|
||||
#Calculator
|
||||
"browser.urlbar.suggest.calculator" = true;
|
||||
}
|
||||
152
modules/home/workstation/browser/firefox/theme/ooksfox.nix
Normal file
152
modules/home/workstation/browser/firefox/theme/ooksfox.nix
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
palette,
|
||||
fonts,
|
||||
...
|
||||
}:
|
||||
with palette;
|
||||
#css
|
||||
''
|
||||
/* minimal firefox css ooks */
|
||||
|
||||
/* ===== Color Variables and Root Styles ===== */
|
||||
:root {
|
||||
/* Fonts */
|
||||
--font-mono: ${fonts.monospace.family}, monospace;
|
||||
}
|
||||
|
||||
/* ===== General UI Modifications ===== */
|
||||
/* Hide status panel */
|
||||
#statuspanel { display: none !important; }
|
||||
|
||||
/* Remove border radius from menus */
|
||||
menupopup, panel { --panel-border-radius: 0px !important; }
|
||||
menu, menuitem, menucaption { border-radius: 0px !important; }
|
||||
|
||||
/* Hide navigation context menu items */
|
||||
menupopup > #context-navigation,
|
||||
menupopup > #context-sep-navigation { display: none !important; }
|
||||
|
||||
/* Hide various toolbar buttons */
|
||||
#forward-button,
|
||||
#reload-button,
|
||||
#stop-button,
|
||||
#home-button,
|
||||
#library-button,
|
||||
#PanelUI-button,
|
||||
#unified-extensions-button,
|
||||
#star-button,
|
||||
#reader-mode-button,
|
||||
#save-to-pocket-button,
|
||||
#tracking-protection-icon-container,
|
||||
#page-action-buttons,
|
||||
#fxa-toolbar-menu-button,
|
||||
#identity-box { display: none !important; }
|
||||
|
||||
/* Hide customizable UI springs */
|
||||
#customizableui-special-spring1,
|
||||
#customizableui-special-spring2 { display: none; }
|
||||
|
||||
/* Hide Personal Toolbar */
|
||||
#PersonalToolbar { display: none !important; }
|
||||
|
||||
/* ===== URL Bar Styling ===== */
|
||||
|
||||
#urlbar-container {
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0!important;
|
||||
}
|
||||
|
||||
#urlbar-background {
|
||||
border: solid 1px !important;
|
||||
border-radius: 0 !important;
|
||||
outline: none !important;
|
||||
background: #${crust} !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
border: none !important;
|
||||
border-bottom: solid 1px !important;\
|
||||
}
|
||||
|
||||
/* Hide URL bar go button */
|
||||
.urlbar-go-button { display: none !important; }
|
||||
|
||||
/* Remove navigation bar background */
|
||||
#nav-bar.browser-toolbar { background: none !important; }
|
||||
|
||||
/* Position and style navigation bar */
|
||||
|
||||
#nav-bar {
|
||||
text-align: center;
|
||||
min-height: 0 !important;
|
||||
max-height: 0 !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
|
||||
/* Expand navigation bar on focus */
|
||||
#nav-bar:focus-within {
|
||||
max-height: 40px !important;
|
||||
height: 60px !important;
|
||||
min-height: 15px !important;
|
||||
}
|
||||
|
||||
/* ===== Tab Bar Styling ===== */
|
||||
/* Hide title bar buttons and spacer */
|
||||
.titlebar-close,
|
||||
.titlebar-spacer { display: none !important; }
|
||||
|
||||
/* Remove tab margin */
|
||||
#titlebar {
|
||||
--proton-tab-block-margin: 0px !important;
|
||||
--tab-block-margin: 0px !important;
|
||||
}
|
||||
|
||||
/* Remove tab shadows */
|
||||
#tabbrowser-tabs:not([noshadowfortests]) .tab-background:is([selected], [multiselected]) {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Hide tab-related buttons */
|
||||
#alltabs-button,
|
||||
#tabs-newtab-button,
|
||||
#firefox-view-button,
|
||||
#new-tab-button,
|
||||
.tab-close-button { display: none !important; }
|
||||
|
||||
/* Style tabs */
|
||||
tab {
|
||||
font-family: var(--font-mono);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Set tab and tab bar height */
|
||||
#TabsToolbar, .tabbrowser-tab {
|
||||
max-height: 35px !important;
|
||||
background: #${crust} !important;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Center tabs when not overflowing */
|
||||
#tabbrowser-arrowscrollbox:not([overflowing]) {
|
||||
--uc-flex-justify: center;
|
||||
}
|
||||
|
||||
scrollbox[orient="horizontal"] {
|
||||
justify-content: var(--uc-flex-justify, initial);
|
||||
}
|
||||
|
||||
/* Style selected tabs */
|
||||
#tabbrowser-tabs .tabbrowser-tab[selected] .tab-content {
|
||||
border: solid 1px var(--base05) !important;
|
||||
color: var(--base07);
|
||||
background: var(--base02)
|
||||
}
|
||||
|
||||
/* Style non-selected tabs */
|
||||
tab:not([selected="true"]) {
|
||||
/* border: solid 1px var(--base05) !important; */
|
||||
background: var(--base01) !important;
|
||||
}
|
||||
''
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
@-moz-document url-prefix(about:){
|
||||
|
||||
/* Removes the scrollbar on some places */
|
||||
body,html{overflow-y: auto}
|
||||
|
||||
/* Devtools */
|
||||
@-moz-document url-prefix(about:devtools){
|
||||
#toolbox-container{margin-top: 10px !important}
|
||||
.devtools-tabbar{background: transparent !important}
|
||||
.devtools-tab-line{border-radius: 0 0 5px 5px}
|
||||
.customize-animate-enter-done,.customize-menu,.top-site-outer:hover,button{background-color: transparent!important}}
|
||||
|
||||
/* Newtab */
|
||||
@-moz-document url("about:home"), url("about:newtab"){
|
||||
.search-wrapper .search-handoff-button .fake-caret {top: 13px !important; inset-inline-start: 48px !important}
|
||||
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
|
||||
.search-wrapper .search-handoff-button .fake-caret{top: 13px !important; inset-inline-start: 48px !important}
|
||||
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
|
||||
.outer-wrapper .search-wrapper{padding: 0px !important; display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; align-content: space-around !important; gap: 20px 10px !important}
|
||||
.search-wrapper .logo-and-wordmark .logo{background-size: 60px !important; height: 60px !important; width: 60px !important}
|
||||
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
|
||||
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
|
||||
.outer-wrapper.ds-outer-wrapper-breakpoint-override.only-search.visible-logo{display: flex !important; padding-top: 0px !important;vertical-align: middle}
|
||||
.customize-menu{border-radius: 10px 0 0 10px !important}
|
||||
#root > div{align-items: center; display: flex}}}
|
||||
''
|
||||
227
modules/home/workstation/browser/firefox/tridactyl.nix
Normal file
227
modules/home/workstation/browser/firefox/tridactyl.nix
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) default;
|
||||
cfg = osConfig.ooknet.workstation.programs.firefox;
|
||||
in {
|
||||
config = mkIf (default.browser == "firefox" || cfg.enable) {
|
||||
xdg.configFile = {
|
||||
"tridactyl/tridactylrc".text = ''
|
||||
set searchurls.nix https://sourcegraph.com/search?q=context:global+lang:nix %s
|
||||
|
||||
colorscheme ooknet
|
||||
|
||||
unbind --mode=normal t
|
||||
unbind --mode=normal gt
|
||||
|
||||
bind / fillcmdline find
|
||||
bind n findnext 1
|
||||
bind N findnext -1
|
||||
|
||||
bind gtr open http://192.168.1.210:9091/transmission/web/
|
||||
bind ttr tabopen http://192.168.1.210:9091/transmission/web/
|
||||
|
||||
bind gem open https://gmail.com
|
||||
bind tem tabopen https://gmail.com
|
||||
|
||||
bind gjf open http://192.168.1.210:8096
|
||||
bind tjf tabopen http://192.168.1.210:8096
|
||||
'';
|
||||
|
||||
# based off base16 themes
|
||||
# source: <https://github.com/bezmi/base16-tridactyl>
|
||||
"tridactyl/themes/ooknet.css".text =
|
||||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
:root {
|
||||
--font: ${fonts.monospace.family};
|
||||
--bg: #${palette.base00};
|
||||
--fg: #${palette.base05};
|
||||
--red: #${palette.base08};
|
||||
--green: #${palette.base0B};
|
||||
--blue: #${palette.base0D};
|
||||
--yellow: #${palette.base0A};
|
||||
--purple: #${palette.base0E};
|
||||
--orange: #${palette.base09};
|
||||
--cyan: #${palette.base0C};
|
||||
--comment: #${palette.base04};
|
||||
--selectedline: #${palette.base02};
|
||||
|
||||
|
||||
--tridactyl-fg: var(--fg);
|
||||
--tridactyl-bg: var(--bg);
|
||||
|
||||
--tridactyl-url-fg: var(--green);
|
||||
--tridactyl-url-bg: var(--bg);
|
||||
|
||||
--tridactyl-highlight-box-bg: var(--selectedline);
|
||||
--tridactyl-highlight-box-fg: var(--fg);
|
||||
|
||||
--tridactyl-of-fg: var(--fg);
|
||||
--tridactyl-of-bg: var(--selectedline);
|
||||
|
||||
--tridactyl-cmdl-fg: var(--bg);
|
||||
--tridactyl-cmdl-font-family: var(--selectedline);
|
||||
|
||||
--tridactyl-cmplt-font-family: var(--font);
|
||||
|
||||
--tridactyl-hintspan-font-family: var(--font);
|
||||
--tridactyl-hintspan-fg: var(--bg) !important;
|
||||
--tridactyl-hintspan-bg: var(--orange) !important;
|
||||
|
||||
--tridactyl-hint-active-fg: none;
|
||||
--tridactyl-hint-active-bg: var(--tridactyl-bg);
|
||||
--tridactyl-hint-active-outline: var(--green);
|
||||
--tridactyl-hint-bg: none;
|
||||
--tridactyl-hint-outline: none;
|
||||
}
|
||||
|
||||
#tridactyl-colon::before {
|
||||
content: " ";
|
||||
font-family: var(--font);
|
||||
font-size: 1.5rem;
|
||||
color: var(--green);
|
||||
display: inline;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
#command-line-holder {
|
||||
order: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 2px solid var(--tridactyl-fg);
|
||||
background: var(--tridactyl-bg);
|
||||
}
|
||||
|
||||
#tridactyl-input {
|
||||
padding: 1rem;
|
||||
color: var(--tridactyl-fg);
|
||||
width: 90%;
|
||||
font-family: var(--font);
|
||||
font-size: 1.5rem;
|
||||
line-height: 1.5;
|
||||
background: var(--tridactyl-bg);
|
||||
padding-left: unset;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
|
||||
#completions table {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 200;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
padding: 1rem;
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
#completions > div {
|
||||
max-height: calc(20 * var(--option-height));
|
||||
min-height: calc(10 * var(--option-height));
|
||||
}
|
||||
|
||||
#completions {
|
||||
--option-height: 1.4em;
|
||||
color: var(--tridactyl-fg);
|
||||
background: var(--tridactyl-bg);
|
||||
display: inline-block;
|
||||
font-size: unset;
|
||||
font-weight: 200;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
border-top: unset;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#completions .HistoryCompletionSource {
|
||||
max-height: unset;
|
||||
min-height: unset;
|
||||
}
|
||||
|
||||
#completions .HistoryCompletionSource table {
|
||||
width: 100%;
|
||||
font-size: 9pt;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
#completions .BmarkCompletionSource {
|
||||
max-height: unset;
|
||||
min-height: unset;
|
||||
}
|
||||
|
||||
#completions table tr td.prefix,
|
||||
#completions table tr td.privatewindow,
|
||||
#completions table tr td.container,
|
||||
#completions table tr td.icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#completions .BufferCompletionSource table {
|
||||
width: unset;
|
||||
font-size: unset;
|
||||
border-spacing: unset;
|
||||
table-layout: unset;
|
||||
}
|
||||
|
||||
#completions table tr .title {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#completions table tr {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#completions .sectionHeader {
|
||||
background: unset;
|
||||
font-weight: bold;
|
||||
border-bottom: unset;
|
||||
padding: 1rem !important;
|
||||
padding-left: unset;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
#cmdline_iframe {
|
||||
position: fixed !important;
|
||||
bottom: unset;
|
||||
top: 25% !important;
|
||||
left: 10% !important;
|
||||
z-index: 2147483647 !important;
|
||||
width: 80% !important;
|
||||
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 20px !important;
|
||||
}
|
||||
|
||||
.TridactylStatusIndicator {
|
||||
position: fixed !important;
|
||||
bottom: 0 !important;
|
||||
background: var(--tridactyl-bg) !important;
|
||||
border: unset !important;
|
||||
border: 1px var(--green) solid !important;
|
||||
font-size: 12pt !important;
|
||||
padding: 0.8ex !important;
|
||||
}
|
||||
|
||||
#completions .focused {
|
||||
background: var(--green);
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
#completions .focused .url {
|
||||
background: var(--green);
|
||||
color: var(--bg);
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue