Files
dotfiles/raymenu/main.go
T
Ivar Fatland d7111a78cc move picker into own package
should really bee the other way around so that the raymenu executable is
a sub-project of the picker.
2026-05-12 11:45:00 +02:00

31 lines
432 B
Go

package main
import (
"fmt"
"io"
"log"
"os"
"slices"
"strings"
"github.com/roodletoof/dotfiles/raymenu/picker"
)
func main() {
input, err := io.ReadAll(os.Stdin)
if err != nil {
log.Fatalln(err)
}
choices := strings.Split(string(input), "\n")
choices = slices.DeleteFunc(choices, func(l string) bool {
return l == ""
})
choice, ok := picker.RaylibPicker(choices)
if ok {
fmt.Println(choices[choice])
}
}