Documentation
¶
Index ¶
- func GetDirectories(router *event.MessageRouter) []filesystem.DirectoryInfo
- func Hibernate() error
- func Lock() error
- func Logout() error
- func NotificationEventResponse(e notification.Event) event.MessageResponse
- func RegisterAudioControlHandler(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterBluetoothHandlers(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterCameraHandlers(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterClipboardHandlers(router *event.MessageRouter)
- func RegisterCommandAllowlistHandlers(router *event.MessageRouter)
- func RegisterCommandExecuteHandler(router *event.MessageRouter)
- func RegisterDesktopHandlers(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterDiscordControlHandler(router *event.MessageRouter)
- func RegisterDisplayControlHandler(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterExitApplicationHandler(router *event.MessageRouter)
- func RegisterGetCommandPrefabsHandler(router *event.MessageRouter)
- func RegisterGetDataHandler(router *event.MessageRouter)
- func RegisterGetDiagnosticsHandler(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterGetDirectoriesHandler(router *event.MessageRouter)
- func RegisterGetDirectoryHandler(router *event.MessageRouter)
- func RegisterGetDiscordSetupHandler(router *event.MessageRouter)
- func RegisterGetDiskMountsHandler(router *event.MessageRouter)
- func RegisterGetFileHandler(router *event.MessageRouter)
- func RegisterGetFilesHandler(router *event.MessageRouter)
- func RegisterGetHistoryHandler(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterGetSettingsHandler(router *event.MessageRouter)
- func RegisterHandlers(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterHyprlandHandlers(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterKeyboardKeypressHandler(router *event.MessageRouter)
- func RegisterKeyboardTextHandler(router *event.MessageRouter)
- func RegisterMediaControlHandler(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterNotificationHandler(router *event.MessageRouter)
- func RegisterOmarchyHandlers(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterOpenHandler(router *event.MessageRouter)
- func RegisterPowerHibernateHandler(router *event.MessageRouter)
- func RegisterPowerLockHandler(router *event.MessageRouter)
- func RegisterPowerLogoutHandler(router *event.MessageRouter)
- func RegisterPowerRestartHandler(router *event.MessageRouter)
- func RegisterPowerShutdownHandler(router *event.MessageRouter)
- func RegisterPowerSleepHandler(router *event.MessageRouter)
- func RegisterProcessHandlers(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterRegisterDataListenerHandler(router *event.MessageRouter)
- func RegisterSystemHandlers(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterUnregisterDataListenerHandler(router *event.MessageRouter)
- func RegisterUpdateDiscordSetupHandler(router *event.MessageRouter)
- func RegisterUpdateSettingsHandler(router *event.MessageRouter, dataStore *data.DataStore)
- func RegisterValidateDirectoryHandler(router *event.MessageRouter)
- func Restart() error
- func Sleep() error
- type AudioControlRequestData
- type BluetoothDeviceRequestData
- type BluetoothPowerRequestData
- type CameraCaptureRequestData
- type CameraControlRequestData
- type ClipboardTextRequestData
- type DesktopKeyboardLayoutRequestData
- type DesktopWindowRequestData
- type DesktopWindowStateRequestData
- type DesktopWorkspaceRequestData
- type DiscordControlRequestData
- type DiscordSetupRequestData
- type DisplayControlRequestData
- type GetDataRequestData
- type GetDataResponseData
- type GetDirectoriesResponseDataItem
- type GetDirectoryRequestData
- type GetFileRequestData
- type GetFileResponseData
- type GetFilesRequestData
- type GetFilesResponseData
- type GetHistoryRequestData
- type GetSettingsResponseData
- type HyprlandDispatchRawRequestData
- type HyprlandDispatchRequestData
- type HyprlandEvalRequestData
- type HyprlandExecRequestData
- type HyprlandGlobalShortcutRequestData
- type HyprlandMoveCursorRequestData
- type HyprlandMoveWindowRequestData
- type HyprlandMoveWorkspaceRequestData
- type HyprlandOptionNameRequestData
- type HyprlandOptionRequestData
- type HyprlandRenameWorkspaceRequestData
- type HyprlandSendEventRequestData
- type HyprlandSetWindowRequestData
- type HyprlandSubmapRequestData
- type KeyboardTextRequestData
- type MediaControlRequestData
- type NotificationDismissRequestData
- type NotificationEventData
- type NotificationPressRequestData
- type OmarchyRequestData
- type OpenRequestData
- type ProcessKillRequestData
- type RegisterDataListenerRequestData
- type SystemKeepAwakeRequestData
- type SystemPowerProfileRequestData
- type UpdateSettingsRequestData
- type UpdateSettingsResponseData
- type ValidateDirectoryRequestData
- type ValidateDirectoryResponseData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDirectories ¶
func GetDirectories(router *event.MessageRouter) []filesystem.DirectoryInfo
func NotificationEventResponse ¶
func NotificationEventResponse(e notification.Event) event.MessageResponse
NotificationEventResponse is the message sent to clients when a notification is sent, clicked or closes. A sent one has the type NOTIFICATION_SENT, like the sender's reply, but the id system.
func RegisterAudioControlHandler ¶
func RegisterAudioControlHandler(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterBluetoothHandlers ¶
func RegisterBluetoothHandlers(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterCameraHandlers ¶
func RegisterCameraHandlers(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterClipboardHandlers ¶
func RegisterClipboardHandlers(router *event.MessageRouter)
func RegisterCommandAllowlistHandlers ¶
func RegisterCommandAllowlistHandlers(router *event.MessageRouter)
RegisterCommandAllowlistHandlers adds, changes and removes one command at a time, rather than replacing the whole allowlist as UPDATE_SETTINGS does
func RegisterCommandExecuteHandler ¶
func RegisterCommandExecuteHandler(router *event.MessageRouter)
func RegisterDesktopHandlers ¶
func RegisterDesktopHandlers(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterDiscordControlHandler ¶
func RegisterDiscordControlHandler(router *event.MessageRouter)
func RegisterDisplayControlHandler ¶
func RegisterDisplayControlHandler(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterExitApplicationHandler ¶
func RegisterExitApplicationHandler(router *event.MessageRouter)
func RegisterGetCommandPrefabsHandler ¶
func RegisterGetCommandPrefabsHandler(router *event.MessageRouter)
func RegisterGetDataHandler ¶
func RegisterGetDataHandler(router *event.MessageRouter)
func RegisterGetDiagnosticsHandler ¶
func RegisterGetDiagnosticsHandler(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterGetDirectoriesHandler ¶
func RegisterGetDirectoriesHandler(router *event.MessageRouter)
func RegisterGetDirectoryHandler ¶
func RegisterGetDirectoryHandler(router *event.MessageRouter)
func RegisterGetDiscordSetupHandler ¶
func RegisterGetDiscordSetupHandler(router *event.MessageRouter)
RegisterGetDiscordSetupHandler reports how far Discord is set up. The client secret is never sent back.
func RegisterGetDiskMountsHandler ¶
func RegisterGetDiskMountsHandler(router *event.MessageRouter)
func RegisterGetFileHandler ¶
func RegisterGetFileHandler(router *event.MessageRouter)
func RegisterGetFilesHandler ¶
func RegisterGetFilesHandler(router *event.MessageRouter)
func RegisterGetHistoryHandler ¶
func RegisterGetHistoryHandler(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterGetSettingsHandler ¶
func RegisterGetSettingsHandler(router *event.MessageRouter)
func RegisterHandlers ¶
func RegisterHandlers(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterHyprlandHandlers ¶
func RegisterHyprlandHandlers(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterKeyboardKeypressHandler ¶
func RegisterKeyboardKeypressHandler(router *event.MessageRouter)
func RegisterKeyboardTextHandler ¶
func RegisterKeyboardTextHandler(router *event.MessageRouter)
func RegisterMediaControlHandler ¶
func RegisterMediaControlHandler(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterNotificationHandler ¶
func RegisterNotificationHandler(router *event.MessageRouter)
func RegisterOmarchyHandlers ¶
func RegisterOmarchyHandlers(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterOpenHandler ¶
func RegisterOpenHandler(router *event.MessageRouter)
func RegisterPowerHibernateHandler ¶
func RegisterPowerHibernateHandler(router *event.MessageRouter)
func RegisterPowerLockHandler ¶
func RegisterPowerLockHandler(router *event.MessageRouter)
func RegisterPowerLogoutHandler ¶
func RegisterPowerLogoutHandler(router *event.MessageRouter)
func RegisterPowerRestartHandler ¶
func RegisterPowerRestartHandler(router *event.MessageRouter)
func RegisterPowerShutdownHandler ¶
func RegisterPowerShutdownHandler(router *event.MessageRouter)
func RegisterPowerSleepHandler ¶
func RegisterPowerSleepHandler(router *event.MessageRouter)
func RegisterProcessHandlers ¶
func RegisterProcessHandlers(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterRegisterDataListenerHandler ¶
func RegisterRegisterDataListenerHandler(router *event.MessageRouter)
func RegisterSystemHandlers ¶
func RegisterSystemHandlers(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterUnregisterDataListenerHandler ¶
func RegisterUnregisterDataListenerHandler(router *event.MessageRouter)
func RegisterUpdateDiscordSetupHandler ¶
func RegisterUpdateDiscordSetupHandler(router *event.MessageRouter)
RegisterUpdateDiscordSetupHandler saves the Discord application to authorize as, then connects to Discord.
func RegisterUpdateSettingsHandler ¶
func RegisterUpdateSettingsHandler(router *event.MessageRouter, dataStore *data.DataStore)
func RegisterValidateDirectoryHandler ¶
func RegisterValidateDirectoryHandler(router *event.MessageRouter)
Types ¶
type AudioControlRequestData ¶
type AudioControlRequestData struct {
// An output's, input's or app's id from the audio module
ID string `json:"id" mapstructure:"id"`
Volume *float64 `json:"volume" mapstructure:"volume"`
Muted *bool `json:"muted" mapstructure:"muted"`
Default bool `json:"default" mapstructure:"default"`
// An output's id, to move an app to it
Output string `json:"output,omitempty" mapstructure:"output"`
}
type BluetoothDeviceRequestData ¶
type BluetoothDeviceRequestData struct {
Address string `json:"address" mapstructure:"address"`
}
type BluetoothPowerRequestData ¶
type BluetoothPowerRequestData struct {
Powered *bool `json:"powered" mapstructure:"powered"`
}
type ClipboardTextRequestData ¶
type ClipboardTextRequestData struct {
Text string `json:"text" mapstructure:"text"`
}
type DesktopKeyboardLayoutRequestData ¶
type DesktopKeyboardLayoutRequestData struct {
Layout string `json:"layout" mapstructure:"layout"`
}
type DesktopWindowRequestData ¶
type DesktopWindowRequestData struct {
ID string `json:"id" mapstructure:"id"`
}
type DesktopWorkspaceRequestData ¶
type DesktopWorkspaceRequestData struct {
ID string `json:"id" mapstructure:"id"`
}
type DiscordControlRequestData ¶
type DiscordControlRequestData struct {
Action string `json:"action" mapstructure:"action"`
ChannelID string `json:"channel_id" mapstructure:"channel_id"`
UserID string `json:"user_id" mapstructure:"user_id"`
SoundID string `json:"sound_id" mapstructure:"sound_id"`
Value *float64 `json:"value" mapstructure:"value"`
DeviceID string `json:"device_id" mapstructure:"device_id"`
Mode string `json:"mode" mapstructure:"mode"`
}
type DiscordSetupRequestData ¶
type GetDataRequestData ¶
type GetDataRequestData struct {
Modules []types.ModuleName `json:"modules" mapstructure:"modules"`
}
type GetDataResponseData ¶
type GetDataResponseData = any
type GetDirectoriesResponseDataItem ¶
type GetDirectoriesResponseDataItem struct {
Key string `json:"key" mapstructure:"key"`
Name string `json:"name" mapstructure:"name"`
Path string `json:"path" mapstructure:"path"`
Description string `json:"description,omitempty" mapstructure:"description,omitempty"`
}
GetDirectoriesResponseDataItem represents a directory item in the response
func GetDirectory ¶
func GetDirectory(router *event.MessageRouter, baseDirectoryKey string) *GetDirectoriesResponseDataItem
type GetDirectoryRequestData ¶
type GetDirectoryRequestData struct {
BaseDirectory string `json:"base" mapstructure:"base"`
}
type GetFileRequestData ¶
type GetFileRequestData struct {
Path string `json:"path" mapstructure:"path"`
}
type GetFileResponseData ¶
type GetFileResponseData struct {
Name string `json:"name" mapstructure:"name"`
Path string `json:"path" mapstructure:"path"`
Size int64 `json:"size" mapstructure:"size"`
IsDirectory bool `json:"isDirectory" mapstructure:"isDirectory"`
ModTime time.Time `json:"modTime" mapstructure:"modTime"`
Permissions string `json:"permissions" mapstructure:"permissions"`
ContentType string `json:"contentType,omitempty" mapstructure:"contentType,omitempty"`
Extension string `json:"extension,omitempty" mapstructure:"extension,omitempty"`
}
GetFileResponseData represents information about a file
func GetFileInfo ¶
func GetFileInfo(basePath string, fileName string) *GetFileResponseData
GetFileInfo returns detailed information about a file
func GetFiles ¶
func GetFiles(path string) []GetFileResponseData
type GetFilesRequestData ¶
type GetFilesResponseData ¶
type GetFilesResponseData = []GetFileResponseData
type GetHistoryRequestData ¶
type GetHistoryRequestData struct {
// Since limits the history to readings taken after this time, in Unix
// milliseconds. Zero or missing returns it all.
Since int64 `json:"since" mapstructure:"since"`
// Modules limits the history to these modules' readings. Empty or
// missing returns every module's.
Modules []types.ModuleName `json:"modules" mapstructure:"modules"`
}
type GetSettingsResponseData ¶
type HyprlandDispatchRawRequestData ¶
type HyprlandDispatchRawRequestData struct {
Dispatch string `json:"dispatch" mapstructure:"dispatch"` // In the running config's language
}
type HyprlandDispatchRequestData ¶
type HyprlandDispatchRequestData struct {
Dispatcher types.HyprlandDispatcher `json:"dispatcher" mapstructure:"dispatcher"`
Direction types.HyprlandDirection `json:"direction" mapstructure:"direction"`
ID string `json:"id" mapstructure:"id"` // A window to focus first
}
type HyprlandEvalRequestData ¶
type HyprlandEvalRequestData struct {
Code string `json:"code" mapstructure:"code"`
}
type HyprlandExecRequestData ¶
type HyprlandExecRequestData struct {
Command string `json:"command" mapstructure:"command"`
}
type HyprlandGlobalShortcutRequestData ¶
type HyprlandGlobalShortcutRequestData struct {
Name string `json:"name" mapstructure:"name"`
}
type HyprlandOptionNameRequestData ¶
type HyprlandOptionNameRequestData struct {
Name string `json:"name" mapstructure:"name"`
}
type HyprlandSendEventRequestData ¶
type HyprlandSendEventRequestData struct {
Name string `json:"name" mapstructure:"name"`
}
type HyprlandSetWindowRequestData ¶
type HyprlandSetWindowRequestData struct {
ID string `json:"id" mapstructure:"id"`
Floating *bool `json:"floating" mapstructure:"floating"`
Pinned *bool `json:"pinned" mapstructure:"pinned"`
X *int `json:"x" mapstructure:"x"`
Y *int `json:"y" mapstructure:"y"`
Width *int `json:"width" mapstructure:"width"`
Height *int `json:"height" mapstructure:"height"`
}
type HyprlandSubmapRequestData ¶
type HyprlandSubmapRequestData struct {
Name string `json:"name" mapstructure:"name"`
}
type KeyboardTextRequestData ¶
type MediaControlRequestData ¶
type MediaControlRequestData struct {
Action string `json:"action" mapstructure:"action"`
// A player's id from the media module's players. Leave it out for the
// player the module reports.
Player string `json:"player,omitempty" mapstructure:"player"`
Position *float64 `json:"position,omitempty" mapstructure:"position"` // Seconds, for SEEK
Volume *float64 `json:"volume,omitempty" mapstructure:"volume"` // 0 to 1, for SET_VOLUME
Shuffle *bool `json:"shuffle,omitempty" mapstructure:"shuffle"` // For SET_SHUFFLE
Repeat string `json:"repeat,omitempty" mapstructure:"repeat"` // NONE, TRACK or LIST, for SET_REPEAT
}
type NotificationDismissRequestData ¶
type NotificationDismissRequestData struct {
// The id NOTIFICATION_SENT replied with
ID uint32 `json:"id" mapstructure:"id"`
}
type NotificationEventData ¶
type NotificationEventData struct {
ID uint32 `json:"id"`
// What was sent, when it was sent
Title string `json:"title,omitempty"`
Message string `json:"message,omitempty"`
Buttons []notification.NotificationButton `json:"buttons,omitempty"`
// The button's id, or default for the notification itself
Action string `json:"action,omitempty"`
// expired, dismissed or closed
Reason string `json:"reason,omitempty"`
}
NotificationEventData is sent to every client when a notification System Bridge sent is sent, clicked or closes
type OmarchyRequestData ¶
type OmarchyRequestData struct {
ID string `json:"id" mapstructure:"id"`
Action types.OmarchyAction `json:"action" mapstructure:"action"`
}
type OpenRequestData ¶
type ProcessKillRequestData ¶
type RegisterDataListenerRequestData ¶
type RegisterDataListenerRequestData struct {
Modules []types.ModuleName `json:"modules" mapstructure:"modules"`
}
type SystemPowerProfileRequestData ¶
type SystemPowerProfileRequestData struct {
// One of the system module's power_profiles, such as balanced
Profile string `json:"profile" mapstructure:"profile"`
}
type ValidateDirectoryRequestData ¶
type ValidateDirectoryRequestData struct {
Path string `json:"path" mapstructure:"path"`
}
type ValidateDirectoryResponseData ¶
type ValidateDirectoryResponseData struct {
Valid bool `json:"valid" mapstructure:"valid"`
}
Source Files
¶
- action.go
- audio-control.go
- bluetooth.go
- cameras.go
- clipboard.go
- command-allowlist.go
- command-execute.go
- desktop.go
- discord-control.go
- discord-setup.go
- display-control.go
- exit-application.go
- file_info.go
- frontend.go
- get-command-prefabs.go
- get-data.go
- get-diagnostics.go
- get-directories.go
- get-directory.go
- get-disk-mounts.go
- get-file.go
- get-files.go
- get-history.go
- get-settings.go
- handler.go
- keyboard-keypress.go
- keyboard-text.go
- media-control.go
- notification.go
- open.go
- power-hibernate.go
- power-lock.go
- power-logout.go
- power-restart.go
- power-shutdown.go
- power-sleep.go
- process.go
- register-data-listener.go
- system.go
- types.go
- unregister-data-listener.go
- update-settings.go
- validate-directory.go