Monitor identification update. (#107)
* Add proper gtk to hyprland monitor mapping * Updated the monitor identification logic to sync GDK monitor IDs properly with hyprland monitor IDs. * Remove console statement. * Revert this to how it was before since its exactly the same thing.
This commit is contained in:
@@ -54,8 +54,8 @@ export async function sh(cmd: string | string[]) {
|
||||
}
|
||||
|
||||
export function forMonitors(widget: (monitor: number) => Gtk.Window) {
|
||||
const n = Gdk.Display.get_default()?.get_n_monitors() || 1
|
||||
return range(n, 0).flatMap(widget)
|
||||
const n = Gdk.Display.get_default()?.get_n_monitors() || 1;
|
||||
return range(n, 0).flatMap(widget);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,7 +148,7 @@ export const Notify = (notifPayload: NotificationArgs): void => {
|
||||
Utils.execAsync(command)
|
||||
}
|
||||
|
||||
export function getPosition (pos: NotificationAnchor | OSDAnchor): ("top" | "bottom" | "left" | "right")[] {
|
||||
export function getPosition(pos: NotificationAnchor | OSDAnchor): ("top" | "bottom" | "left" | "right")[] {
|
||||
const positionMap: { [key: string]: ("top" | "bottom" | "left" | "right")[] } = {
|
||||
"top": ["top"],
|
||||
"top right": ["top", "right"],
|
||||
@@ -161,4 +161,4 @@ export function getPosition (pos: NotificationAnchor | OSDAnchor): ("top" | "bot
|
||||
};
|
||||
|
||||
return positionMap[pos] || ["top"];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user