pwsetup v0.1

This commit is contained in:
Thomas Sindt
2026-02-28 22:51:18 +01:00
parent 8b1006819d
commit 141cae646d

View File

@@ -15,14 +15,16 @@ func main() {
app := tview.NewApplication() app := tview.NewApplication()
form := tview.NewForm(). form := tview.NewForm().
AddDropDown("SampleRate: ", []string{"44100", "48000", "96000"}, 0, nil). AddDropDown("SampleRate: ", []string{"44100", "48000", "96000"}, 0, func(option string, index int){
}).
AddDropDown("Buffer : ", []string{"64", "128", "256", "512", "1024", "2048"}, 0, nil). AddDropDown("Buffer : ", []string{"64", "128", "256", "512", "1024", "2048"}, 0, nil).
AddTextView("Notes", "Set sample rate and buffersize for Pipewire", 40, 2, true, false). AddTextView("Notes", "Set sample rate and buffersize for Pipewire", 40, 2, true, false).
AddButton("Set", nil). AddButton("Set", nil).
AddButton("Quit", func() { AddButton("Quit", func() {
app.Stop() app.Stop()
}) })
form.SetBorder(true).SetTitle("Pipewire setup").SetTitleAlign(tview.AlignLeft) form.SetBorder(true).SetTitle(" Pipewire setup ").SetTitleAlign(tview.AlignLeft)
if err := app.SetRoot(form, true).EnableMouse(true).EnablePaste(true).Run(); err != nil { if err := app.SetRoot(form, true).EnableMouse(true).EnablePaste(true).Run(); err != nil {
panic(err) panic(err)
} }