nixos-configs/nixosModules/ags/config/ts/misc/closer.ts

14 lines
292 B
TypeScript
Raw Normal View History

2024-01-13 11:15:08 -05:00
// Types
import { PopupWindow } from 'global-types';
2024-01-13 11:15:08 -05:00
export default () => {
(App.windows as PopupWindow[])
2024-01-31 15:09:03 -05:00
.filter((w) => w &&
w.close_on_unfocus &&
w.close_on_unfocus !== 'stay')
.forEach((w) => {
2024-01-31 15:09:03 -05:00
App.closeWindow(w.name);
});
};