refactor moving status to pipeline not daemon

This commit is contained in:
LeonardoTrapani
2025-08-14 15:06:34 +02:00
parent 4852ad7ac1
commit 743b103857
4 changed files with 101 additions and 177 deletions
+8
View File
@@ -8,6 +8,7 @@ import (
type Notifier interface {
RecordingStarted()
RecordingEnded()
Aborted()
Transcribing()
Error(msg string)
}
@@ -35,6 +36,13 @@ func (Desktop) Transcribing() {
}
}
func (Desktop) Aborted() {
cmd := exec.Command("notify-send", "-a", "Hyprvoice", "-u", "critical", "Hyprvoice: Aborted")
if err := cmd.Run(); err != nil {
log.Printf("Failed to send abort notification: %v", err)
}
}
func (Desktop) Error(msg string) {
cmd := exec.Command("notify-send", "-a", "Hyprvoice", "-u", "critical", msg)
if err := cmd.Run(); err != nil {