refactor moving status to pipeline not daemon
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user