providers

package
v0.0.0-...-3d35af2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TitleRegex         = "#+!"
	HideComment        = "[hidden]"
	CommentBindPattern = "#/#"
)
View Source
const (
	SwayTitleRegex  = "#+!"
	SwayHideComment = "[hidden]"
)
View Source
const (
	MangoWCHideComment = "[hidden]"
)

Variables

View Source
var MangoWCModSeparators = []rune{'+', ' '}
View Source
var ModSeparators = []rune{'+', ' '}
View Source
var SwayModSeparators = []rune{'+', ' '}

Functions

This section is empty.

Types

type DMSBindsStatusInfo

type DMSBindsStatusInfo struct {
	Exists          bool
	Included        bool
	IncludePosition int
	TotalIncludes   int
	BindsAfterDMS   int
	Effective       bool
	OverriddenBy    int
	StatusMessage   string
}

type HyprlandDMSStatus

type HyprlandDMSStatus struct {
	Exists          bool
	Included        bool
	IncludePosition int
	TotalIncludes   int
	BindsAfterDMS   int
	Effective       bool
	OverriddenBy    int
	StatusMessage   string
}

type HyprlandKeyBinding

type HyprlandKeyBinding struct {
	Mods       []string `json:"mods"`
	Key        string   `json:"key"`
	Dispatcher string   `json:"dispatcher"`
	Params     string   `json:"params"`
	Comment    string   `json:"comment"`
	Source     string   `json:"source"`
	Flags      string   `json:"flags"` // Bind flags: l=locked, r=release, e=repeat, n=non-consuming, m=mouse, t=transparent, i=ignore-mods, s=separate, d=description, o=long-press
}

type HyprlandParseResult

type HyprlandParseResult struct {
	Section            *HyprlandSection
	DMSBindsIncluded   bool
	DMSStatus          *HyprlandDMSStatus
	ConflictingConfigs map[string]*HyprlandKeyBinding
}

func ParseHyprlandKeysWithDMS

func ParseHyprlandKeysWithDMS(path string) (*HyprlandParseResult, error)

type HyprlandParser

type HyprlandParser struct {
	// contains filtered or unexported fields
}

func NewHyprlandParser

func NewHyprlandParser(configDir string) *HyprlandParser

func (*HyprlandParser) ParseKeys

func (p *HyprlandParser) ParseKeys() *HyprlandSection

func (*HyprlandParser) ParseWithDMS

func (p *HyprlandParser) ParseWithDMS() (*HyprlandSection, error)

func (*HyprlandParser) ReadContent

func (p *HyprlandParser) ReadContent(directory string) error

type HyprlandProvider

type HyprlandProvider struct {
	// contains filtered or unexported fields
}

func NewHyprlandProvider

func NewHyprlandProvider(configPath string) *HyprlandProvider

func (*HyprlandProvider) GetCheatSheet

func (h *HyprlandProvider) GetCheatSheet() (*keybinds.CheatSheet, error)

func (*HyprlandProvider) GetOverridePath

func (h *HyprlandProvider) GetOverridePath() string

func (*HyprlandProvider) HasDMSBindsIncluded

func (h *HyprlandProvider) HasDMSBindsIncluded() bool

func (*HyprlandProvider) Name

func (h *HyprlandProvider) Name() string

func (*HyprlandProvider) RemoveBind

func (h *HyprlandProvider) RemoveBind(key string) error

func (*HyprlandProvider) SetBind

func (h *HyprlandProvider) SetBind(key, action, description string, options map[string]any) error

type HyprlandSection

type HyprlandSection struct {
	Children []HyprlandSection    `json:"children"`
	Keybinds []HyprlandKeyBinding `json:"keybinds"`
	Name     string               `json:"name"`
}

func ParseHyprlandKeys

func ParseHyprlandKeys(path string) (*HyprlandSection, error)

type JSONFileProvider

type JSONFileProvider struct {
	// contains filtered or unexported fields
}

