Compare commits

..

No commits in common. "main" and "009-clean-up" have entirely different histories.

10
main.go
View file

@ -1,7 +1,5 @@
package main package main
// Testing out tea; really, git and ssh
import ( import (
"fmt" "fmt"
"io/fs" "io/fs"
@ -84,10 +82,6 @@ func initialModel() model {
displayString: "newsboat", displayString: "newsboat",
command: exec.Command("xterm", "-maximized", "-e", "newsboat"), command: exec.Command("xterm", "-maximized", "-e", "newsboat"),
}, },
commandChoice{
displayString: "w3m",
command: exec.Command("xterm", "-maximized", "-e", "w3m", "https://languagehat.com/"),
},
), ),
selected: make(map[int]struct{}), selected: make(map[int]struct{}),
} }
@ -178,11 +172,9 @@ func main() {
if logfilePath == "" { if logfilePath == "" {
logfilePath = fmt.Sprintf("/tmp/%s_breakfast.log", time.Now().Local().Format("20060102150405-0700")) logfilePath = fmt.Sprintf("/tmp/%s_breakfast.log", time.Now().Local().Format("20060102150405-0700"))
} }
f, err := tea.LogToFile(logfilePath, "DEBUG") if _, err := tea.LogToFile(logfilePath, "DEBUG"); err != nil {
if err != nil {
log.Fatal(err) log.Fatal(err)
} }
defer f.Close()
p := tea.NewProgram(initialModel()) p := tea.NewProgram(initialModel())
if err := p.Start(); err != nil { if err := p.Start(); err != nil {