summary refs log tree commit diff stats
path: root/cmd/cetus/bpod.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/cetus/bpod.go')
-rw-r--r--cmd/cetus/bpod.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/cetus/bpod.go b/cmd/cetus/bpod.go
index f308d47..cf0a4bb 100644
--- a/cmd/cetus/bpod.go
+++ b/cmd/cetus/bpod.go
@@ -8,6 +8,7 @@ import (
 
 	"framagit.org/andinus/cetus/pkg/background"
 	"framagit.org/andinus/cetus/pkg/bpod"
+	"framagit.org/andinus/indus/notification"
 )
 
 func execBPOD() {
@@ -107,6 +108,18 @@ func execBPOD() {
 		bpod.Print(res)
 	}
 
+	// Send a desktop notification if notify flag was passed
+	if *bpodNotify {
+		n := notification.Notif{}
+		n.Title = res.Title
+		n.Message = fmt.Sprintf("%s\n\n%s",
+			res.StartDate,
+			res.Copyright)
+
+		err = n.Notify()
+		chkErr(err)
+	}
+
 	// Proceed only if the command was set because if it was fetch
 	// then it's already finished & should exit now.
 	if os.Args[1] == "fetch" {