internal: better visibilities multimon handling
This commit is contained in:
parent
b6d1b1922d
commit
f11e3ec5ef
1 changed files with 7 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue