mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
- workspace indicator: no more goofy notch, now cairo-drawn to ensure accuracy and maintain animations - made notification icons a bit smaller
53 lines
No EOL
1.5 KiB
JavaScript
53 lines
No EOL
1.5 KiB
JavaScript
const { Gdk, Gtk } = imports.gi;
|
|
import { App, Service, Utils, Widget } from '../../imports.js';
|
|
const { execAsync, exec } = Utils;
|
|
|
|
import { ModuleLeftSpace } from "./leftspace.js";
|
|
import { ModuleMusic } from "./music.js";
|
|
import { ModuleRightSpace } from "./rightspace.js";
|
|
import { ModuleSystem } from "./system.js";
|
|
import ModuleWorkspaces from "./workspaces.js";
|
|
import { RoundedCorner } from "../../lib/roundedcorner.js";
|
|
|
|
const left = Widget.Box({
|
|
className: 'bar-sidemodule',
|
|
children: [
|
|
ModuleMusic()
|
|
],
|
|
});
|
|
|
|
const center = Widget.Box({
|
|
children: [
|
|
ModuleWorkspaces(),
|
|
],
|
|
});
|
|
|
|
const right = Widget.Box({
|
|
className: 'bar-sidemodule',
|
|
children: [ModuleSystem()],
|
|
});
|
|
|
|
export default () => Widget.Window({
|
|
name: 'bar',
|
|
anchor: ['top', 'left', 'right'],
|
|
exclusivity: 'exclusive',
|
|
visible: true,
|
|
child: Widget.CenterBox({
|
|
className: 'bar-bg',
|
|
startWidget: ModuleLeftSpace(),
|
|
centerWidget: Widget.Box({
|
|
className: 'spacing-h-4',
|
|
children: [
|
|
left,
|
|
center,
|
|
right,
|
|
]
|
|
}),
|
|
endWidget: ModuleRightSpace(),
|
|
setup: (self) => {
|
|
const styleContext = self.get_style_context();
|
|
const minHeight = styleContext.get_property('min-height', Gtk.StateFlags.NORMAL);
|
|
// execAsync(['bash', '-c', `hyprctl keyword monitor ,addreserved,${minHeight},0,0,0`]).catch(print);
|
|
}
|
|
}),
|
|
}); |