nixos-configs/nixosModules/ags/config/ts/bar/items/cal-opener.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

19 lines
458 B
TypeScript

import CursorBox from '../../misc/cursorbox.ts';
import Clock from './clock';
export default () => CursorBox({
class_name: 'toggle-off',
on_primary_click_release: () => App.toggleWindow('win-calendar'),
setup: (self) => {
self.hook(App, (_, windowName, visible) => {
if (windowName === 'win-calendar') {
self.toggleClassName('toggle-on', visible);
}
});
},
child: Clock(),
});