Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
576f455dde | |||
bfde5c2d21 |
2 changed files with 1 additions and 2 deletions
2
main.go
2
main.go
|
@ -20,8 +20,6 @@ func notify(msg string) {
|
||||||
|
|
||||||
var targetFlag = flag.Int("target", 15, "when to send the alert")
|
var targetFlag = flag.Int("target", 15, "when to send the alert")
|
||||||
|
|
||||||
func main() {
|
|
||||||
flag.Parse()
|
|
||||||
sent := false
|
sent := false
|
||||||
for {
|
for {
|
||||||
capacity, err := os.ReadFile("/sys/class/power_supply/BAT0/capacity")
|
capacity, err := os.ReadFile("/sys/class/power_supply/BAT0/capacity")
|
||||||
|
|
1
test.txt
Normal file
1
test.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
Loading…
Reference in a new issue