Upgrade to Agsv2 + Astal (#533)

* migrate to astal

* Reorganize project structure.

* progress

* Migrate Dashboard and Window Title modules.

* Migrate clock and notification bar modules.

* Remove unused code

* Media menu

* Rework network and volume modules

* Finish custom modules.

* Migrate battery bar module.

* Update battery module and organize helpers.

* Migrate workspace module.

* Wrap up bar modules.

* Checkpoint before I inevitbly blow something up.

* Updates

* Fix event propagation logic.

* Type fixes

* More type fixes

* Fix padding for event boxes.

* Migrate volume menu and refactor scroll event handlers.

* network module WIP

* Migrate network service.

* Migrate bluetooth menu

* Updates

* Migrate notifications

* Update scrolling behavior for custom modules.

* Improve popup notifications and add timer functionality.

* Migration notifications menu header/controls.

* Migrate notifications menu and consolidate notifications menu code.

* Migrate power menu.

* Dashboard progress

* Migrate dashboard

* Migrate media menu.

* Reduce media menu nesting.

* Finish updating media menu bindings to navigate active player.

* Migrate battery menu

* Consolidate code

* Migrate calendar menu

* Fix workspace logic to update on client add/change/remove and consolidate code.

* Migrate osd

* Consolidate hyprland service connections.

* Implement startup dropdown menu position allocation.

* Migrate settings menu (WIP)

* Settings dialo menu fixes

* Finish Dashboard menu

* Type updates

* update submoldule for types

* update github ci

* ci

* Submodule update

* Ci updates

* Remove type checking for now.

* ci fix

* Fix a bunch of stuff, losing track... need rest. Brb coffee

* Validate dropdown menu before render.

* Consolidate code and add auto-hide functionality.

* Improve auto-hide behavior.

* Consolidate audio menu code

* Organize bluetooth code

* Improve active player logic

* Properly dismiss a notification on action button resolution.

* Implement CLI command engine and migrate CLI commands.

* Handle variable disposal

* Bar component fixes and add hyprland startup rules.

* Handle potentially null bindings network and bluetooth bindings.

* Handle potentially null wired adapter.

* Fix GPU stats

* Handle poller for GPU

* Fix gpu bar logic.

* Clean up logic for stat bars.

* Handle wifi and wired bar icon bindings.

* Fix battery percentages

* Fix switch behavior

* Wifi staging fixes

* Reduce redundant hyprland service calls.

* Code cleanup

* Document the option code and reduce redundant calls to optimize performance.

* Remove outdated comment.

* Add JSDocs

* Add meson to build hyprpanel

* Consistency updates

* Organize commands

* Fix images not showing up on notifications.

* Remove todo

* Move hyprpanel configuration to the ~/.config/hyprpanel directory and add utility commands.

* Handle SRC directory for the bundled/built hyprpanel.

* Add namespaces to all windows

* Migrate systray

* systray updates

* Update meson to include ts, tsx and scss files.

* Remove log from meson

* Fix file choose path and make it float.

* Added a command to check the dependency status

* Update dep names.

* Get scale directly from env

* Add todo
This commit is contained in:
Jas Singh
2024-12-20 18:10:10 -08:00
committed by GitHub
parent 955eed6c60
commit 2ffd602910
605 changed files with 19543 additions and 15999 deletions

View File

@@ -0,0 +1,74 @@
import { exec, GObject, monitorFile, property, readFileAsync, register } from 'astal';
import { sh } from 'src/lib/utils';
const get = (args: string): number => Number(exec(`brightnessctl ${args}`));
const screen = exec(`bash -c "ls -w1 /sys/class/backlight | head -1"`);
const kbd = exec(`bash -c "ls -w1 /sys/class/leds | grep '::kbd_backlight$' | head -1"`);
@register({ GTypeName: 'Brightness' })
export default class Brightness extends GObject.Object {
static instance: Brightness;
static get_default(): Brightness {
if (!Brightness.instance) {
Brightness.instance = new Brightness();
}
return Brightness.instance;
}
#kbdMax = kbd?.length ? get(`--device ${kbd} max`) : 0;
#kbd = kbd?.length ? get(`--device ${kbd} get`) : 0;
#screenMax = screen?.length ? get(`--device ${screen} max`) : 0;
#screen = screen?.length ? get(`--device ${screen} get`) / (get(`--device ${screen} max`) || 1) : 0;
@property(Number)
get kbd(): number {
return this.#kbd;
}
@property(Number)
get screen(): number {
return this.#screen;
}
set kbd(value: number) {
if (value < 0 || value > this.#kbdMax || !kbd?.length) return;
sh(`brightnessctl -d ${kbd} s ${value} -q`).then(() => {
this.#kbd = value;
this.notify('kbd');
});
}
set screen(percent: number) {
if (!screen?.length) return;
if (percent < 0) percent = 0;
if (percent > 1) percent = 1;
sh(`brightnessctl set ${Math.round(percent * 100)}% -d ${screen} -q`).then(() => {
this.#screen = percent;
this.notify('screen');
});
}
constructor() {
super();
const screenPath = `/sys/class/backlight/${screen}/brightness`;
const kbdPath = `/sys/class/leds/${kbd}/brightness`;
monitorFile(screenPath, async (f) => {
const v = await readFileAsync(f);
this.#screen = Number(v) / this.#screenMax;
this.notify('screen');
});
monitorFile(kbdPath, async (f) => {
const v = await readFileAsync(f);
this.#kbd = Number(v) / this.#kbdMax;
this.notify('kbd');
});
}
}

52
src/services/Cpu.ts Normal file
View File

@@ -0,0 +1,52 @@
// TODO: Convert to a real service
import { bind, Variable } from 'astal';
import GTop from 'gi://GTop';
import { FunctionPoller } from 'src/lib/poller/FunctionPoller';
class Cpu {
private updateFrequency = Variable(2000);
private previousCpuData = new GTop.glibtop_cpu();
private cpuPoller: FunctionPoller<number, []>;
public cpu = Variable(0);
constructor() {
GTop.glibtop_get_cpu(this.previousCpuData);
this.calculateUsage = this.calculateUsage.bind(this);
this.cpuPoller = new FunctionPoller<number, []>(this.cpu, [], bind(this.updateFrequency), this.calculateUsage);
this.cpuPoller.initialize();
}
public calculateUsage(): number {
const currentCpuData = new GTop.glibtop_cpu();
GTop.glibtop_get_cpu(currentCpuData);
// Calculate the differences from the previous to current data
const totalDiff = currentCpuData.total - this.previousCpuData.total;
const idleDiff = currentCpuData.idle - this.previousCpuData.idle;
const cpuUsagePercentage = totalDiff > 0 ? ((totalDiff - idleDiff) / totalDiff) * 100 : 0;
this.previousCpuData = currentCpuData;
return cpuUsagePercentage;
}
public updateTimer(timerInMs: number): void {
this.updateFrequency.set(timerInMs);
}
public stopPoller(): void {
this.cpuPoller.stop();
}
public startPoller(): void {
this.cpuPoller.start();
}
}
export default Cpu;

69
src/services/Gpu.ts Normal file
View File

@@ -0,0 +1,69 @@
// TODO: Convert to a real service
import { bind, exec, Variable } from 'astal';
import { FunctionPoller } from 'src/lib/poller/FunctionPoller';
import { GPUStat } from 'src/lib/types/gpustat';
class Gpu {
private updateFrequency = Variable(2000);
private gpuPoller: FunctionPoller<number, []>;
public gpuUsage = Variable<number>(0);
constructor() {
this.calculateUsage = this.calculateUsage.bind(this);
this.gpuPoller = new FunctionPoller<number, []>(
this.gpuUsage,
[],
bind(this.updateFrequency),
this.calculateUsage,
);
this.gpuPoller.initialize();
}
public calculateUsage(): number {
try {
const gpuStats = exec('gpustat --json');
if (typeof gpuStats !== 'string') {
return 0;
}
const data = JSON.parse(gpuStats);
const totalGpu = 100;
const usedGpu =
data.gpus.reduce((acc: number, gpu: GPUStat) => {
return acc + gpu['utilization.gpu'];
}, 0) / data.gpus.length;
return this.divide([totalGpu, usedGpu]);
} catch (error) {
if (error instanceof Error) {
console.error('Error getting GPU stats:', error.message);
} else {
console.error('Unknown error getting GPU stats');
}
return 0;
}
}
private divide([total, free]: number[]): number {
return free / total;
}
updateTimer(timerInMs: number): void {
this.updateFrequency.set(timerInMs);
}
public stopPoller(): void {
this.gpuPoller.stop();
}
public startPoller(): void {
this.gpuPoller.start();
}
}
export default Gpu;

88
src/services/Ram.ts Normal file
View File

@@ -0,0 +1,88 @@
// TODO: Convert to a real service
import { bind, GLib, Variable } from 'astal';
import { FunctionPoller } from 'src/lib/poller/FunctionPoller';
import { GenericResourceData } from 'src/lib/types/customModules/generic';
class Ram {
private updateFrequency = Variable(2000);
private shouldRound = false;
private ramPoller: FunctionPoller<GenericResourceData, []>;
public ram = Variable<GenericResourceData>({ total: 0, used: 0, percentage: 0, free: 0 });
constructor() {
this.calculateUsage = this.calculateUsage.bind(this);
this.ramPoller = new FunctionPoller<GenericResourceData, []>(
this.ram,
[],
bind(this.updateFrequency),
this.calculateUsage,
);
this.ramPoller.initialize('ram');
}
public calculateUsage(): GenericResourceData {
try {
const [success, meminfoBytes] = GLib.file_get_contents('/proc/meminfo');
if (!success || !meminfoBytes) {
throw new Error('Failed to read /proc/meminfo or file content is null.');
}
const meminfo = new TextDecoder('utf-8').decode(meminfoBytes);
const totalMatch = meminfo.match(/MemTotal:\s+(\d+)/);
const availableMatch = meminfo.match(/MemAvailable:\s+(\d+)/);
if (!totalMatch || !availableMatch) {
throw new Error('Failed to parse /proc/meminfo for memory values.');
}
const totalRamInBytes = parseInt(totalMatch[1], 10) * 1024;
const availableRamInBytes = parseInt(availableMatch[1], 10) * 1024;
let usedRam = totalRamInBytes - availableRamInBytes;
usedRam = isNaN(usedRam) || usedRam < 0 ? 0 : usedRam;
return {
percentage: this.divide([totalRamInBytes, usedRam]),
total: totalRamInBytes,
used: usedRam,
free: availableRamInBytes,
};
} catch (error) {
console.error('Error calculating RAM usage:', error);
return { total: 0, used: 0, percentage: 0, free: 0 };
}
}
public setShouldRound(round: boolean): void {
this.shouldRound = round;
}
private divide([total, used]: number[]): number {
const percentageTotal = (used / total) * 100;
if (this.shouldRound) {
return total > 0 ? Math.round(percentageTotal) : 0;
}
return total > 0 ? parseFloat(percentageTotal.toFixed(2)) : 0;
}
updateTimer(timerInMs: number): void {
this.updateFrequency.set(timerInMs);
}
public stopPoller(): void {
this.ramPoller.stop();
}
public startPoller(): void {
this.ramPoller.start();
}
}
export default Ram;

77
src/services/Storage.ts Normal file
View File

@@ -0,0 +1,77 @@
// TODO: Convert to a real service
import { bind, Variable } from 'astal';
import GTop from 'gi://GTop';
import { FunctionPoller } from 'src/lib/poller/FunctionPoller';
import { GenericResourceData } from 'src/lib/types/customModules/generic';
class Storage {
private updateFrequency = Variable(2000);
private shouldRound = false;
private storagePoller: FunctionPoller<GenericResourceData, []>;
public storage = Variable<GenericResourceData>({ total: 0, used: 0, percentage: 0, free: 0 });
constructor() {
this.calculateUsage = this.calculateUsage.bind(this);
this.storagePoller = new FunctionPoller<GenericResourceData, []>(
this.storage,
[],
bind(this.updateFrequency),
this.calculateUsage,
);
this.storagePoller.initialize();
}
public calculateUsage(): GenericResourceData {
try {
const currentFsUsage = new GTop.glibtop_fsusage();
GTop.glibtop_get_fsusage(currentFsUsage, '/');
const total = currentFsUsage.blocks * currentFsUsage.block_size;
const available = currentFsUsage.bavail * currentFsUsage.block_size;
const used = total - available;
return {
total,
used,
free: available,
percentage: this.divide([total, used]),
};
} catch (error) {
console.error('Error calculating Storage usage:', error);
return { total: 0, used: 0, percentage: 0, free: 0 };
}
}
public setShouldRound(round: boolean): void {
this.shouldRound = round;
}
private divide([total, used]: number[]): number {
const percentageTotal = (used / total) * 100;
if (this.shouldRound) {
return total > 0 ? Math.round(percentageTotal) : 0;
}
return total > 0 ? parseFloat(percentageTotal.toFixed(2)) : 0;
}
public updateTimer(timerInMs: number): void {
this.updateFrequency.set(timerInMs);
}
public stopPoller(): void {
this.storagePoller.stop();
}
public startPoller(): void {
this.storagePoller.start();
}
}
export default Storage;

121
src/services/Wallpaper.ts Normal file
View File

@@ -0,0 +1,121 @@
import GObject, { GLib, property, register, signal } from 'astal/gobject';
import { dependencies, sh } from '../lib/utils';
import options from '../options';
import { execAsync } from 'astal/process';
import { monitorFile } from 'astal/file';
const WP = `${GLib.get_home_dir()}/.config/background`;
@register({ GTypeName: 'Wallpaper' })
class Wallpaper extends GObject.Object {
#blockMonitor = false;
#isRunning = false;
#wallpaper(): void {
if (!dependencies('swww')) return;
sh('hyprctl cursorpos')
.then((pos) => {
const transitionCmd = [
'swww',
'img',
'--invert-y',
'--transition-type',
'grow',
'--transition-duration',
'1.5',
'--transition-fps',
'30',
'--transition-pos',
pos.replace(' ', ''),
WP,
].join(' ');
sh(transitionCmd)
.then(() => {
this.notify('wallpaper');
this.emit('changed', true);
})
.catch((err) => {
console.error('Error setting wallpaper:', err);
});
})
.catch((err) => {
console.error('Error getting cursor position:', err);
});
}
async #setWallpaper(path: string): Promise<void> {
this.#blockMonitor = true;
try {
await sh(`cp ${path} ${WP}`);
this.#wallpaper();
} catch (error) {
console.error('Error setting wallpaper:', error);
} finally {
this.#blockMonitor = false;
}
}
setWallpaper(path: string): void {
this.#setWallpaper(path);
}
isRunning(): boolean {
return this.#isRunning;
}
@property(String)
declare wallpaper: string;
@signal(Boolean)
declare changed: (event: boolean) => void;
constructor() {
super();
this.wallpaper = WP;
options.wallpaper.enable.subscribe(() => {
if (options.wallpaper.enable.get()) {
this.#isRunning = true;
execAsync('swww-daemon')
.then(() => {
this.#wallpaper();
})
.catch((err) => {
console.error('Failed to start swww-daemon:', err);
});
} else {
this.#isRunning = false;
execAsync('pkill swww-daemon')
.then(() => {
console.log('swww-daemon stopped.');
})
.catch((err) => {
console.error('Failed to stop swww-daemon:', err);
});
}
});
if (dependencies('swww') && options.wallpaper.enable.get()) {
this.#isRunning = true;
monitorFile(WP, () => {
if (!this.#blockMonitor) this.#wallpaper();
});
execAsync('swww-daemon')
.then(() => {
this.#wallpaper();
})
.catch((err) => {
console.error('Failed to start swww-daemon:', err);
});
}
}
}
export default new Wallpaper();

View File

@@ -0,0 +1,88 @@
import { defaultColorMap } from '../../lib/types/defaults/options';
import { ColorMapValue, ColorMapKey, HexColor, MatugenColors } from '../../lib/types/options';
import { getMatugenVariations } from './variations';
import { bash, dependencies, Notify, isAnImage } from '../../lib/utils';
import options from '../../options';
import icons from '../../lib/icons/icons';
import Variable from 'astal/variable';
const { scheme_type, contrast } = options.theme.matugen_settings;
const { matugen } = options.theme;
const updateOptColor = (color: HexColor, opt: Variable<HexColor>): void => {
opt.set(color);
};
export async function generateMatugenColors(): Promise<MatugenColors | undefined> {
if (!matugen.get() || !dependencies('matugen')) {
return;
}
const wallpaperPath = options.wallpaper.image.get();
try {
if (!wallpaperPath.length || !isAnImage(wallpaperPath)) {
Notify({
summary: 'Matugen Failed',
body: "Please select a wallpaper in 'Theming > General' first.",
iconName: icons.ui.warning,
timeout: 7000,
});
return;
}
const normalizedContrast = contrast.get() > 1 ? 1 : contrast.get() < -1 ? -1 : contrast.get();
const contents = await bash(
`matugen image ${wallpaperPath} -t scheme-${scheme_type.get()} --contrast ${normalizedContrast} --json hex`,
);
return JSON.parse(contents).colors[options.theme.matugen_settings.mode.get()];
} catch (error) {
const errMsg = `An error occurred while generating matugen colors: ${error}`;
console.error(errMsg);
return;
}
}
const isColorValid = (color: string): color is ColorMapKey => {
return defaultColorMap.hasOwnProperty(color);
};
export const replaceHexValues = (incomingHex: HexColor, matugenColors: MatugenColors): HexColor => {
if (!options.theme.matugen.get()) {
return incomingHex;
}
const matugenVariation = getMatugenVariations(matugenColors, options.theme.matugen_settings.variation.get());
updateOptColor(matugenVariation.base, options.theme.bar.menus.menu.media.card.color as Variable<HexColor>);
for (const curColor of Object.keys(defaultColorMap)) {
const currentColor: string = curColor;
if (!isColorValid(currentColor)) {
continue;
}
const curColorValue: ColorMapValue = defaultColorMap[currentColor];
if (curColorValue === incomingHex) {
return matugenVariation[currentColor];
}
}
return incomingHex;
};
export const getMatugenHex = (incomingHex: HexColor, matugenColors: MatugenColors): HexColor => {
const matugenVariation = getMatugenVariations(matugenColors, options.theme.matugen_settings.variation.get());
for (const curColor of Object.keys(defaultColorMap)) {
if (!isColorValid(curColor)) {
continue;
}
const curColorValue: ColorMapValue = defaultColorMap[curColor];
if (curColorValue === incomingHex) {
return matugenVariation[curColor];
}
}
return incomingHex;
};

View File

@@ -0,0 +1,570 @@
import { MatugenColors, MatugenVariation, MatugenVariations } from 'src/lib/types/options';
/*
* NOTE: This maps the values of the default colors to the values generated by Matugen.
* Each of the variations are carefully tested and curated to make sure that colors don't
* have weird luminocity overlaps (light on light, dark on dark).
*/
export const getMatugenVariations = (matugenColors: MatugenColors, variation: MatugenVariations): MatugenVariation => {
const matVtns = {
standard_1: {
rosewater: matugenColors.secondary,
flamingo: matugenColors.secondary,
pink: matugenColors.tertiary,
mauve: matugenColors.primary,
red: matugenColors.tertiary,
maroon: matugenColors.primary,
peach: matugenColors.tertiary,
yellow: matugenColors.secondary,
green: matugenColors.primary,
teal: matugenColors.secondary,
sky: matugenColors.secondary,
sapphire: matugenColors.primary,
blue: matugenColors.primary,
lavender: matugenColors.primary,
text: matugenColors.on_background,
subtext1: matugenColors.outline,
subtext2: matugenColors.outline,
overlay2: matugenColors.outline,
overlay1: matugenColors.outline,
overlay0: matugenColors.outline,
surface2: matugenColors.outline,
surface1: matugenColors.surface_bright,
surface0: matugenColors.surface_bright,
base2: matugenColors.inverse_on_surface,
base: matugenColors.inverse_on_surface,
mantle: matugenColors.surface_dim,
crust: matugenColors.surface_dim,
notifications_closer: matugenColors.primary,
notifications_background: matugenColors.surface_dim,
dashboard_btn_text: matugenColors.surface_dim,
red2: matugenColors.tertiary,
peach2: matugenColors.tertiary,
pink2: matugenColors.tertiary,
mantle2: matugenColors.surface_dim,
surface1_2: matugenColors.inverse_on_surface,
surface0_2: matugenColors.surface_bright,
overlay1_2: matugenColors.outline,
text2: matugenColors.on_background,
lavender2: matugenColors.primary,
crust2: matugenColors.surface_dim,
maroon2: matugenColors.primary,
mauve2: matugenColors.primary,
green2: matugenColors.primary,
surface2_2: matugenColors.surface,
sky2: matugenColors.secondary,
teal2: matugenColors.secondary,
yellow2: matugenColors.secondary,
pink3: matugenColors.tertiary,
red3: matugenColors.secondary,
mantle3: matugenColors.inverse_on_surface,
surface0_3: matugenColors.outline,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.outline,
lavender3: matugenColors.primary,
mauve3: matugenColors.primary,
green3: matugenColors.primary,
sky3: matugenColors.secondary,
teal3: matugenColors.secondary,
yellow3: matugenColors.secondary,
maroon3: matugenColors.primary,
crust3: matugenColors.surface_dim,
},
standard_2: {
rosewater: matugenColors.primary,
flamingo: matugenColors.primary,
pink: matugenColors.tertiary,
mauve: matugenColors.secondary,
red: matugenColors.tertiary,
maroon: matugenColors.secondary,
peach: matugenColors.tertiary,
yellow: matugenColors.primary,
green: matugenColors.secondary,
teal: matugenColors.primary,
sky: matugenColors.primary,
sapphire: matugenColors.secondary,
blue: matugenColors.secondary,
lavender: matugenColors.secondary,
text: matugenColors.on_background,
subtext1: matugenColors.outline,
subtext2: matugenColors.outline,
overlay2: matugenColors.outline,
overlay1: matugenColors.outline,
overlay0: matugenColors.outline,
surface2: matugenColors.outline,
surface1: matugenColors.surface_bright,
surface0: matugenColors.surface_bright,
base2: matugenColors.inverse_on_surface,
base: matugenColors.inverse_on_surface,
mantle: matugenColors.surface_dim,
crust: matugenColors.surface_dim,
notifications_closer: matugenColors.tertiary,
notifications_background: matugenColors.surface_dim,
dashboard_btn_text: matugenColors.surface_dim,
red2: matugenColors.tertiary,
peach2: matugenColors.tertiary,
pink2: matugenColors.tertiary,
mantle2: matugenColors.surface_dim,
surface1_2: matugenColors.inverse_on_surface,
surface0_2: matugenColors.surface_bright,
overlay1_2: matugenColors.outline,
text2: matugenColors.on_background,
lavender2: matugenColors.secondary,
crust2: matugenColors.surface_dim,
maroon2: matugenColors.secondary,
surface2_2: matugenColors.surface,
mauve2: matugenColors.secondary,
green2: matugenColors.secondary,
sky2: matugenColors.primary,
teal2: matugenColors.primary,
yellow2: matugenColors.primary,
pink3: matugenColors.tertiary,
red3: matugenColors.secondary,
mantle3: matugenColors.inverse_on_surface,
surface0_3: matugenColors.outline,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.outline,
lavender3: matugenColors.secondary,
mauve3: matugenColors.secondary,
green3: matugenColors.secondary,
sky3: matugenColors.primary,
teal3: matugenColors.primary,
yellow3: matugenColors.primary,
maroon3: matugenColors.secondary,
crust3: matugenColors.surface_dim,
},
standard_3: {
rosewater: matugenColors.secondary,
flamingo: matugenColors.secondary,
pink: matugenColors.secondary,
mauve: matugenColors.primary,
red: matugenColors.secondary,
maroon: matugenColors.primary,
peach: matugenColors.secondary,
yellow: matugenColors.secondary,
green: matugenColors.primary,
teal: matugenColors.secondary,
sky: matugenColors.secondary,
sapphire: matugenColors.primary,
blue: matugenColors.primary,
lavender: matugenColors.primary,
text: matugenColors.on_background,
subtext1: matugenColors.outline,
subtext2: matugenColors.outline,
overlay2: matugenColors.outline,
overlay1: matugenColors.outline,
overlay0: matugenColors.outline,
surface2: matugenColors.outline,
surface1: matugenColors.surface_bright,
surface0: matugenColors.surface_bright,
base2: matugenColors.inverse_on_surface,
base: matugenColors.inverse_on_surface,
mantle: matugenColors.surface_dim,
crust: matugenColors.surface_dim,
notifications_closer: matugenColors.secondary,
notifications_background: matugenColors.surface_dim,
dashboard_btn_text: matugenColors.surface_dim,
red2: matugenColors.secondary,
peach2: matugenColors.secondary,
pink2: matugenColors.secondary,
mantle2: matugenColors.surface_dim,
surface1_2: matugenColors.inverse_on_surface,
surface0_2: matugenColors.surface_bright,
surface2_2: matugenColors.surface,
overlay1_2: matugenColors.outline,
text2: matugenColors.on_background,
lavender2: matugenColors.primary,
crust2: matugenColors.surface_dim,
maroon2: matugenColors.primary,
mauve2: matugenColors.primary,
green2: matugenColors.primary,
sky2: matugenColors.secondary,
teal2: matugenColors.secondary,
yellow2: matugenColors.secondary,
pink3: matugenColors.secondary,
red3: matugenColors.secondary,
mantle3: matugenColors.inverse_on_surface,
surface0_3: matugenColors.outline,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.outline,
lavender3: matugenColors.primary,
mauve3: matugenColors.primary,
green3: matugenColors.primary,
sky3: matugenColors.secondary,
teal3: matugenColors.secondary,
yellow3: matugenColors.secondary,
maroon3: matugenColors.primary,
crust3: matugenColors.surface_dim,
},
vivid_1: {
rosewater: matugenColors.surface,
flamingo: matugenColors.surface,
pink: matugenColors.surface,
mauve: matugenColors.surface,
red: matugenColors.surface,
maroon: matugenColors.surface,
peach: matugenColors.surface,
yellow: matugenColors.surface,
green: matugenColors.surface,
teal: matugenColors.surface,
sky: matugenColors.surface,
sapphire: matugenColors.surface,
blue: matugenColors.surface,
lavender: matugenColors.surface,
text: matugenColors.surface,
subtext1: matugenColors.primary_container,
subtext2: matugenColors.primary_container,
overlay2: matugenColors.primary_container,
overlay1: matugenColors.primary_container,
overlay0: matugenColors.primary_container,
surface2: matugenColors.surface_container_high,
surface1: matugenColors.surface_container_high,
surface0: matugenColors.surface_container_high,
base2: matugenColors.primary,
base: matugenColors.primary,
mantle: matugenColors.surface_container_low,
crust: matugenColors.surface_container_lowest,
red2: matugenColors.primary_container,
peach2: matugenColors.primary_container,
pink2: matugenColors.primary_container,
mantle2: matugenColors.primary,
surface1_2: matugenColors.primary,
surface0_2: matugenColors.primary,
overlay1_2: matugenColors.surface_container_high,
text2: matugenColors.outline,
lavender2: matugenColors.primary_container,
crust2: matugenColors.primary,
maroon2: matugenColors.primary_container,
mauve2: matugenColors.primary_container,
surface2_2: matugenColors.primary_container,
green2: matugenColors.primary_container,
sky2: matugenColors.primary_container,
teal2: matugenColors.primary_container,
yellow2: matugenColors.primary_container,
pink3: matugenColors.primary_fixed,
red3: matugenColors.secondary,
mantle3: matugenColors.primary,
surface0_3: matugenColors.primary,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.primary,
lavender3: matugenColors.primary,
mauve3: matugenColors.primary,
green3: matugenColors.primary_fixed,
sky3: matugenColors.primary,
teal3: matugenColors.primary,
yellow3: matugenColors.primary_fixed,
maroon3: matugenColors.primary_fixed,
crust3: matugenColors.primary,
},
vivid_2: {
rosewater: matugenColors.surface,
flamingo: matugenColors.surface,
pink: matugenColors.surface,
mauve: matugenColors.surface,
red: matugenColors.surface,
maroon: matugenColors.surface,
peach: matugenColors.surface,
yellow: matugenColors.surface,
green: matugenColors.surface,
teal: matugenColors.surface,
sky: matugenColors.surface,
sapphire: matugenColors.surface,
blue: matugenColors.surface,
lavender: matugenColors.surface,
text: matugenColors.surface,
subtext1: matugenColors.secondary_container,
subtext2: matugenColors.secondary_container,
overlay2: matugenColors.secondary_container,
overlay1: matugenColors.secondary_container,
overlay0: matugenColors.secondary_container,
surface2: matugenColors.surface_container_high,
surface1: matugenColors.surface_container_high,
surface0: matugenColors.surface_container_high,
base2: matugenColors.secondary,
base: matugenColors.secondary,
mantle: matugenColors.surface_container_low,
crust: matugenColors.surface_container_lowest,
red2: matugenColors.secondary_container,
peach2: matugenColors.secondary_container,
pink2: matugenColors.secondary_container,
surface2_2: matugenColors.primary_container,
mantle2: matugenColors.secondary,
surface1_2: matugenColors.secondary,
surface0_2: matugenColors.secondary,
overlay1_2: matugenColors.surface_container_high,
text2: matugenColors.outline,
lavender2: matugenColors.secondary_container,
crust2: matugenColors.secondary,
maroon2: matugenColors.secondary_container,
mauve2: matugenColors.secondary_container,
green2: matugenColors.secondary_container,
sky2: matugenColors.secondary_container,
teal2: matugenColors.secondary_container,
yellow2: matugenColors.secondary_container,
pink3: matugenColors.secondary_fixed,
red3: matugenColors.secondary,
mantle3: matugenColors.secondary,
surface0_3: matugenColors.secondary,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.secondary,
lavender3: matugenColors.secondary,
mauve3: matugenColors.secondary,
green3: matugenColors.secondary_fixed,
sky3: matugenColors.secondary,
teal3: matugenColors.secondary,
yellow3: matugenColors.secondary_fixed,
maroon3: matugenColors.secondary_fixed,
crust3: matugenColors.secondary,
},
vivid_3: {
rosewater: matugenColors.surface,
flamingo: matugenColors.surface,
pink: matugenColors.surface,
mauve: matugenColors.surface,
red: matugenColors.surface,
maroon: matugenColors.surface,
peach: matugenColors.surface,
yellow: matugenColors.surface,
green: matugenColors.surface,
teal: matugenColors.surface,
sky: matugenColors.surface,
sapphire: matugenColors.surface,
blue: matugenColors.surface,
lavender: matugenColors.surface,
text: matugenColors.surface,
subtext1: matugenColors.tertiary_container,
subtext2: matugenColors.tertiary_container,
overlay2: matugenColors.tertiary_container,
overlay1: matugenColors.tertiary_container,
overlay0: matugenColors.tertiary_container,
surface2: matugenColors.surface_container_high,
surface1: matugenColors.surface_container_high,
surface0: matugenColors.surface_container_high,
base2: matugenColors.tertiary,
base: matugenColors.tertiary,
mantle: matugenColors.surface_container_low,
crust: matugenColors.surface_container_lowest,
red2: matugenColors.tertiary_container,
peach2: matugenColors.tertiary_container,
pink2: matugenColors.tertiary_container,
mantle2: matugenColors.tertiary,
surface1_2: matugenColors.tertiary,
surface0_2: matugenColors.tertiary,
overlay1_2: matugenColors.surface_container_high,
text2: matugenColors.outline,
lavender2: matugenColors.tertiary_container,
surface2_2: matugenColors.primary_container,
crust2: matugenColors.tertiary,
maroon2: matugenColors.tertiary_container,
mauve2: matugenColors.tertiary_container,
green2: matugenColors.tertiary_container,
sky2: matugenColors.tertiary_container,
teal2: matugenColors.tertiary_container,
yellow2: matugenColors.tertiary_container,
pink3: matugenColors.tertiary_fixed,
red3: matugenColors.secondary,
mantle3: matugenColors.tertiary,
surface0_3: matugenColors.tertiary,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.tertiary,
lavender3: matugenColors.tertiary,
mauve3: matugenColors.tertiary,
green3: matugenColors.tertiary_fixed,
sky3: matugenColors.tertiary,
teal3: matugenColors.tertiary,
yellow3: matugenColors.tertiary_fixed,
maroon3: matugenColors.tertiary_fixed,
crust3: matugenColors.tertiary,
},
monochrome_1: {
rosewater: matugenColors.primary,
flamingo: matugenColors.primary,
pink: matugenColors.primary,
mauve: matugenColors.primary,
red: matugenColors.primary,
maroon: matugenColors.primary,
peach: matugenColors.primary,
yellow: matugenColors.primary,
green: matugenColors.primary,
teal: matugenColors.primary,
sky: matugenColors.primary,
sapphire: matugenColors.primary,
blue: matugenColors.primary,
lavender: matugenColors.primary,
text: matugenColors.on_background,
subtext1: matugenColors.outline,
subtext2: matugenColors.outline,
overlay2: matugenColors.outline,
overlay1: matugenColors.outline,
overlay0: matugenColors.outline,
surface2: matugenColors.outline,
surface1: matugenColors.surface_bright,
surface0: matugenColors.surface_bright,
base2: matugenColors.inverse_on_surface,
base: matugenColors.inverse_on_surface,
mantle: matugenColors.surface_dim,
crust: matugenColors.surface_dim,
notifications_closer: matugenColors.primary,
notifications_background: matugenColors.surface_dim,
dashboard_btn_text: matugenColors.surface_dim,
red2: matugenColors.primary,
peach2: matugenColors.primary,
pink2: matugenColors.primary,
mantle2: matugenColors.surface_dim,
surface1_2: matugenColors.inverse_on_surface,
surface0_2: matugenColors.surface_bright,
surface2_2: matugenColors.surface,
overlay1_2: matugenColors.outline,
text2: matugenColors.on_background,
lavender2: matugenColors.primary,
crust2: matugenColors.surface_dim,
maroon2: matugenColors.primary,
mauve2: matugenColors.primary,
green2: matugenColors.primary,
sky2: matugenColors.primary,
teal2: matugenColors.primary,
yellow2: matugenColors.primary,
pink3: matugenColors.primary,
red3: matugenColors.secondary,
mantle3: matugenColors.inverse_on_surface,
surface0_3: matugenColors.outline,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.outline,
lavender3: matugenColors.primary,
mauve3: matugenColors.primary,
green3: matugenColors.primary,
sky3: matugenColors.primary,
teal3: matugenColors.primary,
yellow3: matugenColors.primary,
maroon3: matugenColors.primary,
crust3: matugenColors.surface_dim,
},
monochrome_2: {
rosewater: matugenColors.secondary,
flamingo: matugenColors.secondary,
pink: matugenColors.secondary,
mauve: matugenColors.secondary,
red: matugenColors.secondary,
maroon: matugenColors.secondary,
peach: matugenColors.secondary,
yellow: matugenColors.secondary,
green: matugenColors.secondary,
teal: matugenColors.secondary,
sky: matugenColors.secondary,
sapphire: matugenColors.secondary,
blue: matugenColors.secondary,
lavender: matugenColors.secondary,
text: matugenColors.on_background,
subtext1: matugenColors.outline,
subtext2: matugenColors.outline,
overlay2: matugenColors.outline,
overlay1: matugenColors.outline,
overlay0: matugenColors.outline,
surface2: matugenColors.outline,
surface1: matugenColors.surface_bright,
surface0: matugenColors.surface_bright,
base2: matugenColors.inverse_on_surface,
base: matugenColors.inverse_on_surface,
mantle: matugenColors.surface_dim,
crust: matugenColors.surface_dim,
notifications_closer: matugenColors.secondary,
notifications_background: matugenColors.surface_dim,
dashboard_btn_text: matugenColors.surface_dim,
red2: matugenColors.secondary,
peach2: matugenColors.secondary,
pink2: matugenColors.secondary,
mantle2: matugenColors.surface_dim,
surface1_2: matugenColors.inverse_on_surface,
surface0_2: matugenColors.surface_bright,
overlay1_2: matugenColors.outline,
surface2_2: matugenColors.surface,
text2: matugenColors.on_background,
lavender2: matugenColors.secondary,
crust2: matugenColors.surface_dim,
maroon2: matugenColors.secondary,
mauve2: matugenColors.secondary,
green2: matugenColors.secondary,
sky2: matugenColors.secondary,
teal2: matugenColors.secondary,
yellow2: matugenColors.secondary,
pink3: matugenColors.secondary,
red3: matugenColors.secondary,
mantle3: matugenColors.inverse_on_surface,
surface0_3: matugenColors.outline,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.outline,
lavender3: matugenColors.secondary,
mauve3: matugenColors.secondary,
green3: matugenColors.secondary,
sky3: matugenColors.secondary,
teal3: matugenColors.secondary,
yellow3: matugenColors.secondary,
maroon3: matugenColors.secondary,
crust3: matugenColors.surface_dim,
},
monochrome_3: {
rosewater: matugenColors.tertiary,
flamingo: matugenColors.tertiary,
pink: matugenColors.tertiary,
mauve: matugenColors.tertiary,
red: matugenColors.tertiary,
maroon: matugenColors.tertiary,
peach: matugenColors.tertiary,
yellow: matugenColors.tertiary,
green: matugenColors.tertiary,
teal: matugenColors.tertiary,
sky: matugenColors.tertiary,
sapphire: matugenColors.tertiary,
blue: matugenColors.tertiary,
lavender: matugenColors.tertiary,
text: matugenColors.on_background,
subtext1: matugenColors.outline,
subtext2: matugenColors.outline,
overlay2: matugenColors.outline,
overlay1: matugenColors.outline,
overlay0: matugenColors.outline,
surface2: matugenColors.outline,
surface1: matugenColors.surface_bright,
surface0: matugenColors.surface_bright,
base2: matugenColors.inverse_on_surface,
base: matugenColors.inverse_on_surface,
mantle: matugenColors.surface_dim,
crust: matugenColors.surface_dim,
notifications_closer: matugenColors.tertiary,
notifications_background: matugenColors.surface_dim,
dashboard_btn_text: matugenColors.surface_dim,
red2: matugenColors.tertiary,
peach2: matugenColors.tertiary,
pink2: matugenColors.tertiary,
mantle2: matugenColors.surface_dim,
surface1_2: matugenColors.inverse_on_surface,
surface0_2: matugenColors.surface_bright,
overlay1_2: matugenColors.outline,
text2: matugenColors.on_background,
lavender2: matugenColors.tertiary,
crust2: matugenColors.surface_dim,
maroon2: matugenColors.tertiary,
surface2_2: matugenColors.surface,
mauve2: matugenColors.tertiary,
green2: matugenColors.tertiary,
sky2: matugenColors.tertiary,
teal2: matugenColors.tertiary,
yellow2: matugenColors.tertiary,
pink3: matugenColors.tertiary,
red3: matugenColors.secondary,
mantle3: matugenColors.inverse_on_surface,
surface0_3: matugenColors.outline,
surface2_3: matugenColors.outline,
overlay1_3: matugenColors.outline,
lavender3: matugenColors.tertiary,
mauve3: matugenColors.tertiary,
green3: matugenColors.tertiary,
sky3: matugenColors.tertiary,
teal3: matugenColors.tertiary,
yellow3: matugenColors.tertiary,
maroon3: matugenColors.tertiary,
crust3: matugenColors.surface_dim,
},
};
return matVtns[variation];
};