This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/bin/maybe-good-morning

22 lines
568 B
Fish
Executable File

#!/usr/bin/env fish
# TODO: some kind of better time-based or last-awakened heuristic to determine
# whether or not this shows
set -l hours 08 09 10
if ! contains (date +%H) $hours
echo "Not sending notification since it isn't the morning" >>&2
exit 1
end
notify-send \
--urgency critical \
"Good morning!" \
"Activate this notification (click it) to run the script. Dismiss (Super+Ctrl+Space) to ignore." \
--action=default=Activate \
| rg default
if test $status -eq 0
hyprctl dispatch exec [float] wezterm start good-morning
end