func NewJSONFileProvider

func NewJSONFileProvider(filePath string) (*JSONFileProvider, error)

func (*JSONFileProvider) GetCheatSheet

func (j *JSONFileProvider) GetCheatSheet() (*keybinds.CheatSheet, error)

func (*JSONFileProvider) Name

func (j *JSONFileProvider) Name() string

type MangoWCDMSStatus

type MangoWCDMSStatus struct {
	Exists          bool
	Included        bool
	IncludePosition int
	TotalIncludes   int
	BindsAfterDMS   int
	Effective       bool
	OverriddenBy    int
	StatusMessage   string
}

type MangoWCKeyBinding

type MangoWCKeyBinding struct {
	Mods    []string `json:"mods"`
	Key     string   `json:"key"`
	Command string   `json:"command"`
	Params  string   `json:"params"`
	Comment string   `json:"comment"`
	Source  string   `json:"source"`
}

func ParseMangoWCKeys

func ParseMangoWCKeys(path string) ([]MangoWCKeyBinding, error)

type MangoWCParseResult

type MangoWCParseResult struct {
	Keybinds           []MangoWCKeyBinding
	DMSBindsIncluded   bool
	DMSStatus          *MangoWCDMSStatus
	ConflictingConfigs map[string]*MangoWCKeyBinding
}

func ParseMangoWCKeysWithDMS

func ParseMangoWCKeysWithDMS(path string) (*MangoWCParseResult, error)

type MangoWCParser

type MangoWCParser struct {
	// contains filtered or unexported fields
}

func NewMangoWCParser

func NewMangoWCParser(configDir string) *MangoWCParser

func (*MangoWCParser) ParseKeys

func (p *MangoWCParser) ParseKeys() []MangoWCKeyBinding

func (*MangoWCParser) ParseWithDMS

func (p *MangoWCParser) ParseWithDMS() ([]MangoWCKeyBinding, error)

func (*MangoWCParser) ReadContent

func (p *MangoWCParser) ReadContent(path string) error

type MangoWCProvider

type MangoWCProvider struct {
	// contains filtered or unexported fields
}

func NewMangoWCProvider

func NewMangoWCProvider(configPath string) *MangoWCProvider

func (*MangoWCProvider) GetCheatSheet

func (m *MangoWCProvider) GetCheatSheet() (*keybinds.CheatSheet, error)

func (*MangoWCProvider) GetOverridePath

func (m *MangoWCProvider) GetOverridePath() string

func (*MangoWCProvider) HasDMSBindsIncluded

func (m *MangoWCProvider) HasDMSBindsIncluded() bool

func (*MangoWCProvider) Name

func (m *MangoWCProvider) Name() string

func (*MangoWCProvider) RemoveBind

func (m *MangoWCProvider) RemoveBind(key string) error

func (*MangoWCProvider) SetBind

func (m *MangoWCProvider) SetBind(key, action, description string, options map[string]any) error

type MiracleActionOverride

type MiracleActionOverride struct {
	Name      string   `yaml:"name"`
	Action    string   `yaml:"action"`
	Modifiers []string `yaml:"modifiers"`
	Key       string   `yaml:"key"`
}

type MiracleConfig

type MiracleConfig struct {
	Terminal               string                  `yaml:"terminal"`
	ActionKey              string                  `yaml:"action_key"`
	DefaultActionOverrides []MiracleActionOverride `yaml:"default_action_overrides"`
	CustomActions          []MiracleCustomAction   `yaml:"custom_actions"`
}

func ParseMiracleConfig

func ParseMiracleConfig(configPath string) (*MiracleConfig, error)

type MiracleCustomAction

type MiracleCustomAction struct {
	Command   string   `yaml:"command"`
	Action    string   `yaml:"action"`
	Modifiers []string `yaml:"modifiers"`
	Key       string   `yaml:"key"`
}

type MiracleKeyBinding

