feat: add Arch update helper and web UI
This commit is contained in:
18
internal/notify/notify.go
Normal file
18
internal/notify/notify.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package notify
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func Send(title, body string) error {
|
||||
if _, err := exec.LookPath("notify-send"); err == nil {
|
||||
return exec.Command("notify-send", "-a", "LazyUpdateManager", title, body).Run()
|
||||
}
|
||||
|
||||
if _, err := exec.LookPath("hyprctl"); err == nil {
|
||||
return exec.Command("hyprctl", "notify", "1", "8000", "rgb(73daca)", title+": "+body).Run()
|
||||
}
|
||||
|
||||
return errors.New("neither notify-send nor hyprctl is available")
|
||||
}
|
||||
Reference in New Issue
Block a user