tmux watch notif

This commit is contained in:
David Chen 2026-04-09 10:58:24 -07:00
parent c56de89d3d
commit 8298371b35
3 changed files with 25 additions and 1 deletions

View file

@ -204,6 +204,21 @@ func (s *server) handleCommand(env ipc.Envelope) error {
s.broadcastStateAsync()
s.statusRefreshAsync()
return nil
case "notify":
target, err := requireSessionWindow(env)
if err != nil {
return err
}
message := firstNonEmpty(env.Summary, env.Message)
if message == "" {
return fmt.Errorf("notify requires summary")
}
if s.notificationsAreEnabled() {
if err := sendSystemNotification(notificationTitleForTarget(target), message, notificationActionForTarget(target)); err != nil {
return err
}
}
return nil
case "update_task":
target, err := requireSessionWindow(env)
if err != nil {