summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-11-24 02:08:56 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-11-24 02:08:56 -0500
commit4297cde9a75ae43affa00d6dd5fed437b8de2a80 (patch)
treec354df8fd3dccdb8a7e30bc43337ab59ad2e546c
parentc8bcf5289f1b6c364f6f0237b1bf4ccad4e1dcd2 (diff)
Rename go module and update Go version
-rw-r--r--cmd/termpicker/main.go9
-rw-r--r--go.mod6
-rw-r--r--go.sum4
-rw-r--r--internal/picker/picker.go4
-rw-r--r--internal/slider/slider.go2
-rw-r--r--internal/switcher/switcher.go10
6 files changed, 18 insertions, 17 deletions
diff --git a/cmd/termpicker/main.go b/cmd/termpicker/main.go
index a6694d4..0ebbadb 100644
--- a/cmd/termpicker/main.go
+++ b/cmd/termpicker/main.go
@@ -4,16 +4,17 @@ import (
"log/slog"
"os"
+ "github.com/ChausseBenjamin/termpicker/internal/picker"
+ "github.com/ChausseBenjamin/termpicker/internal/slider"
+ "github.com/ChausseBenjamin/termpicker/internal/switcher"
+ "github.com/ChausseBenjamin/termpicker/internal/util"
"github.com/charmbracelet/bubbles/progress"
tea "github.com/charmbracelet/bubbletea"
- "github.com/charmbracelet/bubbletea-app-template/internal/picker"
- "github.com/charmbracelet/bubbletea-app-template/internal/slider"
- "github.com/charmbracelet/bubbletea-app-template/internal/switcher"
- "github.com/charmbracelet/bubbletea-app-template/internal/util"
"github.com/urfave/cli/v2"
)
func AppAction(ctx *cli.Context) error {
+ slog.Info("Starting Termpicker")
// RGB {{{
r := slider.New('R', 255, progress.WithGradient("#660000", "#ff0000"))
g := slider.New('G', 255, progress.WithGradient("#006600", "#00ff00"))
diff --git a/go.mod b/go.mod
index c39f083..28fb4e0 100644
--- a/go.mod
+++ b/go.mod
@@ -1,10 +1,10 @@
-module github.com/charmbracelet/bubbletea-app-template
+module github.com/ChausseBenjamin/termpicker
-go 1.19
+go 1.23.2
require (
github.com/charmbracelet/bubbles v0.20.0
- github.com/charmbracelet/bubbletea v1.2.2
+ github.com/charmbracelet/bubbletea v1.2.3
github.com/charmbracelet/lipgloss v1.0.0
github.com/urfave/cli/v2 v2.27.5
golang.design/x/clipboard v0.7.0
diff --git a/go.sum b/go.sum
index 1a27569..0f5fb25 100644
--- a/go.sum
+++ b/go.sum
@@ -3,8 +3,8 @@ github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiE
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
github.com/charmbracelet/bubbles v0.20.0 h1:jSZu6qD8cRQ6k9OMfR1WlM+ruM8fkPWkHvQWD9LIutE=
github.com/charmbracelet/bubbles v0.20.0/go.mod h1:39slydyswPy+uVOHZ5x/GjwVAFkCsV8IIVy+4MhzwwU=
-github.com/charmbracelet/bubbletea v1.2.2 h1:EMz//Ky/aFS2uLcKqpCst5UOE6z5CFDGRsUpyXz0chs=
-github.com/charmbracelet/bubbletea v1.2.2/go.mod h1:Qr6fVQw+wX7JkWWkVyXYk/ZUQ92a6XNekLXa3rR18MM=
+github.com/charmbracelet/bubbletea v1.2.3 h1:d9MdMsANIYZB5pE1KkRqaUV6GfsiWm+/9z4fTuGVm9I=
+github.com/charmbracelet/bubbletea v1.2.3/go.mod h1:Qr6fVQw+wX7JkWWkVyXYk/ZUQ92a6XNekLXa3rR18MM=
github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ=
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
github.com/charmbracelet/lipgloss v1.0.0 h1:O7VkGDvqEdGi93X+DeqsQ7PKHDgtQfF8j8/O2qFMQNg=
diff --git a/internal/picker/picker.go b/internal/picker/picker.go
index 6c0a79a..13b04a5 100644
--- a/internal/picker/picker.go
+++ b/internal/picker/picker.go
@@ -3,10 +3,10 @@ package picker
import (
"fmt"
+ "github.com/ChausseBenjamin/termpicker/internal/colors"
+ "github.com/ChausseBenjamin/termpicker/internal/slider"
"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
- "github.com/charmbracelet/bubbletea-app-template/internal/colors"
- "github.com/charmbracelet/bubbletea-app-template/internal/slider"
)
type Model struct {
diff --git a/internal/slider/slider.go b/internal/slider/slider.go
index d726e7b..884d141 100644
--- a/internal/slider/slider.go
+++ b/internal/slider/slider.go
@@ -35,7 +35,7 @@ func New(label byte, maxVal int, opts ...progress.Option) Model {
func (m Model) Title() string { return fmt.Sprintf("%c", m.label) }
func (m Model) Init() tea.Cmd {
- return nil
+ return m.progress.Init()
}
func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
diff --git a/internal/switcher/switcher.go b/internal/switcher/switcher.go
index 7ff7164..eee92df 100644
--- a/internal/switcher/switcher.go
+++ b/internal/switcher/switcher.go
@@ -3,13 +3,13 @@ package switcher
import (
"fmt"
+ "github.com/ChausseBenjamin/termpicker/internal/colors"
+ "github.com/ChausseBenjamin/termpicker/internal/picker"
+ "github.com/ChausseBenjamin/termpicker/internal/preview"
+ "github.com/ChausseBenjamin/termpicker/internal/quit"
+ "github.com/ChausseBenjamin/termpicker/internal/util"
"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
- "github.com/charmbracelet/bubbletea-app-template/internal/colors"
- "github.com/charmbracelet/bubbletea-app-template/internal/picker"
- "github.com/charmbracelet/bubbletea-app-template/internal/preview"
- "github.com/charmbracelet/bubbletea-app-template/internal/quit"
- "github.com/charmbracelet/bubbletea-app-template/internal/util"
)
type Model struct {