forked from Shinonome/dots-hyprland
init illogical-impulse
This commit is contained in:
@@ -123,7 +123,7 @@ const BarBattery = () => {
|
||||
['fallback', memUsage],
|
||||
['battery', batteryWidget],
|
||||
],
|
||||
setup: (stack) => Utils.timeout(1, () => {
|
||||
setup: (stack) => Utils.timeout(1, () => { // On desktops systems with no battery, show memory usage instead
|
||||
if (Battery.available) stack.shown = 'battery';
|
||||
else stack.shown = 'fallback';
|
||||
})
|
||||
@@ -134,6 +134,7 @@ const BarBattery = () => {
|
||||
export const ModuleSystem = () => Widget.EventBox({
|
||||
onScrollUp: () => execAsync('hyprctl dispatch workspace -1'),
|
||||
onScrollDown: () => execAsync('hyprctl dispatch workspace +1'),
|
||||
onPrimaryClick: () => App.toggleWindow('sideright'),
|
||||
child: Widget.Box({
|
||||
className: 'bar-group-margin bar-sides',
|
||||
children: [
|
||||
|
||||
@@ -74,12 +74,14 @@ export const ModuleWorkspaces = () => Widget.EventBox({
|
||||
[Hyprland, (box) => {
|
||||
// console.log('update');
|
||||
const kids = box.children;
|
||||
kids.forEach((child, i) => {
|
||||
for (let i = 0; i < kids.length; i++) {
|
||||
const child = kids[i];
|
||||
child.child.toggleClassName('bar-ws-occupied', false);
|
||||
child.child.toggleClassName('bar-ws-occupied-left', false);
|
||||
child.child.toggleClassName('bar-ws-occupied-right', false);
|
||||
child.child.toggleClassName('bar-ws-occupied-left-right', false);
|
||||
});
|
||||
}
|
||||
|
||||
const occupied = Array.from({ length: NUM_OF_WORKSPACES }, (_, i) => Hyprland.getWorkspace(i + 1)?.windows > 0);
|
||||
for (let i = 0; i < occupied.length; i++) {
|
||||
if (!occupied[i]) continue;
|
||||
|
||||
Reference in New Issue
Block a user