import { bind, Variable } from 'astal'; import { Astal, Gtk } from 'astal/gtk3'; import GLib from 'gi://GLib?version=2.0'; import PopupWindow from '../misc/popup-window'; const Divider = () => ( ); const Time = () => { const hour = Variable('').poll(1000, () => GLib.DateTime.new_now_local().format('%H') || ''); const min = Variable('').poll(1000, () => GLib.DateTime.new_now_local().format('%M') || ''); const fullDate = Variable('').poll(1000, () => { const time = GLib.DateTime.new_now_local(); const dayNameMonth = time.format('%A, %B '); const dayNum = time.get_day_of_month(); const date = time.format(', %Y'); return dayNum && dayNameMonth && date ? dayNameMonth + dayNum + date : ''; }); return ( ); }; const DateWidget = () => { const cal = new Gtk.Calendar({ show_day_names: true, show_heading: true, }); cal.show_all(); return ( ); }; export default () => ( );