type MiracleKeyBinding struct {
	Mods    []string
	Key     string
	Action  string
	Comment string
}

func MiracleConfigToBindings

func MiracleConfigToBindings(config *MiracleConfig) []MiracleKeyBinding

type MiracleProvider

type MiracleProvider struct {
	// contains filtered or unexported fields
}

func NewMiracleProvider

func NewMiracleProvider(configPath string) *MiracleProvider

func (*MiracleProvider) GetCheatSheet

func (m *MiracleProvider) GetCheatSheet() (*keybinds.CheatSheet, error)

func (*MiracleProvider) GetOverridePath

func (m *MiracleProvider) GetOverridePath() string

func (*MiracleProvider) Name

func (m *MiracleProvider) Name() string

type NiriKeyBinding

type NiriKeyBinding struct {
	Mods            []string
	Key             string
	Action          string
	Args            []string
	Description     string
	HideOnOverlay   bool
	CooldownMs      int
	AllowWhenLocked bool
	AllowInhibiting *bool
	Repeat          *bool
	Source          string
}

type NiriParseResult

type NiriParseResult struct {
	Section            *NiriSection
	DMSBindsIncluded   bool
	DMSStatus          *DMSBindsStatusInfo
	ConflictingConfigs map[string]*NiriKeyBinding
}

func ParseNiriKeys

func ParseNiriKeys(configDir string) (*NiriParseResult, error)

type NiriParser

type NiriParser struct {
	// contains filtered or unexported fields
}

func NewNiriParser

func NewNiriParser(configDir string) *NiriParser

func (*NiriParser) HasDMSBindsIncluded

func (p *NiriParser) HasDMSBindsIncluded() bool

func (*NiriParser) Parse

func (p *NiriParser) Parse() (*NiriSection, error)

type NiriProvider

type NiriProvider struct {
	// contains filtered or unexported fields
}

func NewNiriProvider

func NewNiriProvider(configDir string) *NiriProvider

func (*NiriProvider) GetCheatSheet

func (n *NiriProvider) GetCheatSheet() (*keybinds.CheatSheet, error)

func (*NiriProvider) GetOverridePath

func (n *NiriProvider) GetOverridePath() string

func (*NiriProvider) HasDMSBindsIncluded

func (n *NiriProvider) HasDMSBindsIncluded() bool

func (*NiriProvider) Name

func (n *NiriProvider) Name() string

func (*NiriProvider) RemoveBind

func (n *NiriProvider) RemoveBind(key string) error

func (*NiriProvider) SetBind

func (n *NiriProvider) SetBind(key, action, description string, options map[string]any) error

type NiriSection

type NiriSection struct {
	Name     string
	Keybinds []NiriKeyBinding
	Children []NiriSection
}

type SwayKeyBinding

type SwayKeyBinding struct {
	Mods    []string `json:"mods"`
	Key     string   `json:"key"`
	Command string   `json:"command"`
	Comment string   `json:"comment"`
}

type SwayParser

type SwayParser struct {
	// contains filtered or unexported fields
}

func NewSwayParser

func NewSwayParser() *SwayParser

func (*SwayParser) ParseKeys

func (p *SwayParser) ParseKeys() *SwaySection

func (*SwayParser) ReadContent

func (p *SwayParser) ReadContent(path string) error

type SwayProvider

type SwayProvider struct {
	// contains filtered or unexported fields
}

func NewSwayProvider

func NewSwayProvider(configPath string) *SwayProvider

func (*SwayProvider) GetCheatSheet

func (s *SwayProvider) GetCheatSheet() (*keybinds.CheatSheet, error)

func (*SwayProvider) Name

func (s *SwayProvider) Name() string

type SwaySection

type SwaySection struct {
	Children []SwaySection    `json:"children"`
	Keybinds []SwayKeyBinding `json:"keybinds"`
	Name     string           `json:"name"`
}

func ParseSwayKeys

func ParseSwayKeys(path string) (*SwaySection, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL