Fix: An issue that would cause Matugen colors to not apply. (#929)
* Eslint updates * linter fixes * Type fixes * More type fixes * Fix isvis * More type fixes * Type Fixes * Consolidate logic to manage options * Linter fixes * Package lock update * Update configs * Version checker * Debug pipeline * Package lock update * Update ci * Strict check * Revert ci * Eslint * Remove rule since it causes issues in CI * Actual matugen fix
This commit is contained in:
@@ -2,8 +2,8 @@ import { isMiddleClick, isPrimaryClick, isSecondaryClick, Notify } from '../../.
|
||||
import options from '../../../../options';
|
||||
import AstalTray from 'gi://AstalTray?version=0.1';
|
||||
import { bind, Gio, Variable } from 'astal';
|
||||
import { BarBoxChild } from 'src/lib/types/bar';
|
||||
import { Gdk, Gtk } from 'astal/gtk3';
|
||||
import { BarBoxChild } from 'src/lib/types/bar.types';
|
||||
|
||||
const systemtray = AstalTray.get_default();
|
||||
const { ignore, customIcons } = options.bar.systray;
|
||||
@@ -28,7 +28,13 @@ const MenuCustomIcon = ({ iconLabel, iconColor, item }: MenuCustomIconProps): JS
|
||||
};
|
||||
|
||||
const MenuDefaultIcon = ({ item }: MenuEntryProps): JSX.Element => {
|
||||
return <icon className={'systray-icon'} gIcon={bind(item, 'gicon')} tooltipMarkup={bind(item, 'tooltipMarkup')} />;
|
||||
return (
|
||||
<icon
|
||||
className={'systray-icon'}
|
||||
gIcon={bind(item, 'gicon')}
|
||||
tooltipMarkup={bind(item, 'tooltipMarkup')}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const MenuEntry = ({ item, child }: MenuEntryProps): JSX.Element => {
|
||||
@@ -37,10 +43,10 @@ const MenuEntry = ({ item, child }: MenuEntryProps): JSX.Element => {
|
||||
const entryBinding = Variable.derive(
|
||||
[bind(item, 'menuModel'), bind(item, 'actionGroup')],
|
||||
(menuModel, actionGroup) => {
|
||||
if (!menuModel) {
|
||||
if (menuModel === null) {
|
||||
return console.error(`Menu Model not found for ${item.id}`);
|
||||
}
|
||||
if (!actionGroup) {
|
||||
if (actionGroup === null) {
|
||||
return console.error(`Action Group not found for ${item.id}`);
|
||||
}
|
||||
|
||||
@@ -85,7 +91,9 @@ const SysTray = (): BarBoxChild => {
|
||||
isVis.set(filteredTray.length > 0);
|
||||
|
||||
return filteredTray.map((item) => {
|
||||
const matchedCustomIcon = Object.keys(custIcons).find((iconRegex) => item.id.match(iconRegex));
|
||||
const matchedCustomIcon = Object.keys(custIcons).find((iconRegex) =>
|
||||
item.id.match(iconRegex),
|
||||
);
|
||||
|
||||
if (matchedCustomIcon !== undefined) {
|
||||
const iconLabel = custIcons[matchedCustomIcon].icon || '';
|
||||
@@ -122,7 +130,7 @@ const SysTray = (): BarBoxChild => {
|
||||
component,
|
||||
isVisible: true,
|
||||
boxClass: 'systray',
|
||||
isVis,
|
||||
isVis: bind(isVis),
|
||||
isBox: true,
|
||||
props: {},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user