i3-blocks-go/blocks/app/main.go
2022-08-28 15:36:24 +02:00

26 lines
427 B
Go

package main
import (
"fmt"
r "gitnet.fr/deblan/i3-blocks-go/rendering"
"os"
"os/exec"
)
func main() {
if os.Getenv("BLOCK_BUTTON") == "1" {
command := exec.Command("bash", "-c", os.Args[5])
command.Run()
}
options := r.NewBlockOptions()
options.FullText = r.TextWithPadding(os.Args[2], r.FB{
Background: os.Args[3],
Foreground: os.Args[4],
})
block := r.Block(os.Args[1], options)
fmt.Println(block)
}