#!/bin/bash

# omarchy:summary=Show the current time and date notification

# Day and month names follow the Omarchy language right away, rather than
# LC_TIME, which only catches up with it at the next login. One timestamp feeds
# every part, so a notification sent at midnight can't mix two days.
locale=$(omarchy-language locale)
now=$(date +%s)
day_time=$(LC_TIME=$locale date -d "@$now" +"%A %H:%M")
day_month_year=$(LC_TIME=$locale date -d "@$now" +"%d %B %Y")

omarchy-notification-send -g  -u low "$(omarchy-i18n time.now "$day_time" "$day_month_year" "$(date -d "@$now" +%V)")"
