nixos-configs/modules/ags/config/ts/misc/closer.ts
matt1432 9c64b00243
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(ags): start update types and use classes for cbox and popup
2024-01-29 18:54:07 -05:00

15 lines
402 B
TypeScript

import App from 'resource:///com/github/Aylur/ags/app.js';
// Types
import { PopupWindow } from 'global-types';
export default () => {
(Array.from(App.windows) as Array<[string, PopupWindow]>)
.filter((w) =>
w[1].attribute.close_on_unfocus &&
w[1].attribute.close_on_unfocus !== 'stay')
.forEach((w) => {
App.closeWindow(w[0]);
});
};