@@ -6,11 +6,11 @@ export const range = (length: number, start = 1) => {
|
||||
};
|
||||
|
||||
export const getHyprlandMonitor = (gdkmonitor: Gdk.Monitor) => {
|
||||
const hyprland = Hyprland.get_default()
|
||||
const hyprland = Hyprland.get_default();
|
||||
const display = Gdk.Display.get_default()!;
|
||||
const screen = display.get_default_screen();
|
||||
for (let i = 0; i < display.get_n_monitors(); ++i) {
|
||||
if (gdkmonitor === display.get_monitor(i))
|
||||
return hyprland.get_monitor_by_name(screen.get_monitor_plug_name(i)!);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user