Always use monitor with the lowest id for ags
This commit is contained in:
parent
38e4b5b3a7
commit
f84abf9908
|
@ -49,6 +49,13 @@ const volumeIndicator = Widget.Button({
|
||||||
]}),
|
]}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let monitor = 0
|
||||||
|
for (const mon in hyprland.monitors) {
|
||||||
|
if (hyprland.monitors[mon]["id"] < hyprland.monitors[monitor]["id"]) {
|
||||||
|
monitor = mon
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Clients() {
|
function Clients() {
|
||||||
const activeId = hyprland.active.client.bind("address")
|
const activeId = hyprland.active.client.bind("address")
|
||||||
const clients = hyprland.bind("clients").as(cl =>
|
const clients = hyprland.bind("clients").as(cl =>
|
||||||
|
@ -106,7 +113,6 @@ function Workspaces() {
|
||||||
function SysTray() {
|
function SysTray() {
|
||||||
const items = systemtray.bind("items")
|
const items = systemtray.bind("items")
|
||||||
.as(items => items.map(item => {
|
.as(items => items.map(item => {
|
||||||
print(JSON.stringify(item))
|
|
||||||
return Widget.Button({
|
return Widget.Button({
|
||||||
child: Widget.Icon({
|
child: Widget.Icon({
|
||||||
icon: item.bind("icon"),
|
icon: item.bind("icon"),
|
||||||
|
@ -256,11 +262,12 @@ function Bar(monitor = 0) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print(JSON.stringify(monitor))
|
||||||
App.config({
|
App.config({
|
||||||
style: "./style.css",
|
style: "./style.css",
|
||||||
iconTheme: "Papirus",
|
iconTheme: "Papirus",
|
||||||
windows: [
|
windows: [
|
||||||
Bar(0),
|
Bar(monitor),
|
||||||
NotificationPopups(),
|
NotificationPopups(),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue