You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

proxy-git.cwkhome.fun/mt-inside/go-openrgb

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-git.cwkhome.fun/mt-inside/go-openrgb

v0.0.1-alpha.1
Go
Version published
Created
Source

go-openrgb

Golang SDK for OpenRGB

Checks GitHub Issues

Go Reference

Uses the lm-sensors (linux monitoring sensors) pacakge, on top of the hwmon kernel feature.

Setup

  • Install and Configure OpenRGB
  • Run OpenRGB and start its network server (from the GUI, or openrgb --server)
  • go get github.com/mt-inside/go-openrgb

How it works

This module calls OpenRGB over the network.

Example

Code

package main

import (
	"os"

	"github.com/lucasb-eyer/go-colorful"
	"github.com/mt-inside/go-openrgb/pkg/model"
	"github.com/mt-inside/go-usvc"
)

func main() {
	log := usvc.GetLogger(false, 10)

	m, err := model.NewModel(log, "localhost:6742", "go-openrgb basic example")
	if err != nil {
		log.Error(err, "Couldn't synchronise devices and colors from server")
		os.Exit(1)
	}

	m.SetColor(colorful.Color{R: 1, G: 0, B: 0})
	m.Devices.MustByName("B550 Vision D").MustGetDirectModeAndActivate().SetColor(colorful.Color{R: 0, G: 1, B: 0})
	m.Devices.MustByName("B550 Vision D").MustGetDirectModeAndActivate().Zones.MustByName("D_LED1 Bottom").SetColor(colorful.Color{R: 0, G: 0, B: 1})
	m.Devices.MustByName("B550 Vision D").MustGetDirectModeAndActivate().Zones.MustByName("D_LED1 Bottom").Leds[0].SetColor(colorful.Color{R: 1, G: 1, B: 1})

	m.Diff()

	err = m.Thither()
	if err != nil {
		log.Error(err, "Couldn't synchronise colors to server")
		os.Exit(1)
	}
}

Contributing

PRs welcome!

Reaching me

  • Raise an issue or PR here
  • Discord: mt_inside#8886
  • Twitter: @mt165

FAQs

Package last updated on 07 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.