forked from Shinonome/dots-hyprland
fix null not window error; don't add nulls when ternaries are wrong
This commit is contained in:
@@ -46,6 +46,7 @@ applyStyle().catch(print);
|
|||||||
|
|
||||||
const Windows = () => [
|
const Windows = () => [
|
||||||
// forMonitors(DesktopBackground),
|
// forMonitors(DesktopBackground),
|
||||||
|
|
||||||
Overview(),
|
Overview(),
|
||||||
forMonitors(Indicator),
|
forMonitors(Indicator),
|
||||||
forMonitors(Cheatsheet),
|
forMonitors(Cheatsheet),
|
||||||
@@ -53,7 +54,7 @@ const Windows = () => [
|
|||||||
SideRight(),
|
SideRight(),
|
||||||
forMonitors(Osk),
|
forMonitors(Osk),
|
||||||
forMonitors(Session),
|
forMonitors(Session),
|
||||||
userOptions.dock.enabled ? forMonitors(Dock) : null,
|
...(userOptions.dock.enabled ? [forMonitors(Dock)] : []),
|
||||||
...(userOptions.appearance.fakeScreenRounding ? [
|
...(userOptions.appearance.fakeScreenRounding ? [
|
||||||
forMonitors((id) => Corner(id, 'top left', true)),
|
forMonitors((id) => Corner(id, 'top left', true)),
|
||||||
forMonitors((id) => Corner(id, 'top right', true)),
|
forMonitors((id) => Corner(id, 'top right', true)),
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ export const ConfigToggle = ({
|
|||||||
tooltipText: desc,
|
tooltipText: desc,
|
||||||
className: 'txt spacing-h-5 configtoggle-box',
|
className: 'txt spacing-h-5 configtoggle-box',
|
||||||
children: [
|
children: [
|
||||||
(icon !== undefined ? MaterialIcon(icon, 'norm') : null),
|
...(icon !== undefined ? [MaterialIcon(icon, 'norm')] : []),
|
||||||
(name !== undefined ? Label({
|
...(name !== undefined ? [Label({
|
||||||
className: 'txt txt-small',
|
className: 'txt txt-small',
|
||||||
label: name,
|
label: name,
|
||||||
}) : null),
|
})] : []),
|
||||||
expandWidget ? Box({ hexpand: true }) : null,
|
...(expandWidget ? [Box({ hexpand: true })] : []),
|
||||||
toggleButton,
|
toggleButton,
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -203,12 +203,12 @@ export const ConfigSpinButton = ({
|
|||||||
tooltipText: desc,
|
tooltipText: desc,
|
||||||
className: 'txt spacing-h-5 configtoggle-box',
|
className: 'txt spacing-h-5 configtoggle-box',
|
||||||
children: [
|
children: [
|
||||||
(icon !== undefined ? MaterialIcon(icon, 'norm') : null),
|
...(icon !== undefined ? [MaterialIcon(icon, 'norm')] : []),
|
||||||
(name !== undefined ? Label({
|
...(name !== undefined ? [Label({
|
||||||
className: 'txt txt-small',
|
className: 'txt txt-small',
|
||||||
label: name,
|
label: name,
|
||||||
}) : null),
|
})] : []),
|
||||||
expandWidget ? Box({ hexpand: true }) : null,
|
...(expandWidget ? [Box({ hexpand: true })] : []),
|
||||||
spinButton,
|
spinButton,
|
||||||
],
|
],
|
||||||
setup: (self) => {
|
setup: (self) => {
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ const BluetoothDevices = () => Widget.Box({
|
|||||||
tooltipText: device.name,
|
tooltipText: device.name,
|
||||||
children: [
|
children: [
|
||||||
Widget.Icon(`${device.iconName}-symbolic`),
|
Widget.Icon(`${device.iconName}-symbolic`),
|
||||||
(device.batteryPercentage ? Widget.Label({
|
...(device.batteryPercentage ? [Widget.Label({
|
||||||
className: 'txt-smallie',
|
className: 'txt-smallie',
|
||||||
label: `${device.batteryPercentage}`,
|
label: `${device.batteryPercentage}`,
|
||||||
setup: (self) => {
|
setup: (self) => {
|
||||||
@@ -114,7 +114,7 @@ const BluetoothDevices = () => Widget.Box({
|
|||||||
self.label = `${device.batteryPercentage}`;
|
self.label = `${device.batteryPercentage}`;
|
||||||
}, 'notify::batteryPercentage')
|
}, 'notify::batteryPercentage')
|
||||||
}
|
}
|
||||||
}) : null),
|
})] : []),
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user