Add ags
This commit is contained in:
parent
3648827637
commit
c8d7b4c090
8 changed files with 415 additions and 0 deletions
11
misc/.config/ags/utils.js
Normal file
11
misc/.config/ags/utils.js
Normal 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)
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue