Documentation ¶
Overview ¶
Package panelplugin defines the panel plugin contract.
Index ¶
- Constants
- Variables
- type Host
- type HostGRPCClient
- func (c *HostGRPCClient) AudioSinkMuteToggle(id string) error
- func (c *HostGRPCClient) AudioSinkVolumeAdjust(id string, direction eventv1.Direction) error
- func (c *HostGRPCClient) AudioSourceMuteToggle(id string) error
- func (c *HostGRPCClient) AudioSourceVolumeAdjust(id string, direction eventv1.Direction) error
- func (c *HostGRPCClient) BrightnessAdjust(devName string, direction eventv1.Direction) error
- func (c *HostGRPCClient) Exec(command string) error
- func (c *HostGRPCClient) FindApplication(query string) (*hyprpanelv1.AppInfo, error)
- func (c *HostGRPCClient) NotificationAction(id uint32, actionKey string) error
- func (c *HostGRPCClient) NotificationClosed(id uint32, reason hyprpanelv1.NotificationClosedReason) error
- func (c *HostGRPCClient) SystrayActivate(busName string, x, y int32) error
- func (c *HostGRPCClient) SystrayMenuAboutToShow(busName string, menuItemID string) error
- func (c *HostGRPCClient) SystrayMenuContextActivate(busName string, x, y int32) error
- func (c *HostGRPCClient) SystrayMenuEvent(busName string, id int32, eventID hyprpanelv1.SystrayMenuEvent, _ any, ...) error
- func (c *HostGRPCClient) SystrayScroll(busName string, delta int32, orientation hyprpanelv1.SystrayScrollOrientation) error
- func (c *HostGRPCClient) SystraySecondaryActivate(busName string, x, y int32) error
- type HostGRPCServer
- func (s *HostGRPCServer) AudioSinkMuteToggle(_ context.Context, req *hyprpanelv1.HostServiceAudioSinkMuteToggleRequest) (*hyprpanelv1.HostServiceAudioSinkMuteToggleResponse, error)
- func (s *HostGRPCServer) AudioSinkVolumeAdjust(_ context.Context, req *hyprpanelv1.HostServiceAudioSinkVolumeAdjustRequest) (*hyprpanelv1.HostServiceAudioSinkVolumeAdjustResponse, error)
- func (s *HostGRPCServer) AudioSourceMuteToggle(_ context.Context, req *hyprpanelv1.HostServiceAudioSourceMuteToggleRequest) (*hyprpanelv1.HostServiceAudioSourceMuteToggleResponse, error)
- func (s *HostGRPCServer) AudioSourceVolumeAdjust(_ context.Context, req *hyprpanelv1.HostServiceAudioSourceVolumeAdjustRequest) (*hyprpanelv1.HostServiceAudioSourceVolumeAdjustResponse, error)
- func (s *HostGRPCServer) BrightnessAdjust(_ context.Context, req *hyprpanelv1.HostServiceBrightnessAdjustRequest) (*hyprpanelv1.HostServiceBrightnessAdjustResponse, error)
- func (s *HostGRPCServer) Exec(_ context.Context, req *hyprpanelv1.HostServiceExecRequest) (*hyprpanelv1.HostServiceExecResponse, error)
- func (s *HostGRPCServer) FindApplication(_ context.Context, req *hyprpanelv1.HostServiceFindApplicationRequest) (*hyprpanelv1.HostServiceFindApplicationResponse, error)
- func (s *HostGRPCServer) NotificationAction(_ context.Context, req *hyprpanelv1.HostServiceNotificationActionRequest) (*hyprpanelv1.HostServiceNotificationActionResponse, error)
- func (s *HostGRPCServer) NotificationClosed(_ context.Context, req *hyprpanelv1.HostServiceNotificationClosedRequest) (*hyprpanelv1.HostServiceNotificationClosedResponse, error)
- func (s *HostGRPCServer) SystrayActivate(_ context.Context, req *hyprpanelv1.HostServiceSystrayActivateRequest) (*hyprpanelv1.HostServiceSystrayActivateResponse, error)
- func (s *HostGRPCServer) SystrayMenuAboutToShow(_ context.Context, req *hyprpanelv1.HostServiceSystrayMenuAboutToShowRequest) (*hyprpanelv1.HostServiceSystrayMenuAboutToShowResponse, error)
- func (s *HostGRPCServer) SystrayMenuContextActivate(_ context.Context, ...) (*hyprpanelv1.HostServiceSystrayMenuContextActivateResponse, error)
- func (s *HostGRPCServer) SystrayMenuEvent(_ context.Context, req *hyprpanelv1.HostServiceSystrayMenuEventRequest) (*hyprpanelv1.HostServiceSystrayMenuEventResponse, error)
- func (s *HostGRPCServer) SystrayScroll(_ context.Context, req *hyprpanelv1.HostServiceSystrayScrollRequest) (*hyprpanelv1.HostServiceSystrayScrollResponse, error)
- func (s *HostGRPCServer) SystraySecondaryActivate(_ context.Context, req *hyprpanelv1.HostServiceSystraySecondaryActivateRequest) (*hyprpanelv1.HostServiceSystraySecondaryActivateResponse, error)
- type Panel
- type PanelGRPCClient
- type PanelGRPCServer
- func (s *PanelGRPCServer) Close(_ context.Context, _ *hyprpanelv1.PanelServiceCloseRequest) (*hyprpanelv1.PanelServiceCloseResponse, error)
- func (s *PanelGRPCServer) Init(_ context.Context, req *hyprpanelv1.PanelServiceInitRequest) (*hyprpanelv1.PanelServiceInitResponse, error)
- func (s *PanelGRPCServer) Notify(_ context.Context, req *hyprpanelv1.PanelServiceNotifyRequest) (*hyprpanelv1.PanelServiceNotifyResponse, error)
- type PanelPlugin
Constants ¶
const (
// PanelPluginName constant.
PanelPluginName = `panel`
)
Variables ¶
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: `hyprpanel`,
MagicCookieValue: `panel`,
}
Handshake default parameters.
var PluginMap = map[string]plugin.Plugin{ PanelPluginName: &PanelPlugin{}, }
PluginMap default parameters.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host interface { Exec(command string) error FindApplication(query string) (*hyprpanelv1.AppInfo, error) SystrayActivate(busName string, x, y int32) error SystraySecondaryActivate(busName string, x, y int32) error SystrayScroll(busName string, delta int32, orientation hyprpanelv1.SystrayScrollOrientation) error SystrayMenuContextActivate(busName string, x, y int32) error SystrayMenuAboutToShow(busName string, menuItemID string) error SystrayMenuEvent(busName string, id int32, eventID hyprpanelv1.SystrayMenuEvent, data any, timestamp time.Time) error NotificationClosed(id uint32, reason hyprpanelv1.NotificationClosedReason) error NotificationAction(id uint32, actionKey string) error AudioSinkVolumeAdjust(id string, direction eventv1.Direction) error AudioSinkMuteToggle(id string) error AudioSourceVolumeAdjust(id string, direction eventv1.Direction) error AudioSourceMuteToggle(id string) error BrightnessAdjust(devName string, direction eventv1.Direction) error }
Host interface.
type HostGRPCClient ¶
type HostGRPCClient struct {
// contains filtered or unexported fields
}
HostGRPCClient plugin host client implementation.
func (*HostGRPCClient) AudioSinkMuteToggle ¶
func (c *HostGRPCClient) AudioSinkMuteToggle(id string) error
AudioSinkMuteToggle implementation.
func (*HostGRPCClient) AudioSinkVolumeAdjust ¶
func (c *HostGRPCClient) AudioSinkVolumeAdjust(id string, direction eventv1.Direction) error
AudioSinkVolumeAdjust implementation.
func (*HostGRPCClient) AudioSourceMuteToggle ¶
func (c *HostGRPCClient) AudioSourceMuteToggle(id string) error
AudioSourceMuteToggle implementation.
func (*HostGRPCClient) AudioSourceVolumeAdjust ¶
func (c *HostGRPCClient) AudioSourceVolumeAdjust(id string, direction eventv1.Direction) error
AudioSourceVolumeAdjust implementation.
func (*HostGRPCClient) BrightnessAdjust ¶
func (c *HostGRPCClient) BrightnessAdjust(devName string, direction eventv1.Direction) error
BrightnessAdjust implementation.
func (*HostGRPCClient) Exec ¶
func (c *HostGRPCClient) Exec(command string) error
Exec implmenetation.
func (*HostGRPCClient) FindApplication ¶
func (c *HostGRPCClient) FindApplication(query string) (*hyprpanelv1.AppInfo, error)
FindApplication implementation.
func (*HostGRPCClient) NotificationAction ¶
func (c *HostGRPCClient) NotificationAction(id uint32, actionKey string) error
NotificationAction implementation.
func (*HostGRPCClient) NotificationClosed ¶
func (c *HostGRPCClient) NotificationClosed(id uint32, reason hyprpanelv1.NotificationClosedReason) error
NotificationClosed implementation.
func (*HostGRPCClient) SystrayActivate ¶
func (c *HostGRPCClient) SystrayActivate(busName string, x, y int32) error
SystrayActivate implementation.
func (*HostGRPCClient) SystrayMenuAboutToShow ¶
func (c *HostGRPCClient) SystrayMenuAboutToShow(busName string, menuItemID string) error
SystrayMenuAboutToShow implementation.
func (*HostGRPCClient) SystrayMenuContextActivate ¶
func (c *HostGRPCClient) SystrayMenuContextActivate(busName string, x, y int32) error
SystrayMenuContextActivate implementation.
func (*HostGRPCClient) SystrayMenuEvent ¶
func (c *HostGRPCClient) SystrayMenuEvent(busName string, id int32, eventID hyprpanelv1.SystrayMenuEvent, _ any, timestamp time.Time) error
SystrayMenuEvent implementation.
func (*HostGRPCClient) SystrayScroll ¶
func (c *HostGRPCClient) SystrayScroll(busName string, delta int32, orientation hyprpanelv1.SystrayScrollOrientation) error
SystrayScroll implementation.
func (*HostGRPCClient) SystraySecondaryActivate ¶
func (c *HostGRPCClient) SystraySecondaryActivate(busName string, x, y int32) error
SystraySecondaryActivate implmenetation.
type HostGRPCServer ¶
type HostGRPCServer struct { hyprpanelv1.UnimplementedHostServiceServer Impl Host }
HostGRPCServer plugin host implementation.
func (*HostGRPCServer) AudioSinkMuteToggle ¶
func (s *HostGRPCServer) AudioSinkMuteToggle(_ context.Context, req *hyprpanelv1.HostServiceAudioSinkMuteToggleRequest) (*hyprpanelv1.HostServiceAudioSinkMuteToggleResponse, error)
AudioSinkMuteToggle implementation.
func (*HostGRPCServer) AudioSinkVolumeAdjust ¶
func (s *HostGRPCServer) AudioSinkVolumeAdjust(_ context.Context, req *hyprpanelv1.HostServiceAudioSinkVolumeAdjustRequest) (*hyprpanelv1.HostServiceAudioSinkVolumeAdjustResponse, error)
AudioSinkVolumeAdjust implementation.
func (*HostGRPCServer) AudioSourceMuteToggle ¶
func (s *HostGRPCServer) AudioSourceMuteToggle(_ context.Context, req *hyprpanelv1.HostServiceAudioSourceMuteToggleRequest) (*hyprpanelv1.HostServiceAudioSourceMuteToggleResponse, error)
AudioSourceMuteToggle implmenetation.
func (*HostGRPCServer) AudioSourceVolumeAdjust ¶
func (s *HostGRPCServer) AudioSourceVolumeAdjust(_ context.Context, req *hyprpanelv1.HostServiceAudioSourceVolumeAdjustRequest) (*hyprpanelv1.HostServiceAudioSourceVolumeAdjustResponse, error)
AudioSourceVolumeAdjust implementation.
func (*HostGRPCServer) BrightnessAdjust ¶
func (s *HostGRPCServer) BrightnessAdjust(_ context.Context, req *hyprpanelv1.HostServiceBrightnessAdjustRequest) (*hyprpanelv1.HostServiceBrightnessAdjustResponse, error)
BrightnessAdjust implementation.
func (*HostGRPCServer) Exec ¶
func (s *HostGRPCServer) Exec(_ context.Context, req *hyprpanelv1.HostServiceExecRequest) (*hyprpanelv1.HostServiceExecResponse, error)
Exec implementation.
func (*HostGRPCServer) FindApplication ¶
func (s *HostGRPCServer) FindApplication(_ context.Context, req *hyprpanelv1.HostServiceFindApplicationRequest) (*hyprpanelv1.HostServiceFindApplicationResponse, error)
FindApplication implementation.
func (*HostGRPCServer) NotificationAction ¶
func (s *HostGRPCServer) NotificationAction(_ context.Context, req *hyprpanelv1.HostServiceNotificationActionRequest) (*hyprpanelv1.HostServiceNotificationActionResponse, error)
NotificationAction implementation.
func (*HostGRPCServer) NotificationClosed ¶
func (s *HostGRPCServer) NotificationClosed(_ context.Context, req *hyprpanelv1.HostServiceNotificationClosedRequest) (*hyprpanelv1.HostServiceNotificationClosedResponse, error)
NotificationClosed implementation.
func (*HostGRPCServer) SystrayActivate ¶
func (s *HostGRPCServer) SystrayActivate(_ context.Context, req *hyprpanelv1.HostServiceSystrayActivateRequest) (*hyprpanelv1.HostServiceSystrayActivateResponse, error)
SystrayActivate implementation.
func (*HostGRPCServer) SystrayMenuAboutToShow ¶
func (s *HostGRPCServer) SystrayMenuAboutToShow(_ context.Context, req *hyprpanelv1.HostServiceSystrayMenuAboutToShowRequest) (*hyprpanelv1.HostServiceSystrayMenuAboutToShowResponse, error)
SystrayMenuAboutToShow implementation.
func (*HostGRPCServer) SystrayMenuContextActivate ¶
func (s *HostGRPCServer) SystrayMenuContextActivate(_ context.Context, req *hyprpanelv1.HostServiceSystrayMenuContextActivateRequest) (*hyprpanelv1.HostServiceSystrayMenuContextActivateResponse, error)
SystrayMenuContextActivate implementation.
func (*HostGRPCServer) SystrayMenuEvent ¶
func (s *HostGRPCServer) SystrayMenuEvent(_ context.Context, req *hyprpanelv1.HostServiceSystrayMenuEventRequest) (*hyprpanelv1.HostServiceSystrayMenuEventResponse, error)
SystrayMenuEvent implementation.
func (*HostGRPCServer) SystrayScroll ¶
func (s *HostGRPCServer) SystrayScroll(_ context.Context, req *hyprpanelv1.HostServiceSystrayScrollRequest) (*hyprpanelv1.HostServiceSystrayScrollResponse, error)
SystrayScroll implementation.
func (*HostGRPCServer) SystraySecondaryActivate ¶
func (s *HostGRPCServer) SystraySecondaryActivate(_ context.Context, req *hyprpanelv1.HostServiceSystraySecondaryActivateRequest) (*hyprpanelv1.HostServiceSystraySecondaryActivateResponse, error)
SystraySecondaryActivate implementation.
type Panel ¶
type Panel interface { Init(host Host, id string, loglevel configv1.LogLevel, config *configv1.Panel, stylesheet []byte) error Notify(evt *eventv1.Event) Context() context.Context Close() }
Panel interface.
type PanelGRPCClient ¶
type PanelGRPCClient struct {
// contains filtered or unexported fields
}
PanelGRPCClient panel plugin client implementation.
func (*PanelGRPCClient) Context ¶
func (c *PanelGRPCClient) Context() context.Context
Context implementation.
func (*PanelGRPCClient) Init ¶
func (c *PanelGRPCClient) Init(h Host, id string, loglevel configv1.LogLevel, config *configv1.Panel, stylesheet []byte) error
Init implementation.
func (*PanelGRPCClient) Notify ¶
func (c *PanelGRPCClient) Notify(evt *eventv1.Event)
Notify implementation.
type PanelGRPCServer ¶
type PanelGRPCServer struct { hyprpanelv1.UnimplementedPanelServiceServer Impl Panel // contains filtered or unexported fields }
PanelGRPCServer panel plugin server implementation.
func (*PanelGRPCServer) Close ¶
func (s *PanelGRPCServer) Close(_ context.Context, _ *hyprpanelv1.PanelServiceCloseRequest) (*hyprpanelv1.PanelServiceCloseResponse, error)
Close implmenetation.
func (*PanelGRPCServer) Init ¶
func (s *PanelGRPCServer) Init(_ context.Context, req *hyprpanelv1.PanelServiceInitRequest) (*hyprpanelv1.PanelServiceInitResponse, error)
Init implementation.
func (*PanelGRPCServer) Notify ¶
func (s *PanelGRPCServer) Notify(_ context.Context, req *hyprpanelv1.PanelServiceNotifyRequest) (*hyprpanelv1.PanelServiceNotifyResponse, error)
Notify implementation.
type PanelPlugin ¶
type PanelPlugin struct { plugin.NetRPCUnsupportedPlugin Impl Panel }
PanelPlugin definition.
func (*PanelPlugin) GRPCClient ¶
func (p *PanelPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient satsifise the plugin interface.
func (*PanelPlugin) GRPCServer ¶
func (p *PanelPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
GRPCServer satisfies the plugin interface.