This commit is contained in:
agryphus 2024-03-18 17:14:15 -04:00
parent 3648827637
commit c8d7b4c090
8 changed files with 415 additions and 0 deletions

11
misc/.config/ags/utils.js Normal file
View file

@ -0,0 +1,11 @@
import Gdk from "gi://Gdk"
export function forMonitors(widget) {
const n = Gdk.Display.get_default()?.get_n_monitors() || 1;
return range(n, 0).map(widget).flat(1);
}
export function range(length, start = 1) {
return Array.from({ length }, (_, i) => i + start)
}