nixos-configs/modules/ags/config/ts/bar/items/cal-opener.ts
matt1432 22722c27c4
All checks were successful
Discord / discord commits (push) Has been skipped
feat(ags): use hyprland animations for popup windows
2024-04-07 14:29:12 -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(),
});