feat: introduce theme management and performance improvements (#7)
This commit is contained in:
24
cmd/themes.go
Normal file
24
cmd/themes.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/karol-broda/snitch/internal/theme"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var themesCmd = &cobra.Command{
|
||||
Use: "themes",
|
||||
Short: "List available themes",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Printf("Available themes (default: %s):\n\n", theme.DefaultTheme)
|
||||
for _, name := range theme.ListThemes() {
|
||||
fmt.Printf(" %s\n", name)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(themesCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user