summaryrefslogtreecommitdiff
path: root/notificator.go
blob: 1e6022185582688f1156b3cc9a32be97c59bba75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main

import (
	"os"
	"path"
	"time"

	"github.com/0xAX/notificator"
)

const notificationText = `The RiseupVPN service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month at https://riseup.net/donate-vpn`

func notificate() {
	wd, _ := os.Getwd()
	notify := notificator.New(notificator.Options{
		DefaultIcon: path.Join(wd, "riseupvpn.svg"),
		AppName:     "RiseupVPN",
	})

	for {
		time.Sleep(time.Minute * 5)
		notify.Push("Donate to RiseupVPN", notificationText, "", notificator.UR_NORMAL)
		time.Sleep(time.Hour * 24)
	}
}