summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-22 18:24:25 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-22 18:24:25 +1000
commitf11e3ec5eff2e17db45216d54dd05de74d69d8d7 (patch)
treef1fe4bbc064992b0bb0b2f654502fa0276e05a65
parentpopouts: better bt loading icon (diff)
downloadcaelestia-shell-f11e3ec5eff2e17db45216d54dd05de74d69d8d7.tar.gz
caelestia-shell-f11e3ec5eff2e17db45216d54dd05de74d69d8d7.tar.bz2
caelestia-shell-f11e3ec5eff2e17db45216d54dd05de74d69d8d7.zip
internal: better visibilities multimon handling
-rw-r--r--services/Visibilities.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/Visibilities.qml b/services/Visibilities.qml
index 9b04118..5527b60 100644
--- a/services/Visibilities.qml
+++ b/services/Visibilities.qml
@@ -3,9 +3,14 @@ pragma Singleton
import Quickshell
Singleton {
- property var screens: ({})
+ property var screens: new Map()
+
+ function load(screen: ShellScreen, visibilities: var): void {
+ screens.set(screen.model + screen.name, visibilities);
+ }
function getForActive(): PersistentProperties {
- return Object.entries(screens).find(s => s[0].slice(s[0].indexOf('"') + 1, s[0].lastIndexOf('"')) === Hyprland.focusedMonitor.name)[1];
+ const mon = Hyprland.focusedMonitor;
+ return screens.get(mon.lastIpcObject.model + mon.name);
}
}