nixos-configs/nixosModules/ags/config/ts/misc/closer.ts
matt1432 24aa4b9842
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: make modules independant and exposed in the flake for outside use
2024-08-02 22:32:29 -04:00

13 lines
292 B
TypeScript

// Types
import { PopupWindow } from 'global-types';
export default () => {
(App.windows as PopupWindow[])
.filter((w) => w &&
w.close_on_unfocus &&
w.close_on_unfocus !== 'stay')
.forEach((w) => {
App.closeWindow(w.name);
});
};