Implemented strict linting standards and prettier formatting config. (#248)
* Implemented strict linting standards and prettier formatting config. * More linter fixes and type updates. * More linter updates and type fixes * Remove noisy comments * Linter and type updates * Linter, formatting and type updates. * Linter updates * Type updates * Type updates * fixed all linter errors * Fixed all linting, formatting and type issues. * Resolve merge conflicts.
This commit is contained in:
5
lib/types/audio.d.ts
vendored
Normal file
5
lib/types/audio.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type InputDevices = Button<Box<Box<Label<Attribute>, Attribute>, Attribute>, Attribute>[];
|
||||
|
||||
type DummyDevices = Button<Box<Box<Label<Attribute>, Attribute>, Attribute>, Attribute>[];
|
||||
type RealPlaybackDevices = Button<Box<Box<Label<Attribute>, Attribute>, Attribute>, Attribute>[];
|
||||
export type PlaybackDevices = DummyDevices | RealPlaybackDevices;
|
||||
58
lib/types/bar.d.ts
vendored
58
lib/types/bar.d.ts
vendored
@@ -1,43 +1,45 @@
|
||||
import { Binding, Connectable } from "types/service"
|
||||
import { Variable } from "types/variable"
|
||||
import Box from "types/widgets/box";
|
||||
import Label from "types/widgets/label";
|
||||
import { Widget as WidgetType } from "types/widgets/widget"
|
||||
import { Binding, Connectable } from 'types/service';
|
||||
import { Variable } from 'types/variable';
|
||||
import Box from 'types/widgets/box';
|
||||
import Button from 'types/widgets/button';
|
||||
import Label from 'types/widgets/label';
|
||||
import { Attribute, Child } from './widget';
|
||||
|
||||
export type Child = {
|
||||
export type BarBoxChild = {
|
||||
component: Box<Gtk.Widget, unknown>;
|
||||
isVisible?: boolean;
|
||||
isVis?: Variable<boolean>;
|
||||
boxClass: string;
|
||||
props: ButtonProps;
|
||||
};
|
||||
} & ButtonProps;
|
||||
|
||||
export type SelfButton = Button<Child, Attribute>;
|
||||
|
||||
export type BoxHook = (self: Box<Gtk.Widget, Gtk.Widget>) => void;
|
||||
export type LabelHook = (self: Label<Gtk.Widget>) => void;
|
||||
|
||||
export type Module = {
|
||||
icon?: string | Binding<string>,
|
||||
textIcon?: string | Binding<string>,
|
||||
label?: string | Binding<string>,
|
||||
labelHook?: LabelHook,
|
||||
boundLabel?: string,
|
||||
tooltipText?: string | Binding<string>,
|
||||
boxClass: string,
|
||||
props?: ButtonProps,
|
||||
showLabel?: boolean,
|
||||
showLabelBinding?: Binding,
|
||||
hook?: BoxHook,
|
||||
connection?: Binding<Connectable>
|
||||
}
|
||||
icon?: string | Binding<string>;
|
||||
textIcon?: string | Binding<string>;
|
||||
label?: string | Binding<string>;
|
||||
labelHook?: LabelHook;
|
||||
boundLabel?: string;
|
||||
tooltipText?: string | Binding<string>;
|
||||
boxClass: string;
|
||||
props?: ButtonProps;
|
||||
showLabel?: boolean;
|
||||
showLabelBinding?: Binding;
|
||||
hook?: BoxHook;
|
||||
connection?: Binding<Connectable>;
|
||||
};
|
||||
|
||||
export type ResourceLabelType = "used/total" | "used" | "percentage" | "free";
|
||||
export type ResourceLabelType = 'used/total' | 'used' | 'percentage' | 'free';
|
||||
|
||||
export type StorageIcon = "" | "" | "" | "" | "" | "";
|
||||
export type StorageIcon = '' | '' | '' | '' | '' | '';
|
||||
|
||||
export type NetstatIcon = "" | "" | "" | "" | "" | "" | "" | "" | "";
|
||||
export type NetstatLabelType = "full" | "in" | "out";
|
||||
export type RateUnit = "GiB" | "MiB" | "KiB" | "auto";
|
||||
export type NetstatIcon = '' | '' | '' | '' | '' | '' | '' | '' | '';
|
||||
export type NetstatLabelType = 'full' | 'in' | 'out';
|
||||
export type RateUnit = 'GiB' | 'MiB' | 'KiB' | 'auto';
|
||||
|
||||
export type UpdatesIcon = "" | "" | "" | "" | "" | "" | "" | "" | "";
|
||||
export type UpdatesIcon = '' | '' | '' | '' | '' | '' | '' | '' | '';
|
||||
|
||||
export type PowerIcon = "" | "" | "" | "" | "" | "";
|
||||
export type PowerIcon = '' | '' | '' | '' | '' | '';
|
||||
|
||||
13
lib/types/customModules/generic.d.ts
vendored
13
lib/types/customModules/generic.d.ts
vendored
@@ -1,6 +1,13 @@
|
||||
export type GenericResourceData = {
|
||||
export type GenericFunction<T, P extends unknown[] = unknown[]> = (...args: P) => T;
|
||||
|
||||
export type GenericResourceMetrics = {
|
||||
total: number;
|
||||
used: number;
|
||||
free: number;
|
||||
percentage: number;
|
||||
}
|
||||
};
|
||||
|
||||
type GenericResourceData = ResourceUsage & {
|
||||
free: number;
|
||||
};
|
||||
|
||||
export type Postfix = 'TiB' | 'GiB' | 'MiB' | 'KiB' | 'B';
|
||||
|
||||
14
lib/types/customModules/kbLayout.d.ts
vendored
14
lib/types/customModules/kbLayout.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { layoutMap } from "customModules/kblayout/layouts";
|
||||
import { layoutMap } from 'customModules/kblayout/layouts';
|
||||
|
||||
export type KbLabelType = "layout" | "code";
|
||||
export type KbIcon = "" | "" | "" | "" | "";
|
||||
export type KbLabelType = 'layout' | 'code';
|
||||
export type KbIcon = '' | '' | '' | '' | '';
|
||||
|
||||
export type HyprctlKeyboard = {
|
||||
address: string;
|
||||
@@ -24,10 +24,10 @@ export type HyprctlMouse = {
|
||||
export type HyprctlDeviceLayout = {
|
||||
mice: HyprctlMouse[];
|
||||
keyboards: HyprctlKeyboard[];
|
||||
tablets: any[];
|
||||
touch: any[];
|
||||
switches: any[];
|
||||
tablets: unknown[];
|
||||
touch: unknown[];
|
||||
switches: unknown[];
|
||||
};
|
||||
|
||||
export type LayoutKeys = keyof typeof layoutMap;
|
||||
export type LayoutValues = typeof layoutMap[LayoutKeys];
|
||||
export type LayoutValues = (typeof layoutMap)[LayoutKeys];
|
||||
|
||||
3
lib/types/customModules/network.d.ts
vendored
3
lib/types/customModules/network.d.ts
vendored
@@ -1,5 +1,4 @@
|
||||
export type NetworkResourceData = {
|
||||
in: string;
|
||||
out: string;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
14
lib/types/customModules/utils.d.ts
vendored
14
lib/types/customModules/utils.d.ts
vendored
@@ -1,9 +1,9 @@
|
||||
import { Binding } from "lib/utils";
|
||||
import { Binding } from 'lib/utils';
|
||||
|
||||
export type InputHandlerEvents = {
|
||||
onPrimaryClick?: Binding,
|
||||
onSecondaryClick?: Binding,
|
||||
onMiddleClick?: Binding,
|
||||
onScrollUp?: Binding,
|
||||
onScrollDown?: Binding,
|
||||
}
|
||||
onPrimaryClick?: Binding;
|
||||
onSecondaryClick?: Binding;
|
||||
onMiddleClick?: Binding;
|
||||
onScrollUp?: Binding;
|
||||
onScrollDown?: Binding;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NetstatLabelType, ResourceLabelType } from "../bar";
|
||||
import { NetstatLabelType, ResourceLabelType } from '../bar';
|
||||
|
||||
export const LABEL_TYPES: ResourceLabelType[] = ["used/total", "used", "free", "percentage"];
|
||||
export const LABEL_TYPES: ResourceLabelType[] = ['used/total', 'used', 'free', 'percentage'];
|
||||
|
||||
export const NETWORK_LABEL_TYPES: NetstatLabelType[] = ["full", "in", "out"];
|
||||
export const NETWORK_LABEL_TYPES: NetstatLabelType[] = ['full', 'in', 'out'];
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { RateUnit } from "../bar";
|
||||
import { NetworkResourceData } from "../customModules/network";
|
||||
import { RateUnit } from '../bar';
|
||||
import { NetworkResourceData } from '../customModules/network';
|
||||
|
||||
export const GET_DEFAULT_NETSTAT_DATA = (dataType: RateUnit): NetworkResourceData => {
|
||||
if (dataType === 'auto') {
|
||||
return { in: `0 Kib/s`, out: `0 Kib/s` }
|
||||
return { in: `0 Kib/s`, out: `0 Kib/s` };
|
||||
}
|
||||
|
||||
return { in: `0 ${dataType}/s`, out: `0 ${dataType}/s` }
|
||||
return { in: `0 ${dataType}/s`, out: `0 ${dataType}/s` };
|
||||
};
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
export const defaultColorMap = {
|
||||
"rosewater": "#f5e0dc",
|
||||
"flamingo": "#f2cdcd",
|
||||
"pink": "#f5c2e7",
|
||||
"mauve": "#cba6f7",
|
||||
"red": "#f38ba8",
|
||||
"maroon": "#eba0ac",
|
||||
"peach": "#fab387",
|
||||
"yellow": "#f9e2af",
|
||||
"green": "#a6e3a1",
|
||||
"teal": "#94e2d5",
|
||||
"sky": "#89dceb",
|
||||
"sapphire": "#74c7ec",
|
||||
"blue": "#89b4fa",
|
||||
"lavender": "#b4befe",
|
||||
"text": "#cdd6f4",
|
||||
"subtext1": "#bac2de",
|
||||
"subtext2": "#a6adc8",
|
||||
"overlay2": "#9399b2",
|
||||
"overlay1": "#7f849c",
|
||||
"overlay0": "#6c7086",
|
||||
"surface2": "#585b70",
|
||||
"surface1": "#45475a",
|
||||
"surface0": "#313244",
|
||||
"base2": "#242438",
|
||||
"base": "#1e1e2e",
|
||||
"mantle": "#181825",
|
||||
"crust": "#11111b",
|
||||
"surface1_2": "#454759",
|
||||
"text2": "#cdd6f3",
|
||||
"pink2": "#f5c2e6",
|
||||
"red2": "#f38ba7",
|
||||
"peach2": "#fab386",
|
||||
"mantle2": "#181824",
|
||||
"surface0_2": "#313243",
|
||||
"surface2_2": "#585b69",
|
||||
"overlay1_2": "#7f849b",
|
||||
"lavender2": "#b4befd",
|
||||
"mauve2": "#cba6f6",
|
||||
"green2": "#a6e3a0",
|
||||
"sky2": "#89dcea",
|
||||
"teal2": "#94e2d4",
|
||||
"yellow2": "#f9e2ad",
|
||||
"maroon2": "#eba0ab",
|
||||
"crust2": "#11111a",
|
||||
"pink3": "#f5c2e8",
|
||||
"red3": "#f38ba9",
|
||||
"mantle3": "#181826",
|
||||
"surface0_3": "#313245",
|
||||
"surface2_3": "#585b71",
|
||||
"overlay1_3": "#7f849d",
|
||||
"lavender3": "#b4beff",
|
||||
"mauve3": "#cba6f8",
|
||||
"green3": "#a6e3a2",
|
||||
"sky3": "#89dcec",
|
||||
"teal3": "#94e2d6",
|
||||
"yellow3": "#f9e2ae",
|
||||
"maroon3": "#eba0ad",
|
||||
"crust3": "#11111c",
|
||||
};
|
||||
rosewater: '#f5e0dc',
|
||||
flamingo: '#f2cdcd',
|
||||
pink: '#f5c2e7',
|
||||
mauve: '#cba6f7',
|
||||
red: '#f38ba8',
|
||||
maroon: '#eba0ac',
|
||||
peach: '#fab387',
|
||||
yellow: '#f9e2af',
|
||||
green: '#a6e3a1',
|
||||
teal: '#94e2d5',
|
||||
sky: '#89dceb',
|
||||
sapphire: '#74c7ec',
|
||||
blue: '#89b4fa',
|
||||
lavender: '#b4befe',
|
||||
text: '#cdd6f4',
|
||||
subtext1: '#bac2de',
|
||||
subtext2: '#a6adc8',
|
||||
overlay2: '#9399b2',
|
||||
overlay1: '#7f849c',
|
||||
overlay0: '#6c7086',
|
||||
surface2: '#585b70',
|
||||
surface1: '#45475a',
|
||||
surface0: '#313244',
|
||||
base2: '#242438',
|
||||
base: '#1e1e2e',
|
||||
mantle: '#181825',
|
||||
crust: '#11111b',
|
||||
surface1_2: '#454759',
|
||||
text2: '#cdd6f3',
|
||||
pink2: '#f5c2e6',
|
||||
red2: '#f38ba7',
|
||||
peach2: '#fab386',
|
||||
mantle2: '#181824',
|
||||
surface0_2: '#313243',
|
||||
surface2_2: '#585b69',
|
||||
overlay1_2: '#7f849b',
|
||||
lavender2: '#b4befd',
|
||||
mauve2: '#cba6f6',
|
||||
green2: '#a6e3a0',
|
||||
sky2: '#89dcea',
|
||||
teal2: '#94e2d4',
|
||||
yellow2: '#f9e2ad',
|
||||
maroon2: '#eba0ab',
|
||||
crust2: '#11111a',
|
||||
pink3: '#f5c2e8',
|
||||
red3: '#f38ba9',
|
||||
mantle3: '#181826',
|
||||
surface0_3: '#313245',
|
||||
surface2_3: '#585b71',
|
||||
overlay1_3: '#7f849d',
|
||||
lavender3: '#b4beff',
|
||||
mauve3: '#cba6f8',
|
||||
green3: '#a6e3a2',
|
||||
sky3: '#89dcec',
|
||||
teal3: '#94e2d6',
|
||||
yellow3: '#f9e2ae',
|
||||
maroon3: '#eba0ad',
|
||||
crust3: '#11111c',
|
||||
} as const;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
7
lib/types/dropdownmenu.d.ts
vendored
7
lib/types/dropdownmenu.d.ts
vendored
@@ -1,10 +1,11 @@
|
||||
import { WindowProps } from "types/widgets/window";
|
||||
import { WindowProps } from 'types/widgets/window';
|
||||
import { GtkWidget, Transition } from './widget';
|
||||
|
||||
export type DropdownMenuProps = {
|
||||
name: string;
|
||||
child: any;
|
||||
child: GtkWidget;
|
||||
layout?: string;
|
||||
transition?: any;
|
||||
transition?: Transition;
|
||||
exclusivity?: Exclusivity;
|
||||
fixed?: boolean;
|
||||
} & WindowProps;
|
||||
|
||||
2
lib/types/filechooser.d.ts
vendored
2
lib/types/filechooser.d.ts
vendored
@@ -1,3 +1,3 @@
|
||||
export type Config = {
|
||||
[key: string]: string | number | boolean | object;
|
||||
}
|
||||
};
|
||||
|
||||
18
lib/types/gpustat.d.ts
vendored
18
lib/types/gpustat.d.ts
vendored
@@ -12,14 +12,14 @@ export type GPU_Stat = {
|
||||
index: number;
|
||||
uuid: string;
|
||||
name: string;
|
||||
"temperature.gpu": number;
|
||||
"fan.speed": number;
|
||||
"utilization.gpu": number;
|
||||
"utilization.enc": number;
|
||||
"utilization.dec": number;
|
||||
"power.draw": number;
|
||||
"enforced.power.limit": number;
|
||||
"memory.used": number;
|
||||
"memory.total": number;
|
||||
'temperature.gpu': number;
|
||||
'fan.speed': number;
|
||||
'utilization.gpu': number;
|
||||
'utilization.enc': number;
|
||||
'utilization.dec': number;
|
||||
'power.draw': number;
|
||||
'enforced.power.limit': number;
|
||||
'memory.used': number;
|
||||
'memory.total': number;
|
||||
processes: Process[];
|
||||
};
|
||||
|
||||
1
lib/types/mpris.d.ts
vendored
1
lib/types/mpris.d.ts
vendored
@@ -1,3 +1,2 @@
|
||||
export type LoopStatus = 'none' | 'track' | 'playlist';
|
||||
export type PlaybackStatus = 'playing' | 'paused' | 'stopped';
|
||||
|
||||
|
||||
6
lib/types/network.d.ts
vendored
6
lib/types/network.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { WIFI_STATUS_MAP } from "globals/network";
|
||||
import { WIFI_STATUS_MAP } from 'globals/network';
|
||||
|
||||
export type AccessPoint = {
|
||||
bssid: string | null;
|
||||
@@ -9,6 +9,8 @@ export type AccessPoint = {
|
||||
strength: number;
|
||||
frequency: number;
|
||||
iconName: string | undefined;
|
||||
}
|
||||
};
|
||||
|
||||
export type WifiStatus = keyof typeof WIFI_STATUS_MAP;
|
||||
|
||||
export type WifiIcon = '' | '' | '' | '' | '' | '' | '' | '' | '' | '' | '';
|
||||
|
||||
2
lib/types/notification.d.ts
vendored
2
lib/types/notification.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import icons from "modules/icons/index";
|
||||
import icons from 'modules/icons/index';
|
||||
|
||||
export interface NotificationArgs {
|
||||
appName?: string;
|
||||
|
||||
301
lib/types/options.d.ts
vendored
301
lib/types/options.d.ts
vendored
@@ -1,126 +1,213 @@
|
||||
import { Opt } from "lib/option";
|
||||
import { Variable } from "types/variable";
|
||||
import { Opt } from 'lib/option';
|
||||
import { Variable } from 'types/variable';
|
||||
import { defaultColorMap } from './defaults/options';
|
||||
|
||||
export type MkOptionsResult<T> = {
|
||||
configFile: string;
|
||||
array: () => Opt[];
|
||||
reset: () => Promise<string>;
|
||||
resetTheme: () => Promise<string>;
|
||||
handler: (deps: string[], callback: () => void) => void;
|
||||
};
|
||||
|
||||
export type RecursiveOptionsObject = {
|
||||
[key: string]: RecursiveOptionsObject | Opt<string | number | boolean> | Opt<any>;
|
||||
};
|
||||
|
||||
export type Unit = "imperial" | "metric";
|
||||
export type PowerOptions = "sleep" | "reboot" | "logout" | "shutdown";
|
||||
export type NotificationAnchor = "top" | "top right" | "top left" | "bottom" | "bottom right" | "bottom left" | "left" | "right";
|
||||
export type OSDAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
||||
export type BarButtonStyles = "default" | "split" | "wave" | "wave2";
|
||||
export type Unit = 'imperial' | 'metric';
|
||||
export type PowerOptions = 'sleep' | 'reboot' | 'logout' | 'shutdown';
|
||||
export type NotificationAnchor =
|
||||
| 'top'
|
||||
| 'top right'
|
||||
| 'top left'
|
||||
| 'bottom'
|
||||
| 'bottom right'
|
||||
| 'bottom left'
|
||||
| 'left'
|
||||
| 'right';
|
||||
export type OSDAnchor = 'top left' | 'top' | 'top right' | 'right' | 'bottom right' | 'bottom' | 'bottom left' | 'left';
|
||||
export type BarButtonStyles = 'default' | 'split' | 'wave' | 'wave2';
|
||||
|
||||
export type ThemeExportData = {
|
||||
filePath: string,
|
||||
themeOnly: boolean
|
||||
}
|
||||
filePath: string;
|
||||
themeOnly: boolean;
|
||||
};
|
||||
export type RowProps<T> = {
|
||||
opt: Opt<T>
|
||||
title: string
|
||||
note?: string
|
||||
opt: Opt<T>;
|
||||
title: string;
|
||||
note?: string;
|
||||
type?:
|
||||
| "number"
|
||||
| "color"
|
||||
| "float"
|
||||
| "object"
|
||||
| "string"
|
||||
| "enum"
|
||||
| "boolean"
|
||||
| "img"
|
||||
| "wallpaper"
|
||||
| "export"
|
||||
| "import"
|
||||
| "config_import"
|
||||
| "font"
|
||||
enums?: string[]
|
||||
max?: number
|
||||
min?: number
|
||||
disabledBinding?: Variable<boolean>
|
||||
exportData?: ThemeExportData
|
||||
subtitle?: string | VarType<any> | Opt,
|
||||
subtitleLink?: string,
|
||||
dependencies?: string[],
|
||||
increment?: number
|
||||
}
|
||||
| 'number'
|
||||
| 'color'
|
||||
| 'float'
|
||||
| 'object'
|
||||
| 'string'
|
||||
| 'enum'
|
||||
| 'boolean'
|
||||
| 'img'
|
||||
| 'wallpaper'
|
||||
| 'export'
|
||||
| 'import'
|
||||
| 'config_import'
|
||||
| 'font';
|
||||
enums?: T[];
|
||||
max?: number;
|
||||
min?: number;
|
||||
disabledBinding?: Variable<boolean>;
|
||||
exportData?: ThemeExportData;
|
||||
subtitle?: string | VarType<any> | Opt;
|
||||
subtitleLink?: string;
|
||||
dependencies?: string[];
|
||||
increment?: number;
|
||||
};
|
||||
|
||||
export type OSDOrientation = "horizontal" | "vertical";
|
||||
export type OSDOrientation = 'horizontal' | 'vertical';
|
||||
|
||||
export type HexColor = `#${string}`;
|
||||
|
||||
export type WindowLayer = "top" | "bottom" | "overlay" | "background";
|
||||
export type WindowLayer = 'top' | 'bottom' | 'overlay' | 'background';
|
||||
|
||||
export type ActiveWsIndicator = 'underline' | 'highlight' | 'color';
|
||||
|
||||
export type MatugenColors = {
|
||||
"background": HexColor,
|
||||
"error": HexColor,
|
||||
"error_container": HexColor,
|
||||
"inverse_on_surface": HexColor,
|
||||
"inverse_primary": HexColor,
|
||||
"inverse_surface": HexColor,
|
||||
"on_background": HexColor,
|
||||
"on_error": HexColor,
|
||||
"on_error_container": HexColor,
|
||||
"on_primary": HexColor,
|
||||
"on_primary_container": HexColor,
|
||||
"on_primary_fixed": HexColor,
|
||||
"on_primary_fixed_variant": HexColor,
|
||||
"on_secondary": HexColor,
|
||||
"on_secondary_container": HexColor,
|
||||
"on_secondary_fixed": HexColor,
|
||||
"on_secondary_fixed_variant": HexColor,
|
||||
"on_surface": HexColor,
|
||||
"on_surface_variant": HexColor,
|
||||
"on_tertiary": HexColor,
|
||||
"on_tertiary_container": HexColor,
|
||||
"on_tertiary_fixed": HexColor,
|
||||
"on_tertiary_fixed_variant": HexColor,
|
||||
"outline": HexColor,
|
||||
"outline_variant": HexColor,
|
||||
"primary": HexColor,
|
||||
"primary_container": HexColor,
|
||||
"primary_fixed": HexColor,
|
||||
"primary_fixed_dim": HexColor,
|
||||
"scrim": HexColor,
|
||||
"secondary": HexColor,
|
||||
"secondary_container": HexColor,
|
||||
"secondary_fixed": HexColor,
|
||||
"secondary_fixed_dim": HexColor,
|
||||
"shadow": HexColor,
|
||||
"surface": HexColor,
|
||||
"surface_bright": HexColor,
|
||||
"surface_container": HexColor,
|
||||
"surface_container_high": HexColor,
|
||||
"surface_container_highest": HexColor,
|
||||
"surface_container_low": HexColor,
|
||||
"surface_container_lowest": HexColor,
|
||||
"surface_dim": HexColor,
|
||||
"surface_variant": HexColor,
|
||||
"tertiary": HexColor,
|
||||
"tertiary_container": HexColor,
|
||||
"tertiary_fixed": HexColor,
|
||||
"tertiary_fixed_dim": HexColor
|
||||
}
|
||||
background: HexColor;
|
||||
error: HexColor;
|
||||
error_container: HexColor;
|
||||
inverse_on_surface: HexColor;
|
||||
inverse_primary: HexColor;
|
||||
inverse_surface: HexColor;
|
||||
on_background: HexColor;
|
||||
on_error: HexColor;
|
||||
on_error_container: HexColor;
|
||||
on_primary: HexColor;
|
||||
on_primary_container: HexColor;
|
||||
on_primary_fixed: HexColor;
|
||||
on_primary_fixed_variant: HexColor;
|
||||
on_secondary: HexColor;
|
||||
on_secondary_container: HexColor;
|
||||
on_secondary_fixed: HexColor;
|
||||
on_secondary_fixed_variant: HexColor;
|
||||
on_surface: HexColor;
|
||||
on_surface_variant: HexColor;
|
||||
on_tertiary: HexColor;
|
||||
on_tertiary_container: HexColor;
|
||||
on_tertiary_fixed: HexColor;
|
||||
on_tertiary_fixed_variant: HexColor;
|
||||
outline: HexColor;
|
||||
outline_variant: HexColor;
|
||||
primary: HexColor;
|
||||
primary_container: HexColor;
|
||||
primary_fixed: HexColor;
|
||||
primary_fixed_dim: HexColor;
|
||||
scrim: HexColor;
|
||||
secondary: HexColor;
|
||||
secondary_container: HexColor;
|
||||
secondary_fixed: HexColor;
|
||||
secondary_fixed_dim: HexColor;
|
||||
shadow: HexColor;
|
||||
surface: HexColor;
|
||||
surface_bright: HexColor;
|
||||
surface_container: HexColor;
|
||||
surface_container_high: HexColor;
|
||||
surface_container_highest: HexColor;
|
||||
surface_container_low: HexColor;
|
||||
surface_container_lowest: HexColor;
|
||||
surface_dim: HexColor;
|
||||
surface_variant: HexColor;
|
||||
tertiary: HexColor;
|
||||
tertiary_container: HexColor;
|
||||
tertiary_fixed: HexColor;
|
||||
tertiary_fixed_dim: HexColor;
|
||||
};
|
||||
|
||||
type MatugenScheme =
|
||||
| "content"
|
||||
| "expressive"
|
||||
| "fidelity"
|
||||
| "fruit-salad"
|
||||
| "monochrome"
|
||||
| "neutral"
|
||||
| "rainbow"
|
||||
| "tonal-spot";
|
||||
export type MatugenVariation = {
|
||||
rosewater: HexColor;
|
||||
flamingo: HexColor;
|
||||
pink: HexColor;
|
||||
mauve: HexColor;
|
||||
red: HexColor;
|
||||
maroon: HexColor;
|
||||
peach: HexColor;
|
||||
yellow: HexColor;
|
||||
green: HexColor;
|
||||
teal: HexColor;
|
||||
sky: HexColor;
|
||||
sapphire: HexColor;
|
||||
blue: HexColor;
|
||||
lavender: HexColor;
|
||||
text: HexColor;
|
||||
subtext1: HexColor;
|
||||
subtext2: HexColor;
|
||||
overlay2: HexColor;
|
||||
overlay1: HexColor;
|
||||
overlay0: HexColor;
|
||||
surface2: HexColor;
|
||||
surface1: HexColor;
|
||||
surface0: HexColor;
|
||||
base2: HexColor;
|
||||
base: HexColor;
|
||||
mantle: HexColor;
|
||||
crust: HexColor;
|
||||
notifications_closer: HexColor;
|
||||
notifications_background: HexColor;
|
||||
dashboard_btn_text: HexColor;
|
||||
red2: HexColor;
|
||||
peach2: HexColor;
|
||||
pink2: HexColor;
|
||||
mantle2: HexColor;
|
||||
surface1_2: HexColor;
|
||||
surface0_2: HexColor;
|
||||
overlay1_2: HexColor;
|
||||
text2: HexColor;
|
||||
lavender2: HexColor;
|
||||
crust2: HexColor;
|
||||
maroon2: HexColor;
|
||||
mauve2: HexColor;
|
||||
green2: HexColor;
|
||||
surface2_2: HexColor;
|
||||
sky2: HexColor;
|
||||
teal2: HexColor;
|
||||
yellow2: HexColor;
|
||||
pink3: HexColor;
|
||||
red3: HexColor;
|
||||
mantle3: HexColor;
|
||||
surface0_3: HexColor;
|
||||
surface2_3: HexColor;
|
||||
overlay1_3: HexColor;
|
||||
lavender3: HexColor;
|
||||
mauve3: HexColor;
|
||||
green3: HexColor;
|
||||
sky3: HexColor;
|
||||
teal3: HexColor;
|
||||
yellow3: HexColor;
|
||||
maroon3: HexColor;
|
||||
crust3: HexColor;
|
||||
notifications_closer?: HexColor;
|
||||
notifications_background?: HexColor;
|
||||
dashboard_btn_text?: HexColor;
|
||||
};
|
||||
export type MatugenScheme =
|
||||
| 'content'
|
||||
| 'expressive'
|
||||
| 'fidelity'
|
||||
| 'fruit-salad'
|
||||
| 'monochrome'
|
||||
| 'neutral'
|
||||
| 'rainbow'
|
||||
| 'tonal-spot';
|
||||
|
||||
type MatugenVariation =
|
||||
| "standard_1"
|
||||
| "standard_2"
|
||||
| "standard_3"
|
||||
| "monochrome_1"
|
||||
| "monochrome_2"
|
||||
| "monochrome_3"
|
||||
| "vivid_1"
|
||||
| "vivid_2"
|
||||
| "vivid_3"
|
||||
export type MatugenVariations =
|
||||
| 'standard_1'
|
||||
| 'standard_2'
|
||||
| 'standard_3'
|
||||
| 'monochrome_1'
|
||||
| 'monochrome_2'
|
||||
| 'monochrome_3'
|
||||
| 'vivid_1'
|
||||
| 'vivid_2'
|
||||
| 'vivid_3';
|
||||
|
||||
type MatugenTheme = "light" | "dark";
|
||||
type MatugenTheme = 'light' | 'dark';
|
||||
|
||||
export type ColorMapKey = keyof typeof defaultColorMap;
|
||||
export type ColorMapValue = (typeof defaultColorMap)[ColorMapKey];
|
||||
|
||||
30
lib/types/popupwindow.d.ts
vendored
30
lib/types/popupwindow.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
import { Widget } from "types/widgets/widget";
|
||||
import { WindowProps } from "types/widgets/window";
|
||||
import { Transition } from "./widget";
|
||||
import { Widget } from 'types/widgets/widget';
|
||||
import { WindowProps } from 'types/widgets/window';
|
||||
import { Transition } from './widget';
|
||||
|
||||
export type PopupWindowProps = {
|
||||
name: string;
|
||||
@@ -13,15 +13,23 @@ export type PopupWindowProps = {
|
||||
export type LayoutFunction = (
|
||||
name: string,
|
||||
child: Widget,
|
||||
transition: Transition
|
||||
transition: Transition,
|
||||
) => {
|
||||
center: () => Widget;
|
||||
top: () => Widget;
|
||||
"top-right": () => Widget;
|
||||
"top-center": () => Widget;
|
||||
"top-left": () => Widget;
|
||||
"bottom-left": () => Widget;
|
||||
"bottom-center": () => Widget;
|
||||
"bottom-right": () => Widget;
|
||||
'top-right': () => Widget;
|
||||
'top-center': () => Widget;
|
||||
'top-left': () => Widget;
|
||||
'bottom-left': () => Widget;
|
||||
'bottom-center': () => Widget;
|
||||
'bottom-right': () => Widget;
|
||||
};
|
||||
export type Layouts = 'center' | 'top' | 'top-right' | 'top-center' | 'top-left' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
||||
export type Layouts =
|
||||
| 'center'
|
||||
| 'top'
|
||||
| 'top-right'
|
||||
| 'top-center'
|
||||
| 'top-left'
|
||||
| 'bottom-left'
|
||||
| 'bottom-center'
|
||||
| 'bottom-right';
|
||||
|
||||
2
lib/types/power.d.ts
vendored
2
lib/types/power.d.ts
vendored
@@ -1 +1 @@
|
||||
export type Action = "sleep" | "reboot" | "logout" | "shutdown";
|
||||
export type Action = 'sleep' | 'reboot' | 'logout' | 'shutdown';
|
||||
|
||||
8
lib/types/powerprofiles.d.ts
vendored
8
lib/types/powerprofiles.d.ts
vendored
@@ -1,8 +1,8 @@
|
||||
import icons from "modules/icons/index";
|
||||
import PowerProfiles from "types/service/powerprofiles.js"
|
||||
import icons from 'modules/icons/index';
|
||||
import PowerProfiles from 'types/service/powerprofiles.js';
|
||||
|
||||
export type PowerProfiles = InstanceType<typeof PowerProfiles>;
|
||||
export type PowerProfile = "power-saver" | "balanced" | "performance";
|
||||
export type PowerProfile = 'power-saver' | 'balanced' | 'performance';
|
||||
export type PowerProfileObject = {
|
||||
[key: string]: string;
|
||||
}
|
||||
};
|
||||
|
||||
0
lib/types/systray.d.ts
vendored
Normal file
0
lib/types/systray.d.ts
vendored
Normal file
5
lib/types/utils.d.ts
vendored
5
lib/types/utils.d.ts
vendored
@@ -1,3 +1,6 @@
|
||||
import { substitutes } from "lib/icons";
|
||||
import { substitutes } from 'lib/icons';
|
||||
|
||||
type SubstituteKeys = keyof typeof substitutes;
|
||||
|
||||
export type ThrottleFn = (cmd: string, fn: ((output: string) => void) | undefined) => void;
|
||||
export type ThrottleFnCallback = ((output: string) => void) | undefined;
|
||||
|
||||
1
lib/types/variable.d.ts
vendored
Normal file
1
lib/types/variable.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export type Bind = OriginalBinding<GObject.Object, keyof Props<GObject.Object>, unknown>;
|
||||
4
lib/types/volume.d.ts
vendored
4
lib/types/volume.d.ts
vendored
@@ -1,3 +1,3 @@
|
||||
export type VolumeIcons = {
|
||||
[index: number]: string
|
||||
}
|
||||
[index: number]: string;
|
||||
};
|
||||
|
||||
24
lib/types/weather.d.ts
vendored
24
lib/types/weather.d.ts
vendored
@@ -1,12 +1,12 @@
|
||||
import { weatherIcons } from "modules/icons/weather";
|
||||
import { weatherIcons } from 'modules/icons/weather';
|
||||
|
||||
export type UnitType = "imperial" | "metric";
|
||||
export type UnitType = 'imperial' | 'metric';
|
||||
|
||||
export type Weather = {
|
||||
location: Location;
|
||||
current: Current;
|
||||
forecast: Forecast;
|
||||
}
|
||||
};
|
||||
|
||||
export type Current = {
|
||||
last_updated_epoch?: number;
|
||||
@@ -45,17 +45,17 @@ export type Current = {
|
||||
chance_of_rain?: number;
|
||||
will_it_snow?: number;
|
||||
chance_of_snow?: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type Condition = {
|
||||
text: string;
|
||||
icon: string;
|
||||
code: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type Forecast = {
|
||||
forecastday: Forecastday[];
|
||||
}
|
||||
};
|
||||
|
||||
export type Forecastday = {
|
||||
date: string;
|
||||
@@ -63,7 +63,7 @@ export type Forecastday = {
|
||||
day: Day;
|
||||
astro: Astro;
|
||||
hour: Current[];
|
||||
}
|
||||
};
|
||||
|
||||
export type Astro = {
|
||||
sunrise: string;
|
||||
@@ -74,7 +74,7 @@ export type Astro = {
|
||||
moon_illumination: number;
|
||||
is_moon_up: number;
|
||||
is_sun_up: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type Day = {
|
||||
maxtemp_c: number;
|
||||
@@ -97,7 +97,7 @@ export type Day = {
|
||||
daily_chance_of_snow: number;
|
||||
condition: Condition;
|
||||
uv: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type Location = {
|
||||
name: string;
|
||||
@@ -108,11 +108,11 @@ export type Location = {
|
||||
tz_id: string;
|
||||
localtime_epoch: number;
|
||||
localtime: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type TemperatureIconColorMap = {
|
||||
[key: number]: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type WeatherIconTitle = keyof typeof weatherIcons;
|
||||
export type WeatherIcon = typeof weatherIcons[WeatherIconTitle];
|
||||
export type WeatherIcon = (typeof weatherIcons)[WeatherIconTitle];
|
||||
|
||||
32
lib/types/widget.d.ts
vendored
32
lib/types/widget.d.ts
vendored
@@ -1,6 +1,28 @@
|
||||
export type Exclusivity = 'normal' | 'ignore' | 'exclusive';
|
||||
export type Anchor = "left" | "right" | "top" | "down";
|
||||
export type Transition = "none" | "crossfade" | "slide_right" | "slide_left" | "slide_up" | "slide_down";
|
||||
import Gtk from 'types/@girs/gtk-3.0/gtk-3.0';
|
||||
import Box from 'types/widgets/box';
|
||||
|
||||
// Window
|
||||
export type Layouts = 'center' | 'top' | 'top-right' | 'top-center' | 'top-left' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
||||
export type Exclusivity = 'normal' | 'ignore' | 'exclusive';
|
||||
export type Anchor = 'left' | 'right' | 'top' | 'down';
|
||||
export type Transition = 'none' | 'crossfade' | 'slide_right' | 'slide_left' | 'slide_up' | 'slide_down';
|
||||
|
||||
export type Layouts =
|
||||
| 'center'
|
||||
| 'top'
|
||||
| 'top-right'
|
||||
| 'top-center'
|
||||
| 'top-left'
|
||||
| 'bottom-left'
|
||||
| 'bottom-center'
|
||||
| 'bottom-right';
|
||||
|
||||
export type Attribute = unknown;
|
||||
export type Child = Gtk.Widget;
|
||||
export type GtkWidget = Gtk.Widget;
|
||||
export type BoxWidget = Box<GtkWidget, Child>;
|
||||
|
||||
export type GButton = Gtk.Button;
|
||||
export type GBox = Gtk.Box;
|
||||
export type GLabel = Gtk.Label;
|
||||
export type GCenterBox = Gtk.Box;
|
||||
|
||||
export type EventHandler<Self> = (self: Self, event: Gdk.Event) => boolean | unknown;
|
||||
|
||||
14
lib/types/workspace.d.ts
vendored
14
lib/types/workspace.d.ts
vendored
@@ -1,8 +1,12 @@
|
||||
export type WorkspaceRule = {
|
||||
workspaceString: string,
|
||||
monitor: string,
|
||||
}
|
||||
workspaceString: string;
|
||||
monitor: string;
|
||||
};
|
||||
|
||||
export type WorkspaceMap = {
|
||||
[key: string]: number[],
|
||||
}
|
||||
[key: string]: number[];
|
||||
};
|
||||
|
||||
export type MonitorMap = {
|
||||
[key: number]: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user