Files
panic-cli/internal/platform/personal_rig.go
2025-12-08 20:01:59 -07:00

33 lines
557 B
Go

package platform
import (
"fmt"
"github.com/Alatec/go-openrgb"
)
var _ StudioController = (*PersonalRig)(nil)
type PersonalRig struct {
LinuxKDE
}
func (p *PersonalRig) ApplyStudioPreset(persona string) error {
client := openrgb.NewOpenRGBClient()
client.Connect("localhost:6742")
defer client.Disconnect()
profiles, err := client.ListProfiles()
if err != nil {
return err
}
for _, profile := range profiles {
if profile == persona {
return client.LoadProfile(profile)
}
}
return fmt.Errorf("profile '%s' not found", persona)
}