Initial commit
This commit is contained in:
commit
f94fd70f07
151 changed files with 7650 additions and 0 deletions
3
zen/.gitignore
vendored
Normal file
3
zen/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
node_modules/
|
||||
dist/
|
||||
web-ext-artifacts/
|
||||
15
zen/caelestia-firefox-integration/manifest.json
Normal file
15
zen/caelestia-firefox-integration/manifest.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "CaelestiaFox",
|
||||
"version": "2.0",
|
||||
"description": "A Firefox theme for the Caelestia dotfiles.",
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "caelestiafox@caelestia.org"
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"scripts": ["dist/extension.js"]
|
||||
},
|
||||
"permissions": ["nativeMessaging", "theme"]
|
||||
}
|
||||
4620
zen/caelestia-firefox-integration/package-lock.json
generated
Normal file
4620
zen/caelestia-firefox-integration/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
9
zen/caelestia-firefox-integration/package.json
Normal file
9
zen/caelestia-firefox-integration/package.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "caelestiafox",
|
||||
"version": "0.0.1",
|
||||
"license": "GPL-3.0-only",
|
||||
"devDependencies": {
|
||||
"@types/firefox-webext-browser": "^120.0.4",
|
||||
"web-ext": "^8.4.0"
|
||||
}
|
||||
}
|
||||
155
zen/caelestia-firefox-integration/src/extension.ts
Normal file
155
zen/caelestia-firefox-integration/src/extension.ts
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
interface Colours {
|
||||
rosewater: string;
|
||||
flamingo: string;
|
||||
pink: string;
|
||||
mauve: string;
|
||||
red: string;
|
||||
maroon: string;
|
||||
peach: string;
|
||||
yellow: string;
|
||||
green: string;
|
||||
teal: string;
|
||||
sky: string;
|
||||
sapphire: string;
|
||||
blue: string;
|
||||
lavender: string;
|
||||
primary_paletteKeyColor: string;
|
||||
secondary_paletteKeyColor: string;
|
||||
tertiary_paletteKeyColor: string;
|
||||
neutral_paletteKeyColor: string;
|
||||
neutral_variant_paletteKeyColor: string;
|
||||
background: string;
|
||||
onBackground: string;
|
||||
surface: string;
|
||||
surfaceDim: string;
|
||||
surfaceBright: string;
|
||||
surfaceContainerLowest: string;
|
||||
surfaceContainerLow: string;
|
||||
surfaceContainer: string;
|
||||
surfaceContainerHigh: string;
|
||||
surfaceContainerHighest: string;
|
||||
onSurface: string;
|
||||
surfaceVariant: string;
|
||||
onSurfaceVariant: string;
|
||||
inverseSurface: string;
|
||||
inverseOnSurface: string;
|
||||
outline: string;
|
||||
outlineVariant: string;
|
||||
shadow: string;
|
||||
scrim: string;
|
||||
surfaceTint: string;
|
||||
primary: string;
|
||||
onPrimary: string;
|
||||
primaryContainer: string;
|
||||
onPrimaryContainer: string;
|
||||
inversePrimary: string;
|
||||
secondary: string;
|
||||
onSecondary: string;
|
||||
secondaryContainer: string;
|
||||
onSecondaryContainer: string;
|
||||
tertiary: string;
|
||||
onTertiary: string;
|
||||
tertiaryContainer: string;
|
||||
onTertiaryContainer: string;
|
||||
error: string;
|
||||
onError: string;
|
||||
errorContainer: string;
|
||||
onErrorContainer: string;
|
||||
primaryFixed: string;
|
||||
primaryFixedDim: string;
|
||||
onPrimaryFixed: string;
|
||||
onPrimaryFixedVariant: string;
|
||||
secondaryFixed: string;
|
||||
secondaryFixedDim: string;
|
||||
onSecondaryFixed: string;
|
||||
onSecondaryFixedVariant: string;
|
||||
tertiaryFixed: string;
|
||||
tertiaryFixedDim: string;
|
||||
onTertiaryFixed: string;
|
||||
onTertiaryFixedVariant: string;
|
||||
}
|
||||
|
||||
interface Message {
|
||||
name: string;
|
||||
flavour: string;
|
||||
mode: "dark" | "light";
|
||||
variant: string;
|
||||
colours: Colours;
|
||||
}
|
||||
|
||||
const browserColours = (colours: Colours) => ({
|
||||
bookmark_text: colours.onSurface,
|
||||
button_background_hover: colours.surfaceContainerHigh,
|
||||
button_background_active: colours.surfaceContainerHighest,
|
||||
icons: colours.secondary,
|
||||
icons_attention: colours.primary,
|
||||
frame: colours.surfaceDim,
|
||||
frame_inactive: colours.surfaceDim,
|
||||
tab_text: colours.onSurface,
|
||||
tab_loading: colours.primary,
|
||||
tab_background_text: colours.outline,
|
||||
tab_selected: colours.surfaceContainer,
|
||||
tab_line: colours.surfaceContainer,
|
||||
toolbar: colours.surfaceContainer,
|
||||
toolbar_text: colours.onSurface,
|
||||
toolbar_field: colours.surfaceBright,
|
||||
toolbar_field_focus: colours.surfaceBright,
|
||||
toolbar_field_border: colours.surfaceBright,
|
||||
toolbar_field_border_focus: colours.primary,
|
||||
toolbar_field_text: colours.onSurfaceVariant,
|
||||
toolbar_field_text_focus: colours.onSurface,
|
||||
toolbar_field_highlight: colours.primary,
|
||||
toolbar_field_highlight_text: colours.onPrimary,
|
||||
toolbar_field_separator: colours.surface,
|
||||
toolbar_top_separator: colours.surfaceContainer,
|
||||
toolbar_bottom_separator: colours.surface,
|
||||
toolbar_vertical_separator: colours.secondaryContainer,
|
||||
ntp_background: colours.surface,
|
||||
ntp_card_background: colours.surfaceContainer,
|
||||
ntp_text: colours.onSurface,
|
||||
popup: colours.surfaceContainer,
|
||||
popup_border: colours.outlineVariant,
|
||||
popup_text: colours.onSurface,
|
||||
popup_highlight: colours.primary,
|
||||
popup_highlight_text: colours.onPrimary,
|
||||
sidebar: colours.surfaceContainerHigh,
|
||||
sidebar_border: colours.surfaceContainerHigh,
|
||||
sidebar_text: colours.onSurface,
|
||||
sidebar_highlight: colours.secondaryContainer,
|
||||
sidebar_highlight_text: colours.onSecondaryContainer,
|
||||
});
|
||||
|
||||
const darkReaderColours = (scheme: Message) => ({
|
||||
mode: scheme.mode === "light" ? 0 : 1,
|
||||
[`${scheme.mode}SchemeTextColor`]: `#${scheme.colours.onSurface}`,
|
||||
[`${scheme.mode}SchemeBackgroundColor`]: `#${scheme.colours.surface}`,
|
||||
});
|
||||
|
||||
let darkReader: browser.runtime.Port | null = browser.runtime.connect("addon@darkreader.org");
|
||||
darkReader.onDisconnect.addListener(() => {
|
||||
console.log("DarkReader disconnected:", darkReader?.error);
|
||||
darkReader = null;
|
||||
});
|
||||
|
||||
browser.runtime.connectNative("caelestiafox").onMessage.addListener(msg => {
|
||||
console.log("Received message:", msg);
|
||||
|
||||
const res = msg as Message;
|
||||
const colours = Object.fromEntries(Object.entries(res.colours).map(([n, c]) => [n, `#${c}`])) as unknown as Colours;
|
||||
const theme: browser._manifest.ThemeType = {
|
||||
colors: browserColours(colours),
|
||||
properties: {
|
||||
color_scheme: res.mode,
|
||||
content_color_scheme: res.mode,
|
||||
},
|
||||
};
|
||||
browser.theme.update(theme);
|
||||
console.log("Theme updated:", theme);
|
||||
|
||||
if (darkReader !== null) {
|
||||
darkReader.postMessage({ type: "setTheme", data: darkReaderColours(res) });
|
||||
console.log("DarkReader theme updated.");
|
||||
}
|
||||
});
|
||||
|
||||
console.log("CaelestiaFox started.");
|
||||
12
zen/caelestia-firefox-integration/tsconfig.json
Normal file
12
zen/caelestia-firefox-integration/tsconfig.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES6",
|
||||
"module": "ES2020",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
20
zen/native_app/app.fish
Executable file
20
zen/native_app/app.fish
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
function message -a msg
|
||||
# The message length as 4 hex bytes
|
||||
set -l x (printf '%08X' (string length -- $msg))
|
||||
# Write each of the 4 bytes
|
||||
printf '%b' "\\x$(string sub -s 7 -l 2 $x)\\x$(string sub -s 5 -l 2 $x)\\x$(string sub -s 3 -l 2 $x)\\x$(string sub -s 1 -l 2 $x)"
|
||||
# Write the message itself
|
||||
printf '%s' $msg
|
||||
end
|
||||
|
||||
set -q XDG_STATE_HOME && set -l state $XDG_STATE_HOME || set -l state $HOME/.local/state
|
||||
set -l state_dir $state/caelestia
|
||||
set -l scheme_path $state_dir/scheme.json
|
||||
|
||||
message (jq -c . $scheme_path)
|
||||
|
||||
inotifywait -q -e 'close_write,moved_to,create' -m $state_dir | while read dir events file
|
||||
test "$dir$file" = $scheme_path && message (jq -c . $scheme_path)
|
||||
end
|
||||
7
zen/native_app/manifest.json
Normal file
7
zen/native_app/manifest.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "caelestiafox",
|
||||
"description": "Native app for CaelestiaFox extension.",
|
||||
"path": "{{ $lib }}/caelestiafox",
|
||||
"type": "stdio",
|
||||
"allowed_extensions": ["caelestiafox@caelestia.org"]
|
||||
}
|
||||
133
zen/userChrome.css
Normal file
133
zen/userChrome.css
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
/* Catppuccin Mocha Pink userChrome.css*/
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--zen-colors-primary: #313244 !important;
|
||||
--zen-primary-color: #f5c2e7 !important;
|
||||
--zen-colors-secondary: #313244 !important;
|
||||
--zen-colors-tertiary: #181825 !important;
|
||||
--zen-colors-border: #f5c2e7 !important;
|
||||
--toolbarbutton-icon-fill: #f5c2e7 !important;
|
||||
--lwt-text-color: #cdd6f4 !important;
|
||||
--toolbar-field-color: #cdd6f4 !important;
|
||||
--tab-selected-textcolor: rgb(225, 204, 238) !important;
|
||||
--toolbar-field-focus-color: #cdd6f4 !important;
|
||||
--toolbar-color: #cdd6f4 !important;
|
||||
--newtab-text-primary-color: #cdd6f4 !important;
|
||||
--arrowpanel-color: #cdd6f4 !important;
|
||||
--arrowpanel-background: #1e1e2e !important;
|
||||
--sidebar-text-color: #cdd6f4 !important;
|
||||
--lwt-sidebar-text-color: #cdd6f4 !important;
|
||||
--lwt-sidebar-background-color: #11111b !important;
|
||||
--toolbar-bgcolor: #313244 !important;
|
||||
--newtab-background-color: #1e1e2e !important;
|
||||
--zen-themed-toolbar-bg: #181825 !important;
|
||||
--zen-main-browser-background: #181825 !important;
|
||||
--toolbox-bgcolor-inactive: #181825 !important;
|
||||
}
|
||||
* {
|
||||
font-family: Maple Mono NF !important;
|
||||
} *
|
||||
|
||||
#permissions-granted-icon {
|
||||
color: #181825 !important;
|
||||
}
|
||||
|
||||
.sidebar-placesTree {
|
||||
background-color: #1e1e2e !important;
|
||||
}
|
||||
|
||||
#zen-workspaces-button {
|
||||
background-color: #1e1e2e !important;
|
||||
}
|
||||
|
||||
#TabsToolbar {
|
||||
background-color: #181825 !important;
|
||||
}
|
||||
|
||||
.urlbar-background {
|
||||
background-color: #1e1e2e !important;
|
||||
}
|
||||
|
||||
.content-shortcuts {
|
||||
background-color: #1e1e2e !important;
|
||||
border-color: #f5c2e7 !important;
|
||||
}
|
||||
|
||||
.urlbarView-url {
|
||||
color: #f5c2e7 !important;
|
||||
}
|
||||
|
||||
#zenEditBookmarkPanelFaviconContainer {
|
||||
background: #11111b !important;
|
||||
}
|
||||
|
||||
#zen-media-controls-toolbar {
|
||||
& #zen-media-progress-bar {
|
||||
&::-moz-range-track {
|
||||
background: #313244 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
toolbar .toolbarbutton-1 {
|
||||
&:not([disabled]) {
|
||||
&:is([open], [checked])
|
||||
> :is(
|
||||
.toolbarbutton-icon,
|
||||
.toolbarbutton-text,
|
||||
.toolbarbutton-badge-stack
|
||||
) {
|
||||
fill: #11111b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.identity-color-blue {
|
||||
--identity-tab-color: #89b4fa !important;
|
||||
--identity-icon-color: #89b4fa !important;
|
||||
}
|
||||
|
||||
.identity-color-turquoise {
|
||||
--identity-tab-color: #94e2d5 !important;
|
||||
--identity-icon-color: #94e2d5 !important;
|
||||
}
|
||||
|
||||
.identity-color-green {
|
||||
--identity-tab-color: #a6e3a1 !important;
|
||||
--identity-icon-color: #a6e3a1 !important;
|
||||
}
|
||||
|
||||
.identity-color-yellow {
|
||||
--identity-tab-color: #f9e2af !important;
|
||||
--identity-icon-color: #f9e2af !important;
|
||||
}
|
||||
|
||||
.identity-color-orange {
|
||||
--identity-tab-color: #fab387 !important;
|
||||
--identity-icon-color: #fab387 !important;
|
||||
}
|
||||
|
||||
.identity-color-red {
|
||||
--identity-tab-color: #f38ba8 !important;
|
||||
--identity-icon-color: #f38ba8 !important;
|
||||
}
|
||||
|
||||
.identity-color-pink {
|
||||
--identity-tab-color: #f5c2e7 !important;
|
||||
--identity-icon-color: #f5c2e7 !important;
|
||||
}
|
||||
|
||||
.identity-color-purple {
|
||||
--identity-tab-color: #cba6f7 !important;
|
||||
--identity-icon-color: #cba6f7 !important;
|
||||
}
|
||||
|
||||
hbox#titlebar {
|
||||
background-color: #181825 !important;
|
||||
}
|
||||
|
||||
#zen-appcontent-navbar-container {
|
||||
background-color: #181825 !important;
|
||||
}
|
||||
}
|
||||
158
zen/userContent.css
Normal file
158
zen/userContent.css
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
/* Catppuccin Mocha Pink userContent.css*/
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
/* Common variables affecting all pages */
|
||||
@-moz-document url-prefix("about:") {
|
||||
:root {
|
||||
--in-content-page-color: #cdd6f4 !important;
|
||||
--color-accent-primary: #f5c2e7 !important;
|
||||
--color-accent-primary-hover: rgb(249, 217, 240) !important;
|
||||
--color-accent-primary-active: rgb(245, 195, 219) !important;
|
||||
background-color: #1e1e2e !important;
|
||||
--in-content-page-background: #1e1e2e !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Variables and styles specific to about:newtab and about:home */
|
||||
@-moz-document url("about:newtab"), url("about:home") {
|
||||
|
||||
:root {
|
||||
--newtab-background-color: #1e1e2e !important;
|
||||
--newtab-background-color-secondary: #313244 !important;
|
||||
--newtab-element-hover-color: #313244 !important;
|
||||
--newtab-text-primary-color: #cdd6f4 !important;
|
||||
--newtab-wordmark-color: #cdd6f4 !important;
|
||||
--newtab-primary-action-background: #f5c2e7 !important;
|
||||
}
|
||||
|
||||
.icon {
|
||||
color: #f5c2e7 !important;
|
||||
}
|
||||
|
||||
.search-wrapper .logo-and-wordmark .logo {
|
||||
background: url("zen-logo-mocha.svg"), url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Pink/zen-logo-mocha.svg") no-repeat center !important;
|
||||
display: inline-block !important;
|
||||
height: 82px !important;
|
||||
width: 82px !important;
|
||||
background-size: 82px !important;
|
||||
}
|
||||
|
||||
@media (max-width: 609px) {
|
||||
.search-wrapper .logo-and-wordmark .logo {
|
||||
background-size: 64px !important;
|
||||
height: 64px !important;
|
||||
width: 64px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.card-outer:is(:hover, :focus, .active):not(.placeholder) .card-title {
|
||||
color: #f5c2e7 !important;
|
||||
}
|
||||
|
||||
.top-site-outer .search-topsite {
|
||||
background-color: #89b4fa !important;
|
||||
}
|
||||
|
||||
.compact-cards .card-outer .card-context .card-context-icon.icon-download {
|
||||
fill: #a6e3a1 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Variables and styles specific to about:preferences */
|
||||
@-moz-document url-prefix("about:preferences") {
|
||||
:root {
|
||||
--zen-colors-tertiary: #181825 !important;
|
||||
--in-content-text-color: #cdd6f4 !important;
|
||||
--link-color: #f5c2e7 !important;
|
||||
--link-color-hover: rgb(249, 217, 240) !important;
|
||||
--zen-colors-primary: #313244 !important;
|
||||
--in-content-box-background: #313244 !important;
|
||||
--zen-primary-color: #f5c2e7 !important;
|
||||
}
|
||||
|
||||
groupbox , moz-card{
|
||||
background: #1e1e2e !important;
|
||||
}
|
||||
|
||||
button,
|
||||
groupbox menulist {
|
||||
background: #313244 !important;
|
||||
color: #cdd6f4 !important;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
background-color: #11111b !important;
|
||||
}
|
||||
|
||||
.identity-color-blue {
|
||||
--identity-tab-color: #8aadf4 !important;
|
||||
--identity-icon-color: #8aadf4 !important;
|
||||
}
|
||||
|
||||
.identity-color-turquoise {
|
||||
--identity-tab-color: #8bd5ca !important;
|
||||
--identity-icon-color: #8bd5ca !important;
|
||||
}
|
||||
|
||||
.identity-color-green {
|
||||
--identity-tab-color: #a6da95 !important;
|
||||
--identity-icon-color: #a6da95 !important;
|
||||
}
|
||||
|
||||
.identity-color-yellow {
|
||||
--identity-tab-color: #eed49f !important;
|
||||
--identity-icon-color: #eed49f !important;
|
||||
}
|
||||
|
||||
.identity-color-orange {
|
||||
--identity-tab-color: #f5a97f !important;
|
||||
--identity-icon-color: #f5a97f !important;
|
||||
}
|
||||
|
||||
.identity-color-red {
|
||||
--identity-tab-color: #ed8796 !important;
|
||||
--identity-icon-color: #ed8796 !important;
|
||||
}
|
||||
|
||||
.identity-color-pink {
|
||||
--identity-tab-color: #f5bde6 !important;
|
||||
--identity-icon-color: #f5bde6 !important;
|
||||
}
|
||||
|
||||
.identity-color-purple {
|
||||
--identity-tab-color: #c6a0f6 !important;
|
||||
--identity-icon-color: #c6a0f6 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Variables and styles specific to about:addons */
|
||||
@-moz-document url-prefix("about:addons") {
|
||||
:root {
|
||||
--zen-dark-color-mix-base: #181825 !important;
|
||||
--background-color-box: #1e1e2e !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Variables and styles specific to about:protections */
|
||||
@-moz-document url-prefix("about:protections") {
|
||||
:root {
|
||||
--zen-primary-color: #1e1e2e !important;
|
||||
--social-color: #cba6f7 !important;
|
||||
--coockie-color: #89dceb !important;
|
||||
--fingerprinter-color: #f9e2af !important;
|
||||
--cryptominer-color: #b4befe !important;
|
||||
--tracker-color: #a6e3a1 !important;
|
||||
--in-content-primary-button-background-hover: rgb(81, 83, 105) !important;
|
||||
--in-content-primary-button-text-color-hover: #cdd6f4 !important;
|
||||
--in-content-primary-button-background: #45475a !important;
|
||||
--in-content-primary-button-text-color: #cdd6f4 !important;
|
||||
}
|
||||
|
||||
|
||||
.card {
|
||||
background-color: #313244 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
13
zen/zen-logo-mocha.svg
Normal file
13
zen/zen-logo-mocha.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_15_9)">
|
||||
<rect width="1024" height="1024" rx="225" fill="#11111b"/>
|
||||
<circle cx="512" cy="512" r="340" stroke="#cdd6f4" stroke-width="70"/>
|
||||
<circle cx="512" cy="512" r="224.915" stroke="#cdd6f4" stroke-width="51"/>
|
||||
<circle cx="512" cy="512" r="129.018" stroke="#cdd6f4" stroke-width="31"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_15_9">
|
||||
<rect width="1024" height="1024" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 569 B |
Loading…
Add table
Add a link
Reference in a new issue