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/os/linux/bin/maybe-good-morning

25 lines
662 B
Plaintext
Raw Normal View History

2023-05-17 10:12:41 -05:00
#!/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 \
2023-07-12 02:20:03 -05:00
--expire-time=0 \
2023-05-17 10:12:41 -05:00
--urgency critical \
"Good morning!" \
"Activate this notification (click it or Super+Shift+Space) to run the script. Dismiss (Super+Ctrl+Space) to ignore." \
--action=default=Activate \
| rg default \
2023-06-06 01:47:11 -05:00
&& \
if set -q HYPRLAND_INSTANCE_SIGNATURE
hyprctl dispatch exec [float] wezterm start good-morning
else
sway exec 'floating-term good-morning'
end