Documentation
¶
Overview ¶
Package config loads lys-shell's user configuration: the same files the Rust shell reads, with the same discovery order, imports, key names, defaults, layering (defaults < config file < runtime overrides), and failure behavior. The schema is declared once on the Go types through `cfg` tags (see fields.go); loading, the runtime layer, the CLI's get/set/reset/default, and the JSON Schema all derive from it.
Index ¶
- Constants
- Variables
- func AppearanceVariant(theme string, wantLight bool) (string, bool)
- func DefaultValue(path string) (any, error)
- func DefaultYAML() (string, error)
- func Dir() (string, error)
- func DiscardDiagnostics(Diagnostic)
- func DiscoverMain(dir string) string
- func Encode(v any) any
- func EnsureSchemaCurrent(dir string) error
- func EnumLabelKey(enumType, value string) string
- func ExamplePath(dir string) string
- func FormatGetValue(v any) string
- func GenerateSchema() string
- func I18nKey(path string) (string, bool)
- func InsertPath(root map[string]any, path string, value any) error
- func JSONText(v any) string
- func LeafPath(path string) (leaf, sub string, ok bool)
- func LoadEnvFiles(dir string)
- func ParseCLIValue(raw string) any
- func ParseYAML(text string) (map[string]any, error)
- func PathValue(tree any, path string) (any, bool)
- func Plain(v any) any
- func PropertyOrder(props Schema) []string
- func ReloadEnvFiles(dir string)
- func ResolveContentHeight(override *PixelLength) int
- func ResolveDimension(override *Size, base, scale float64) int
- func ResolveOr(override *ColorValue, configCSS string) string
- func ResolveSecret(value string) (string, bool)
- func RuntimeOverlayPath(configPath string) string
- func SchemaPath(dir string) string
- func StderrDiagnostics(d Diagnostic)
- func ThemesDir(configDir string) string
- func Watch[T any](s *Service, selector func(*Config) T, fn func(T)) (cancel func())
- func YAMLDocument(table map[string]any) (string, error)
- func YAMLInline(v any) string
- type ActiveIndicator
- type AnimSurface
- type AnimationType
- type AnimationsConfig
- func (a AnimationsConfig) CSSOverrides() string
- func (a AnimationsConfig) CompositorOwnsMotion() bool
- func (a AnimationsConfig) DurationFor(s AnimSurface, exiting bool) uint32
- func (a AnimationsConfig) InteractionDurationMs() uint32
- func (a AnimationsConfig) PagesSlide() bool
- func (a AnimationsConfig) Reduced() bool
- func (a AnimationsConfig) TransitionFor(s AnimSurface, exiting bool) AnimationType
- type AppIconSource
- type Appearance
- type Background
- type BarButtonVariant
- type BarConfig
- type BarCount
- type BarGroup
- type BarItem
- type BarLayout
- type BarModule
- type BatteryConfig
- type BitwardenConfig
- type BitwardenPassphrasePreset
- type BitwardenPasswordPreset
- type BitwardenServer
- type BluetoothConfig
- type BorderLocation
- type BrightnessConfig
- type ButtonColors
- type ButtonConfig
- type CavaConfig
- type CavaDirection
- type CavaInput
- type CavaStyle
- type ClickAction
- type ClickConfig
- type ClickKind
- type ClipboardConfig
- type ClipboardHistoryMiB
- type ClockConfig
- type ColorExtractorConfig
- type ColorKind
- type ColorValue
- type CompositorWorkspacesConfig
- type Config
- type ContainerConfig
- type CpuConfig
- type CssToken
- type CustomModuleDefinition
- type CyclingInterval
- type CyclingMode
- type DashboardConfig
- type Diagnostic
- type DiagnosticKind
- type DiagnosticSink
- type DisplayMode
- type DocGroup
- type DocGroupRule
- type DocSection
- type DropdownSize
- type DropdownsConfig
- type DynamicLauncherConfig
- type ExecutionMode
- type FieldKind
- type FieldMeta
- type FitMode
- type FontWeightClass
- type Framerate
- type FrequencyHz
- type GeneralConfig
- type HexColor
- type HyprlandWorkspacesConfig
- type IconConfig
- type IconMapping
- type IconPosition
- type IconSource
- type IdleInhibitConfig
- type IdleInhibitDuration
- type InvalidFieldError
- type InvalidFieldReason
- type KeybindModeConfig
- type KeyboardInputConfig
- type LabelStrategy
- type LauncherCase
- type LauncherCombiConfig
- type LauncherConfig
- type LauncherDrunConfig
- type LauncherDrunField
- type LauncherFileSort
- type LauncherFilebrowserConfig
- type LauncherHistoryConfig
- type LauncherLocation
- type LauncherMatching
- type LauncherQuicklink
- type LauncherRunConfig
- type LauncherSSHConfig
- type LauncherSearchConfig
- type LauncherSearchProvider
- type LauncherSnippet
- type LauncherSorting
- type LauncherWindowConfig
- type LauncherWindowField
- type Layer
- type LoadError
- type Location
- type LockBackground
- type LockBlur
- type LockdownConfig
- type LoginConfig
- type LoginGreeterConfig
- type LoginLockConfig
- type LysWMWorkspacesConfig
- type MailAccount
- type MailConfig
- type MailProvider
- type MangoWorkspacesConfig
- type Marshaler
- type MatugenScheme
- type MediaConfig
- type MediaIconType
- type MicrophoneConfig
- type ModulesConfig
- type MonitorWallpaperConfig
- type NamedWorkspaceMap
- type NetstatConfig
- type NetworkConfig
- type NightlightConfig
- type NightlightTransition
- type NiriWorkspacesConfig
- type NormalizedF64
- type NotificationConfig
- type NotificationHistoryMemory
- type NotificationHistoryStored
- type Numbering
- type OsdConfig
- type OsdMonitor
- type OsdPosition
- type OsdTextAlign
- type Palette
- type PaletteConfig
- type PassphraseWords
- type PasswordCharset
- type PasswordCharsets
- type PasswordLength
- type Percentage
- type PixelLength
- type PopupCloseBehavior
- type PopupMonitor
- type PopupPosition
- type PopupStack
- type PortalConfig
- type PowerConfig
- type PowerProfilesConfig
- type PywalContrast
- type RamConfig
- type RecorderConfig
- type RecorderFormat
- type RestartDelay
- type RestartPolicy
- type RoundingCSSValues
- type RoundingLevel
- type RuntimeValueError
- type ScaleFactor
- type Schema
- type ScreenshotConfig
- type SeparatorConfig
- type Service
- func (s *Service) ClearSessionReducedMotion()
- func (s *Service) Close()
- func (s *Service) Config() *Config
- func (s *Service) ConfigValue(path string) (any, bool)
- func (s *Service) Dir() string
- func (s *Service) GetByPath(path string) (any, error)
- func (s *Service) MainPath() string
- func (s *Service) ResetAllRuntime() error
- func (s *Service) ResetByPath(path string) (cleared bool, err error)
- func (s *Service) RuntimePath() string
- func (s *Service) RuntimeValue(path string) (any, bool)
- func (s *Service) RuntimeYAML() (string, error)
- func (s *Service) Save() error
- func (s *Service) SetByPath(path string, value any) error
- func (s *Service) SetSessionReducedMotion(on bool)
- func (s *Service) Source(path string) ValueSource
- func (s *Service) Subscribe(fn func(old, new *Config)) (cancel func())
- func (s *Service) SubscribeSecrets(fn func()) (cancel func())
- func (s *Service) SubscribeThemes(fn func()) (cancel func())
- func (s *Service) Value() any
- type SessionAction
- type ShadowPreset
- type SharePickerConfig
- type SharePickerPage
- type SignedNormalizedF64
- type Size
- type SizeUnit
- type StackingOrder
- type StateColors
- type StorageConfig
- type StorageMountPoint
- type StrftimeFormat
- type StylingConfig
- type SurfaceAnimation
- type SwayWorkspacesConfig
- type SystrayConfig
- type TemperatureUnit
- type ThemeEntry
- type ThemeProvider
- type ThresholdColors
- type ThresholdEntry
- type TimeFormat
- type ToastPreset
- type TrayItemOverride
- type TreemanConfig
- type Unmarshaler
- type UrgencyBarThreshold
- type UrgentMode
- type UserSessionConfig
- type ValueSource
- type VolumeConfig
- type VpnShow
- type WallpaperConfig
- type WallustBackend
- type WallustColorspace
- type WallustPalette
- type WeatherConfig
- type WeatherProvider
- type WeekStart
- type WindowTitleConfig
- type WorkspaceClickAction
- type WorkspaceClickKind
- type WorkspaceClicks
- type WorkspaceMap
- type WorkspaceStyle
- type WorldClockConfig
Constants ¶
const ( PopupMarginBaseRem = 0.75 PopupGapBaseRem = 0.5 )
Popup spacing bases (in rem) the margin and gap multipliers scale.
const ( )
The rem bases the share picker's Size multipliers resolve against (share_picker/mod.rs): Scale(1) is the default pixel size.
const ( RecorderIdle = "idle" RecorderRecording = "recording" RecorderPaused = "paused" )
Recorder states.
const ( BitwardenLocked = "locked" BitwardenUnlocked = "unlocked" )
Bitwarden vault states: a logged-out vault shows as locked.
const ( IdleInhibitActive = "active" IdleInhibitInactive = "inactive" )
Idle-inhibit states.
const ( ProfilePowerSaver = "power-saver" ProfileBalanced = "balanced" ProfilePerformance = "performance" )
Power profiles, as power-profiles-daemon names them.
const ( WorkspaceIconBaseRem = 1.3 WorkspaceLabelBaseRem = 1.1 )
The workspace modules' size bases (ICON_BASE_REM, LABEL_BASE_REM: every workspace schema carries the same pair).
const DefaultLockCommand = "loginctl lock-session"
DefaultLockCommand is the default command of the power menu's and the dashboard's Lock buttons. With no session argument loginctl locks logind's "auto" session, which for the systemd user unit, outside any session, is the user's display session.
const DefaultLogoutCommand = "lys-shell logout"
DefaultLogoutCommand is the default command of the power menu's and the dashboard's Log out buttons.
const GreeterConfigPath = "/etc/lys-shell/config.yaml"
GreeterConfigPath is the system config the greeter reads when no --config is given: pre-login there is no $HOME to discover from.
const KeyboardNextLayoutAction = ":next-layout"
KeyboardNextLayoutAction is the module's own click verb: the next layout.
const LauncherWidthBaseRem = 45
LauncherWidthBaseRem is the rem the width multiplier scales (720px).
const MaxLockBlur = 1000
MaxLockBlur is the largest lock blur, a sigma in pixels. It is far past any useful blur: at 1000 px a 4K background is already a wash of a few soft blotches. The three box passes approximating the gaussian have radii of about sigma, each pass costs O((w + h) * radius) on top of its O(w * h) to prime its sums, and the exact fast division holds to a radius of about 134 million: 1000 keeps both orders of magnitude away.
const OsdMarginBaseRem = 9.375
OsdMarginBaseRem is the rem the margin multiplier scales (150px).
const SystrayIconBaseRem = 1.25
SystrayIconBaseRem is the rem the icon-scale multiplier resolves against (systray ICON_BASE_REM).
Variables ¶
var BuiltinModules = []BarModule{ ModuleBattery, ModuleBitwarden, ModuleBluetooth, ModuleBrightness, ModuleCava, ModuleClock, ModuleCPU, ModuleDashboard, ModuleHyprlandWorkspaces, ModuleIdleInhibit, ModuleKeybindMode, ModuleKeyboardInput, ModuleLysWMWorkspaces, ModuleMail, ModuleMedia, ModuleMangoWorkspaces, ModuleMicrophone, ModuleNetstat, ModuleNetwork, ModuleNightlight, ModuleNiriWorkspaces, ModuleNotifications, ModulePower, ModulePowerProfiles, ModuleRAM, ModuleRecorder, ModuleScreenshot, ModuleSeparator, ModuleStorage, ModuleSwayWorkspaces, ModuleSystray, ModuleTreeman, ModuleUpdates, ModuleVolume, ModuleWeather, ModuleWindowTitle, ModuleWorkspaces, ModuleWorldClock, }
BuiltinModules is the built-in module list in schema order.
var CyclingModes = []CyclingMode{CyclingSequential, CyclingShuffle}
CyclingModes is every cycling mode, in schema order.
var ErrLockBlurRange = errors.New("lock blur out of range")
ErrLockBlurRange is a lock blur outside [0, MaxLockBlur].
var FitModes = []FitMode{FitFill, FitFit, FitCenter, FitStretch}
FitModes is every fit mode, in schema order.
var GreeterApplyKeys = []string{
"background-mode", "background-image", "background-color", "blur",
"show-clock", "clock-format", "date-format",
"greeter.show-user-list", "greeter.show-power-buttons",
"greeter.cursor-theme", "greeter.cursor-size",
}
GreeterApplyKeys are the login keys, relative to login, that lys-settings pushes to the system login screen and lys-login apply-config accepts, in the settings app's order: the shared look and the greeter's own keys, never those only the lock screen reads. The greeter counts no failed attempts: PAM decides a login, and pam_faillock locks an account per user and across restarts, which a counter in the greeter could not.
var MediaBuiltinIcons = []IconMapping{
{"*spotify*", "si-spotify-symbolic"},
{"*tidal*", "si-tidal-symbolic"},
{"*vlc*", "si-vlcmediaplayer-symbolic"},
{"*mpv*", "si-mpv-symbolic"},
{"*kodi*", "si-kodi-symbolic"},
{"*celluloid*", "si-mpv-symbolic"},
{"*jellyfin*", "si-jellyfin-symbolic"},
{"*firefox*", "si-firefox-symbolic"},
{"*librewolf*", "si-librewolf-symbolic"},
{"*floorp*", "si-floorp-symbolic"},
{"*zen*", "si-zenbrowser-symbolic"},
{"*chrom*", "si-googlechrome-symbolic"},
{"*brave*", "si-brave-symbolic"},
{"*vivaldi*", "si-vivaldi-symbolic"},
{"*opera*", "si-opera-symbolic"},
{"*edge*", "ld-globe-symbolic"},
{"*tor*", "si-torbrowser-symbolic"},
{"*helium*", "si-heliumbrowser-symbolic"},
}
MediaBuiltinIcons is the schema's BUILTIN_MAPPINGS, verbatim and in order: the first pattern matching the bus name wins.
var WindowTitleBuiltinIcons = []IconMapping{
{"*brave*", "si-brave-symbolic"},
{"*chromium*", "si-googlechrome-symbolic"},
{"*firefox*", "si-firefox-symbolic"},
{"*floorp*", "si-floorp-symbolic"},
{"*google-chrome*", "si-googlechrome-symbolic"},
{"*librewolf*", "si-librewolf-symbolic"},
{"*microsoft-edge*", "ld-globe-symbolic"},
{"*opera*", "si-opera-symbolic"},
{"*thorium*", "si-googlechrome-symbolic"},
{"*tor*", "si-torbrowser-symbolic"},
{"*vivaldi*", "si-vivaldi-symbolic"},
{"*waterfox*", "si-firefox-symbolic"},
{"*zen*", "si-zenbrowser-symbolic"},
{"*helium*", "si-heliumbrowser-symbolic"},
{"*alacritty*", "si-alacritty-symbolic"},
{"*foot*", "ld-terminal-symbolic"},
{"*ghostty*", "si-ghostty-symbolic"},
{"*gnome-terminal*", "ld-terminal-symbolic"},
{"*kitty*", "ld-terminal-symbolic"},
{"*konsole*", "ld-terminal-symbolic"},
{"*wezterm*", "si-wezterm-symbolic"},
{"*xterm*", "ld-terminal-symbolic"},
{"*code*", "ld-code-symbolic"},
{"*emacs*", "si-gnuemacs-symbolic"},
{"*jetbrains*", "si-jetbrains-symbolic"},
{"*neovide*", "si-neovim-symbolic"},
{"*sublime*", "si-sublimetext-symbolic"},
{"*vim*", "si-vim-symbolic"},
{"*zed*", "si-zedindustries-symbolic"},
{"*discord*", "si-discord-symbolic"},
{"*legcord*", "si-discord-symbolic"},
{"*vesktop*", "si-discord-symbolic"},
{"equibop", "si-discord-symbolic"},
{"*webcord*", "si-discord-symbolic"},
{"*element*", "si-element-symbolic"},
{"*signal*", "si-signal-symbolic"},
{"*slack*", "ld-slack-symbolic"},
{"*telegram*", "si-telegram-symbolic"},
{"*thunderbird*", "si-thunderbird-symbolic"},
{"*dolphin*", "ld-folder-symbolic"},
{"*nautilus*", "ld-folder-symbolic"},
{"*nemo*", "ld-folder-symbolic"},
{"*pcmanfm*", "ld-folder-symbolic"},
{"*thunar*", "ld-folder-symbolic"},
{"*mpv*", "si-mpv-symbolic"},
{"*spotify*", "si-spotify-symbolic"},
{"*vlc*", "si-vlcmediaplayer-symbolic"},
{"*blender*", "si-blender-symbolic"},
{"*gimp*", "si-gimp-symbolic"},
{"*inkscape*", "si-inkscape-symbolic"},
{"*krita*", "si-krita-symbolic"},
{"libreoffice-base", "si-libreofficebase-symbolic"},
{"libreoffice-calc", "si-libreofficecalc-symbolic"},
{"libreoffice-draw", "si-libreofficedraw-symbolic"},
{"libreoffice-math", "si-libreofficemath-symbolic"},
{"libreoffice-writer", "si-libreofficewriter-symbolic"},
{"libreoffice-impress", "si-libreofficeimpress-symbolic"},
{"libreoffice*", "si-libreoffice-symbolic"},
{"*obsidian*", "si-obsidian-symbolic"},
{"*steam*", "si-steam-symbolic"},
{"*lutris*", "si-lutris-symbolic"},
{"*qbittorrent*", "si-qbittorrent-symbolic"},
}
WindowTitleBuiltinIcons is the window-title schema's BUILTIN_MAPPINGS (window_title/icons.rs), verbatim and in order: the first pattern matching the window class wins, after the user's icon-mappings.
Functions ¶
func AppearanceVariant ¶
AppearanceVariant names theme's light (wantLight) or dark sibling; ok is false when theme already has the requested mode or has no pair (palettes.rs appearance_variant).
func DefaultValue ¶
DefaultValue is the built-in default at a dot path, encoded as the config serializes it.
func DefaultYAML ¶
DefaultYAML renders the default configuration as a YAML document (the `lys-shell config default` output).
func Dir ¶
Dir returns the lys-shell configuration directory: $XDG_CONFIG_HOME/lys-shell, or ~/.config/lys-shell when XDG_CONFIG_HOME is not an absolute path. Neither being one is an error: there is nowhere to look.
func DiscardDiagnostics ¶
func DiscardDiagnostics(Diagnostic)
DiscardDiagnostics drops diagnostics (re-applying layers that were already reported).
func DiscoverMain ¶
DiscoverMain resolves the user's main config file inside dir: config.yaml, else an existing config.yml. When neither exists yet, the config.yaml path is returned, so fresh installs and explicit missing-file handling agree on one path.
func Encode ¶
Encode is the plain form a typed value stores as: what GetByPath reads for a field holding v, and what SetByPath takes back.
func EnsureSchemaCurrent ¶
EnsureSchemaCurrent writes schema.json unless it already holds what this binary generates.
func EnumLabelKey ¶
EnumLabelKey is the Fluent key labeling one enum value (EnumVariant::fluent_key): enum-<type>-<variant>, kebab-cased from the Rust names. Serde's kebab-case rename makes the value the variant's kebab name, except for the variants enumIdents lists. The key may be missing from the bundle; the Rust GUI then shows the raw value.
func FormatGetValue ¶
FormatGetValue renders a `lys-shell config get` result: scalars bare (strings unquoted, floats in their shortest form), tables as a YAML document, arrays inline.
func GenerateSchema ¶
func GenerateSchema() string
GenerateSchema returns the JSON Schema of the whole config, indented by two spaces with sorted keys (the `lys-shell config schema --stdout` output and the committed schema/lys-shell-config.schema.json).
func I18nKey ¶
I18nKey is the settings label key of the field at a dot path, false for a path that names no field, a container, or a field of a struct without a prefix.
func InsertPath ¶ added in v0.2.0
InsertPath sets value at a dot-separated path, creating intermediate tables; a non-table in the way is an *InvalidFieldError. An empty path inserts the "" key, like the Rust split on '.'.
func JSONText ¶
JSONText is v as serde_json writes it: compact, and a float always with a fraction or exponent (render_json_literal's numbers).
func LeafPath ¶
LeafPath splits a dot path at the config leaf it lies in: leaf is the field the layers set and reset, sub the path inside that leaf's value struct ("" when the path names the leaf). ok is false for a path naming no field.
func LoadEnvFiles ¶
func LoadEnvFiles(dir string)
LoadEnvFiles loads the config directory's .env files.
func ParseCLIValue ¶
ParseCLIValue reads a `lys-shell config set` value as a YAML value ("true", "5", "[1, 2]", "{module: clock}", "'quoted'"). Anything that is not valid YAML, is empty or null, or reads as a mapping without being written as a flow mapping ("Now: playing") is taken as a plain string.
func ParseYAML ¶
ParseYAML parses a YAML document into the tree shapes SetByPath takes (the loader's own parse). The root must be a mapping.
func PathValue ¶ added in v0.2.0
PathValue is the value at the dot path in a parsed tree; false when the path names none.
func Plain ¶
Plain turns a GetByPath value into plain Go values: tables become map[string]any (their key order dropped), arrays []any, scalars as they are.
func PropertyOrder ¶
PropertyOrder is a properties map's keys in declaration order; the keys sorted for a map built without one.
func ReloadEnvFiles ¶
func ReloadEnvFiles(dir string)
ReloadEnvFiles is LoadEnvFiles after a change.
func ResolveContentHeight ¶
func ResolveContentHeight(override *PixelLength) int
ResolveContentHeight is the height of a dropdown that sizes to its content: the override's pixels, or -1 (natural size) without one.
func ResolveDimension ¶
ResolveDimension applies an optional override to a built-in base size in pixels: unset scales the base, a multiplier scales it further, pixels replace it (wayle-shell-core bar::resolve_dimension).
func ResolveOr ¶
func ResolveOr(override *ColorValue, configCSS string) string
ResolveOr is one slot's CSS: the override's value when set, else the module's configured color already resolved for the theme (ThresholdColors::resolve_or).
func ResolveSecret ¶
ResolveSecret resolves a "$NAME" config value from the environment; any other value is literal. An unset variable is (_, false) and logs, as secrets::resolve warns.
func RuntimeOverlayPath ¶
RuntimeOverlayPath is the runtime.yaml beside a config file: where `config set`, the settings GUI, and `lys-login apply-config` write overrides so they never clobber a hand-written config.yaml.
func SchemaPath ¶
SchemaPath is schema.json in dir, which the config stub's yaml-language-server modeline points editors at.
func Watch ¶
Watch calls fn with the selected value whenever it changes, the Go form of ConfigProperty::watch for one field or section.
func YAMLDocument ¶
YAMLDocument renders a table (map[string]any, nested tables as mappings) as a YAML document, the form runtime.yaml takes.
func YAMLInline ¶
YAMLInline renders a value on one line in YAML flow style (the form `lys-shell config set` echoes).
Types ¶
type ActiveIndicator ¶
type ActiveIndicator string
ActiveIndicator is ported from crates/wayle-config/src/schemas/modules/hyprland_workspaces/mod.rs.
Visual indicator style for the active workspace.
const ( // Entire button gets a colored background. ActiveBackground ActiveIndicator = "background" // Small colored bar under the workspace button. ActiveUnderline ActiveIndicator = "underline" )
ActiveIndicator values.
func (ActiveIndicator) CSSClass ¶
func (a ActiveIndicator) CSSClass() string
CSSClass is ActiveIndicator::css_class.
type AnimSurface ¶
type AnimSurface int
AnimSurface is a transient surface an animation applies to.
const ( // AnimNotifications is the notification popup cards. AnimNotifications AnimSurface = iota // AnimOsd is the OSD overlay (volume/brightness/toggle/toast). AnimOsd // AnimDropdown is the bar widget dropdown foldouts. AnimDropdown AnimSharePicker // AnimWallpaper is the wallpaper crossfade between images. AnimWallpaper // AnimPower is the power menu overlay. AnimPower // AnimDialog is the portal dialogs (access / account / app-chooser / // launcher install). AnimDialog // AnimFileChooser is the portal file-chooser surface. AnimFileChooser // AnimPrint is the portal print surface. AnimPrint // AnimLock is the lock screen reveal. AnimLock // AnimLauncher is the application launcher overlay. AnimLauncher )
Surfaces.
type AnimationType ¶
type AnimationType string
AnimationType is a transition style (crates/wayle-config/src/schemas/animations/types.rs).
Enter/exit transition style for transient surfaces (OSD, toasts, notifications). Driven per frame by the custom revealer (`GskTransform` + opacity).
const ( // No transition; surfaces appear and disappear instantly. AnimationNone AnimationType = "none" // Cross-fade opacity in and out. AnimationFade AnimationType = "fade" // Slide in from / out to the top edge. AnimationSlideUp AnimationType = "slide-up" // Slide in from / out to the bottom edge. AnimationSlideDown AnimationType = "slide-down" // Slide in from / out to the left edge. AnimationSlideLeft AnimationType = "slide-left" // Slide in from / out to the right edge. AnimationSlideRight AnimationType = "slide-right" // Slide in from / out to the top edge with a rotating swing. AnimationSwingUp AnimationType = "swing-up" // Slide in from / out to the bottom edge with a rotating swing. AnimationSwingDown AnimationType = "swing-down" // Slide in from / out to the left edge with a rotating swing. AnimationSwingLeft AnimationType = "swing-left" // Slide in from / out to the right edge with a rotating swing. AnimationSwingRight AnimationType = "swing-right" // Scale in from a shrunken state with an elastic overshoot, then settle. AnimationBounce AnimationType = "bounce" // Suck in toward / out to the surface's anchored edge (macOS "genie" // minimize, approximated with an affine scale-and-slide). Auto-orients to // the edge the surface sits on. AnimationGenie AnimationType = "genie" // Scale in smoothly from the center with no overshoot. AnimationZoom AnimationType = "zoom" // Spin in: rotate into place while scaling up and fading in. AnimationRotate AnimationType = "rotate" // Card flip: open out from a vertical edge (horizontal scale through zero). AnimationFlip AnimationType = "flip" )
Transition styles.
type AnimationsConfig ¶
type AnimationsConfig struct {
// Enable enter/exit animations (OSD, toasts, notifications) and
// icon-change crossfades. When disabled, surfaces appear instantly.
Enabled bool `cfg:"enabled"`
// Replace motion with fades in the shell and, through the portal's
// reduced-motion setting, in apps: surfaces fade instead of sliding,
// swinging or bouncing, and looping indicators stop. Under lys-wm this
// key has no effect and says so: lys-wm's `animations.reduced_motion`
// owns the setting for the whole desktop.
ReducedMotion bool `cfg:"reduced-motion"`
// Animation duration in milliseconds.
Duration uint32 `cfg:"duration"`
// Transition style used for enter/exit of the OSD, toasts, and
// notification cards. Base fallback for every surface and direction.
Transition AnimationType `cfg:"transition"`
// Global enter transition. Unset → `transition`.
Enter *AnimationType `cfg:"enter"`
// Global exit transition. Unset → `transition`.
Exit *AnimationType `cfg:"exit"`
// Global enter duration in ms. Unset → `duration`.
EnterDuration *uint32 `cfg:"enter-duration"`
// Global exit duration in ms. Unset → `duration`.
ExitDuration *uint32 `cfg:"exit-duration"`
// Duration in ms for in-place dropdown transitions: hover highlights and
// the page/stack crossfades inside dropdowns. `enabled: false` removes
// them entirely.
InteractionDuration uint32 `cfg:"interaction-duration"`
// Base duration in ms for general UI micro-transitions (hover, focus, and
// color fades) driven by the CSS `--duration-*` token family. Fast,
// normal, and slow speeds are derived from this. `enabled: false` zeroes
// them for an instant UI.
UIDuration uint32 `cfg:"ui-duration"`
// Run looping status indicators: spinners, network/bluetooth scan
// animations, the recording pulse, and the clock blink. Disable (or set
// `enabled: false`) for a fully static UI.
Indicators bool `cfg:"indicators"`
// Per-surface override for notification popup cards.
Notifications SurfaceAnimation `cfg:"notifications"`
// Per-surface override for the OSD (volume/brightness/toggle/toast).
Osd SurfaceAnimation `cfg:"osd"`
// Per-surface override for bar widget dropdown foldouts.
Dropdown SurfaceAnimation `cfg:"dropdown"`
SharePicker SurfaceAnimation `cfg:"share-picker"`
// Per-surface override for the wallpaper crossfade between images.
Wallpaper SurfaceAnimation `cfg:"wallpaper"`
// Per-surface override for the power menu overlay.
Power SurfaceAnimation `cfg:"power"`
// Per-surface override for portal dialogs (access/account/app-chooser/
// launcher-install prompts).
Dialog SurfaceAnimation `cfg:"dialog"`
// Per-surface override for the portal file-chooser surface.
FileChooser SurfaceAnimation `cfg:"file-chooser"`
// Per-surface override for the portal print surface.
Print SurfaceAnimation `cfg:"print"`
// Per-surface override for the lock screen reveal.
Lock SurfaceAnimation `cfg:"lock"`
// Per-surface override for the application launcher.
Launcher SurfaceAnimation `cfg:"launcher"`
// contains filtered or unexported fields
}
AnimationsConfig is the [animations] section (crates/wayle-config/src/schemas/animations/mod.rs).
Enter/exit and change animations for transient surfaces.
func DefaultsAnimations ¶
func DefaultsAnimations() AnimationsConfig
DefaultsAnimations returns the schema defaults.
func (AnimationsConfig) CSSOverrides ¶
func (a AnimationsConfig) CSSOverrides() string
CSSOverrides is the :root block bridging the config into the stylesheet: the --duration-* family from ui-duration (0.3/0.6/1/1.4 scaled) and, with indicators off, every looping keyframe frozen.
func (AnimationsConfig) CompositorOwnsMotion ¶ added in v0.3.1
func (a AnimationsConfig) CompositorOwnsMotion() bool
CompositorOwnsMotion reports whether the compositor decides reduced motion, leaving the key without effect.
func (AnimationsConfig) DurationFor ¶
func (a AnimationsConfig) DurationFor(s AnimSurface, exiting bool) uint32
DurationFor is the resolved duration in ms for a surface and direction; 0 when disabled.
func (AnimationsConfig) InteractionDurationMs ¶
func (a AnimationsConfig) InteractionDurationMs() uint32
InteractionDurationMs is the in-place dropdown transition duration; 0 when disabled.
func (AnimationsConfig) PagesSlide ¶ added in v0.3.1
func (a AnimationsConfig) PagesSlide() bool
PagesSlide reports whether a dropdown's pages slide rather than cross-fade.
func (AnimationsConfig) Reduced ¶ added in v0.3.1
func (a AnimationsConfig) Reduced() bool
Reduced reports whether motion gives way to fades: what the compositor says when one owns the setting, else the key.
func (AnimationsConfig) TransitionFor ¶
func (a AnimationsConfig) TransitionFor(s AnimSurface, exiting bool) AnimationType
TransitionFor is the resolved transition for a surface and direction: none when disabled, else the surface override, the global enter/exit, then `transition`.
type AppIconSource ¶
type AppIconSource string
AppIconSource is ported from crates/wayle-config/src/schemas/modules/volume/mod.rs.
Icon source for app volume entries in the dropdown.
const ( // lys-shell's curated symbolic icons matched by app name. AppIconSourceMapped AppIconSource = "mapped" // Native application icons reported by PulseAudio. AppIconSourceNative AppIconSource = "native" )
AppIconSource values.
type Appearance ¶
type Appearance string
Appearance is the light/dark mode (styling/types/color.rs).
Light/dark appearance mode.
`Auto` keeps each provider's own light setting and the configured static palette as-is. `Light`/`Dark` force the mode: dynamic providers switch their light flag, and the static palette swaps to its built-in light/dark variant when one exists.
const ( // Follow each provider's own setting / the configured palette. AppearanceAuto Appearance = "auto" // Force the light variant. AppearanceLight Appearance = "light" // Force the dark variant. AppearanceDark Appearance = "dark" )
Appearance modes.
func (Appearance) ForcedLight ¶
func (a Appearance) ForcedLight() (light, ok bool)
ForcedLight reports whether the mode forces light (true) or dark (false); ok is false for Auto.
type Background ¶
type Background struct {
// How the background is drawn: solid color, an image, or the wallpaper.
Mode LockBackground `cfg:"background-mode"`
// Background image path (used when `background-mode: image`).
Image string `cfg:"background-image"`
// Background fill color (used when `background-mode: color`).
Color HexColor `cfg:"background-color"`
}
Background is the background keys the lock screen and the greeter share, with the same descriptions in both schemas.
func (Background) ImagePath ¶
func (b Background) ImagePath(wallpaper string) string
ImagePath resolves the file the background shows: the configured image for image mode, the wallpaper for wallpaper mode, and "" for color mode (or an unset path, which draws the color).
type BarButtonVariant ¶
type BarButtonVariant string
BarButtonVariant is the bar button structure.
Visual style variants for bar buttons.
const ( // Icon + label, minimal background. ButtonBasic BarButtonVariant = "basic" // Icon in colored pill container that blends into button edge. ButtonBlockPrefix BarButtonVariant = "block-prefix" // Button background with colored icon container inside. ButtonIconSquare BarButtonVariant = "icon-square" )
Button variants.
func (BarButtonVariant) CSSClass ¶
func (v BarButtonVariant) CSSClass() string
CSSClass is the variant's class on the button ("block-prefix").
type BarConfig ¶
type BarConfig struct {
// Per-monitor bar layouts. Each entry targets a monitor by connector name
// (e.g., `"DP-1"`) or `"*"` for all monitors. See [`BarLayout`] for the
// full shape, including layout inheritance via `extends`.
//
// ## Example
//
// “`yaml
// bar:
// layout:
// - monitor: "*"
// left: [dashboard]
// center: [clock]
// right: [battery, network, volume, systray]
// - monitor: HDMI-1
// extends: "*"
// right: [volume, systray]
// “`
Layout []BarLayout `cfg:"layout"`
// Bar-specific scale multiplier for spacing, radius, and other bar elements.
Scale ScaleFactor `cfg:"scale"`
// Gap between bar and its attached screen edge.
//
// - **Orientation**: Distance from top (horizontal bar) or left (vertical bar)
InsetEdge Size `cfg:"inset-edge"`
// Gap at the bar's ends.
//
// - **Orientation**: Left/right (horizontal bar), top/bottom (vertical bar)
InsetEnds Size `cfg:"inset-ends"`
// Internal spacing along bar thickness.
//
// - **Orientation**: Top/bottom (horizontal bar), left/right (vertical bar)
Padding Size `cfg:"padding"`
// Internal spacing at bar ends.
//
// - **Orientation**: Left/right (horizontal bar), top/bottom (vertical bar)
PaddingEnds Size `cfg:"padding-ends"`
// Gap between modules and groups on the bar.
ModuleGap Size `cfg:"module-gap"`
// Bar position on screen edge.
Location Location `cfg:"location"`
// Reserve screen space for the bar.
//
// When disabled, windows may overlap the bar and the bar draws over them.
Exclusive bool `cfg:"exclusive"`
// Layer-shell layer the bar is placed on.
Layer Layer `cfg:"layer"`
// Bar background color.
BG ColorValue `cfg:"bg"`
// Bar background opacity (0-100). Below 100 the compositor blurs what is
// behind the bar; where it offers no blur the bar rests on its opaque color.
BackgroundOpacity Percentage `cfg:"background-opacity"`
// Border placement for bar.
BorderLocation BorderLocation `cfg:"border-location"`
// Border width for bar (pixels).
BorderWidth uint8 `cfg:"border-width"`
// Border color for the bar.
BorderColor ColorValue `cfg:"border-color"`
// Corner rounding level for the bar.
Rounding RoundingLevel `cfg:"rounding"`
// Shadow style for the bar.
Shadow ShadowPreset `cfg:"shadow"`
// Visual style variant for bar buttons.
ButtonVariant BarButtonVariant `cfg:"button-variant"`
// Button opacity (0-100).
ButtonOpacity Percentage `cfg:"button-opacity"`
// Button background opacity (0-100).
ButtonBGOpacity Percentage `cfg:"button-bg-opacity"`
// Button icon size. Accepts a scale multiplier or pixels (e.g. `"24px"`).
ButtonIconSize Size `cfg:"button-icon-size"`
// Button icon container padding. Only applies to `block-prefix` and `icon-square` variants.
// Accepts a scale multiplier or pixels (e.g. `"8px"`).
ButtonIconPadding Size `cfg:"button-icon-padding"`
// Button label text size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
ButtonLabelSize Size `cfg:"button-label-size"`
// Button label font weight.
ButtonLabelWeight FontWeightClass `cfg:"button-label-weight"`
// Button label container padding. Accepts a scale multiplier or pixels (e.g. `"8px"`).
ButtonLabelPadding Size `cfg:"button-label-padding"`
// Corner rounding level for the buttons in the bar.
ButtonRounding RoundingLevel `cfg:"button-rounding"`
// Gap between button icon and label. Accepts a scale multiplier or pixels (e.g. `"4px"`).
ButtonGap Size `cfg:"button-gap"`
// Icon position relative to label in bar buttons.
ButtonIconPosition IconPosition `cfg:"button-icon-position"`
// Border placement for bar buttons.
ButtonBorderLocation BorderLocation `cfg:"button-border-location"`
// Border width for bar buttons (pixels).
ButtonBorderWidth uint8 `cfg:"button-border-width"`
// Border placement for button groups.
ButtonGroupBorderLocation BorderLocation `cfg:"button-group-border-location"`
// Border width for button groups (pixels).
ButtonGroupBorderWidth uint8 `cfg:"button-group-border-width"`
// Internal padding for button groups.
ButtonGroupPadding Size `cfg:"button-group-padding"`
// Gap between modules within a group.
ButtonGroupModuleGap Size `cfg:"button-group-module-gap"`
// Background color for button groups.
ButtonGroupBackground ColorValue `cfg:"button-group-background"`
// Button group opacity (0-100).
ButtonGroupOpacity Percentage `cfg:"button-group-opacity"`
// Border color for button groups.
ButtonGroupBorderColor ColorValue `cfg:"button-group-border-color"`
// Corner rounding level for button groups.
ButtonGroupRounding RoundingLevel `cfg:"button-group-rounding"`
// Enable dropdown panel shadow.
DropdownShadow bool `cfg:"dropdown-shadow"`
// Dropdown panel opacity (0-100). Below 100 the compositor blurs what is
// behind the panel; where it offers no blur the panel is opaque.
DropdownOpacity Percentage `cfg:"dropdown-opacity"`
// Close dropdown when clicking outside it.
//
// Esc closes an open dropdown too. On lys-wm it does so beside the
// dropdown, with the keys still on the focused window, and the window
// sees neither the press nor the release, unless a bind on bare Esc, a
// window inhibiting shortcuts, an exclusive layer or a grab has the key.
// Elsewhere Esc reaches a dropdown only after a click into it, as keys
// stay with the focused window until then.
DropdownAutohide bool `cfg:"dropdown-autohide"`
// Freeze the bar button label while its dropdown is open.
//
// Prevents the button from resizing mid-interaction, which keeps the
// dropdown anchored in place.
DropdownFreezeLabel bool `cfg:"dropdown-freeze-label"`
}
BarConfig is the `bar` section (crates/wayle-config/src/schemas/bar/mod.rs).
Bar chrome: per-monitor layout, spacing, colors, and button styling.
func DefaultsBar ¶
func DefaultsBar() BarConfig
DefaultsBar returns the schema defaults: PlainBar made a floating pane of glass whose buttons are ink on the glass.
type BarCount ¶
type BarCount uint16
BarCount is the cava bar count (modules/cava/types.rs).
Frequency bar count clamped to 1-256.
func (BarCount) MarshalConfig ¶
MarshalConfig implements Marshaler.
func (*BarCount) UnmarshalConfig ¶
UnmarshalConfig implements Unmarshaler.
type BarGroup ¶
BarGroup is a set of modules sharing a visual container; its members are module references, never nested groups.
type BarItem ¶
type BarItem struct {
// Module is the module ("clock", "battery", "custom-submap").
Module BarModule
// Class is an extra styling class for this instance; empty for
// bare entries and groups.
Class string
// Group is non-nil when the item is a group container.
Group *BarGroup
}
BarItem is one entry in a bar layout section: a bare module name, a module with a per-instance CSS class, or a named group of modules (the untagged BarItem/ModuleRef enums in crates/wayle-config/src/schemas/bar/types/mod.rs).
func (BarItem) MarshalConfig ¶
MarshalConfig implements Marshaler: a bare name, a {module, class} table, or a {name, modules} group.
func (*BarItem) UnmarshalConfig ¶
UnmarshalConfig implements Unmarshaler with serde's untagged order: a {module, class} table, then a module name, then a {name, modules} group. Anything else — including a table missing a required key or naming an unknown module — is serde's untagged error.
type BarLayout ¶
type BarLayout struct {
// Monitor connector name (e.g., `"DP-1"`) or `"*"` for all monitors.
Monitor string `cfg:"monitor"`
// Inherit from another layout by its monitor value (e.g., `"*"`).
Extends *string `cfg:"extends"`
// Whether the bar is visible on this monitor.
Show bool `cfg:"show"`
// Modules in the left section.
Left []BarItem `cfg:"left"`
// Modules in the center section.
Center []BarItem `cfg:"center"`
// Modules in the right section.
Right []BarItem `cfg:"right"`
}
BarLayout is the bar layout for one monitor (crates/wayle-config/src/schemas/bar/types/mod.rs). Keys a layout entry omits take BarLayout's own defaults (#[serde(default)] with the default layout's sections), so only an explicitly empty section inherits through `extends` — the Rust behavior.
func DefaultBarLayout ¶
func DefaultBarLayout() BarLayout
DefaultBarLayout is BarLayout::default(): every monitor, the workspaces and media left, clock centered, the status modules right.
func (BarLayout) ExtendsName ¶
ExtendsName is the parent layout's monitor value, "" when unset.
type BarModule ¶
type BarModule string
BarModule names a bar module: a built-in, or `custom-<id>` for a `modules.custom` definition.
const ( ModuleBattery BarModule = "battery" ModuleBluetooth BarModule = "bluetooth" ModuleBrightness BarModule = "brightness" ModuleBitwarden BarModule = "bitwarden" ModuleCava BarModule = "cava" ModuleClock BarModule = "clock" ModuleCPU BarModule = "cpu" ModuleDashboard BarModule = "dashboard" ModuleHyprlandWorkspaces BarModule = "hyprland-workspaces" ModuleIdleInhibit BarModule = "idle-inhibit" ModuleKeybindMode BarModule = "keybind-mode" ModuleKeyboardInput BarModule = "keyboard-input" ModuleLysWMWorkspaces BarModule = "lys-wm-workspaces" ModuleMail BarModule = "mail" ModuleMedia BarModule = "media" ModuleMangoWorkspaces BarModule = "mango-workspaces" ModuleMicrophone BarModule = "microphone" ModuleNetstat BarModule = "netstat" ModuleNetwork BarModule = "network" ModuleNightlight BarModule = "nightlight" ModuleNiriWorkspaces BarModule = "niri-workspaces" ModuleNotifications BarModule = "notifications" ModulePower BarModule = "power" ModulePowerProfiles BarModule = "power-profiles" ModuleRAM BarModule = "ram" ModuleRecorder BarModule = "recorder" ModuleScreenshot BarModule = "screenshot" ModuleSeparator BarModule = "separator" ModuleStorage BarModule = "storage" ModuleSwayWorkspaces BarModule = "sway-workspaces" ModuleSystray BarModule = "systray" ModuleTreeman BarModule = "treeman" ModuleUpdates BarModule = "updates" ModuleVolume BarModule = "volume" ModuleWeather BarModule = "weather" ModuleWindowTitle BarModule = "window-title" ModuleWorkspaces BarModule = "workspaces" ModuleWorldClock BarModule = "world-clock" )
The built-in modules the layout accepts (BUILTIN_MODULES).
func (*BarModule) UnmarshalConfig ¶
UnmarshalConfig implements Unmarshaler: a built-in name or a non-empty custom-<id>.
type BatteryConfig ¶
type BatteryConfig struct {
// Icons for battery levels from empty to full.
//
// The percentage is divided evenly among icons. With 5 icons:
// 0-20% uses icons\[0\], 21-40% uses icons\[1\], etc.
LevelIcons []string `cfg:"level-icons"`
// Icon shown when battery is charging.
ChargingIcon string `cfg:"charging-icon"`
// Icon shown when battery is not present or in an error state.
AlertIcon string `cfg:"alert-icon"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display percentage label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ percent }}` - Battery level (0-100)
//
// ## Examples
//
// - `"{{ percent }}%"` - "45%"
Format string `cfg:"format"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Dynamic color thresholds based on battery percentage.
//
// Entries are checked in order; the last matching entry wins for each
// color slot. Use `below` for low-value warnings (e.g., low battery).
//
// ## Example
//
// “`yaml
// modules:
// battery:
// thresholds:
// - below: 40
// icon-color: status-warning
// - below: 20
// icon-color: status-error
// label-color: status-error
// “`
Thresholds []ThresholdEntry `cfg:"thresholds"`
}
BatteryConfig is ported from crates/wayle-config/src/schemas/modules/battery/mod.rs.
Battery level, charging state, and a dropdown with power-profile controls.
::: warning
This module uses `upower` (D-Bus) for battery information. Ensure `upower` daemon is running and exposes a battery device (verify with `upower --battery` or `upower --dump`).
:::
func DefaultsBattery ¶
func DefaultsBattery() BatteryConfig
DefaultsBattery returns the schema defaults.
func (BatteryConfig) Clicks ¶
func (c BatteryConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (BatteryConfig) Icon ¶
func (c BatteryConfig) Icon() IconConfig
Icon is the battery's fallback (alert) icon.
type BitwardenConfig ¶
type BitwardenConfig struct {
// Server the login form logs in to. A logged-in account keeps the
// server it logged in to.
Server BitwardenServer `cfg:"server"`
// Email the login form starts with.
Email string `cfg:"email"`
// Lock the vault when the session locks.
LockWithSession bool `cfg:"lock-with-session"`
// Unlock a locked vault with the password that unlocks the lock
// screen, once per unlock and never retried. Only useful when the
// master password is the login password; each wrong guess costs
// lys-secrets a full key derivation.
UnlockWithSession bool `cfg:"unlock-with-session"`
// Clear a copied secret from the clipboard after this many seconds,
// unless something else was copied since. 0 leaves it there.
ClipboardClear uint32 `cfg:"clipboard-clear"`
// Vault folder whose logins answer NetworkManager's requests for
// Wi-Fi, 802.1X and VPN secrets while the vault is open, before the
// shell asks. The one login named exactly like the connection
// profile answers: its password for the password, PSK or secret,
// its username for the username, and a custom field of a key's name
// for that key (`pin`, `domain`, `private-key-password`). A login
// behind the master-password reprompt never answers, and secrets
// NetworkManager rejected are asked for again. Empty answers nothing
// from the vault. A password (and username) typed into the shell's
// prompt is offered for saving here, as a login named like the
// profile, once the connection came up with it.
NetworkFolder string `cfg:"network-folder"`
// Vault folder apps' Secret portal master secrets are kept in: the
// key each sandboxed app's saved passwords are encrypted with, which
// then survives a reinstall and is the same on every computer. Each
// app's key is put there on its first use with the vault open, after
// you allow it; the keyring keeps a copy, so the app still opens
// while the vault is locked. Empty keeps the keys in the keyring only.
PortalFolder string `cfg:"portal-folder"`
// Password presets the dropdown's generator offers. Generating
// copies a new password as a secret, cleared after
// `clipboard-clear`.
GeneratorPasswords []BitwardenPasswordPreset `cfg:"generator-passwords"`
// Passphrase presets the dropdown's generator offers, of words from
// the EFF large wordlist. Generating copies a new passphrase as a
// secret, cleared after `clipboard-clear`.
GeneratorPassphrases []BitwardenPassphrasePreset `cfg:"generator-passphrases"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ count }}` - Number of items in the open vault (empty while
// locked)
//
// ## Examples
//
// - `"{{ count }}"` - "142"
Format string `cfg:"format"`
// Icon while the vault is locked or logged out.
IconLocked string `cfg:"icon-locked"`
// Icon while the vault is open.
IconUnlocked string `cfg:"icon-unlocked"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Defaults to opening the vault dropdown.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
BitwardenConfig is the `modules.bitwarden` section.
Bitwarden vault: the bar shows whether it is locked; the dropdown logs in, unlocks, searches the vault and copies an item's username, password or one-time code.
The vault lives in lys-secrets (`dev.stubbe.lys.Vault1`), the one process holding its keys; the shell shows it and copies from it. The idle lock and the sync interval are lys-secrets' settings (`--vault-lock-after`, `--vault-sync-interval`). Copied secrets are marked so clipboard managers, the shell's own history included, do not keep them.
The launcher's `vault` mode (`lys-shell launcher -show vault`) searches the open vault from anywhere: Enter copies an item's password (or its first field), Shift+Enter lists its fields to pick one. A locked vault asks for the master password in the launcher's masked input, and a protected item asks again before a secret is copied.
The dropdown's generator (its header's shuffle button) lists the `generator-passwords` and `generator-passphrases` presets; picking one copies a new password or passphrase, made in the shell, as a secret. Passphrases draw from the EFF large wordlist (CC BY 3.0 US, by the Electronic Frontier Foundation).
The dropdown's Sends (its header's paper plane) lists the vault's Bitwarden Sends, deletes them, and creates a text Send deleted after an hour, a day, a week or 31 days, optionally limited in opens and behind a password; its link, which carries the Send's key, is copied as a secret.
func DefaultsBitwarden ¶
func DefaultsBitwarden() BitwardenConfig
DefaultsBitwarden returns the schema defaults.
func (BitwardenConfig) Clicks ¶
func (c BitwardenConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (BitwardenConfig) Icons ¶
func (c BitwardenConfig) Icons() map[string]IconConfig
Icons maps each vault state to its icon.
type BitwardenPassphrasePreset ¶ added in v0.2.0
type BitwardenPassphrasePreset struct {
// Name the generator lists the preset by.
Name string `cfg:"name,required"`
// Number of words, 3-20.
Words PassphraseWords `cfg:"words,default"`
// Text between the words.
Separator string `cfg:"separator,default"`
// Capitalise the first letter of every word.
Capitalize bool `cfg:"capitalize,default"`
// Append a digit to one of the words.
Number bool `cfg:"number,default"`
}
BitwardenPassphrasePreset is one `modules.bitwarden.generator-passphrases` entry.
A passphrase of words from the EFF large wordlist the Bitwarden dropdown's generator makes and copies.
## Example
```yaml modules: {bitwarden: {generator-passphrases: [{name: Spoken, words: 5, separator: " ", capitalize: false, number: false}]}} ```
func DefaultsBitwardenPassphrasePreset ¶ added in v0.2.0
func DefaultsBitwardenPassphrasePreset() BitwardenPassphrasePreset
DefaultsBitwardenPassphrasePreset returns the schema defaults.
func (BitwardenPassphrasePreset) Rules ¶ added in v0.2.0
func (p BitwardenPassphrasePreset) Rules() generator.Passphrase
Rules are the preset's generator rules.
type BitwardenPasswordPreset ¶ added in v0.2.0
type BitwardenPasswordPreset struct {
// Name the generator lists the preset by.
Name string `cfg:"name,required"`
// Length in characters, 5-128.
Length PasswordLength `cfg:"length,default"`
// Character classes to draw from; each appears at least once.
Charsets PasswordCharsets `cfg:"charsets,default"`
// Leave out the easily confused characters `l`, `I`, `O`, `0` and `1`.
AvoidAmbiguous bool `cfg:"avoid-ambiguous,default"`
}
BitwardenPasswordPreset is one `modules.bitwarden.generator-passwords` entry.
A random-character password the Bitwarden dropdown's generator makes and copies.
## Example
```yaml modules: {bitwarden: {generator-passwords: [{name: PIN-safe, length: 12, charsets: [uppercase, digits], avoid-ambiguous: true}]}} ```
func DefaultsBitwardenPasswordPreset ¶ added in v0.2.0
func DefaultsBitwardenPasswordPreset() BitwardenPasswordPreset
DefaultsBitwardenPasswordPreset returns the schema defaults.
func (BitwardenPasswordPreset) Rules ¶ added in v0.2.0
func (p BitwardenPasswordPreset) Rules() generator.Password
Rules are the preset's generator rules.
type BitwardenServer ¶
type BitwardenServer struct {
// contains filtered or unexported fields
}
BitwardenServer is where the account lives, resolved at load so a mistyped URL is a diagnostic for its field: `bitwarden.com`, `bitwarden.eu`, or a self-hosted server's (or Vaultwarden's) base URL, e.g. `https://vault.example.com`.
func ParseBitwardenServer ¶
func ParseBitwardenServer(s string) (BitwardenServer, error)
ParseBitwardenServer resolves one server setting.
func (BitwardenServer) MarshalConfig ¶
func (b BitwardenServer) MarshalConfig() any
MarshalConfig implements Marshaler.
func (BitwardenServer) Server ¶
func (b BitwardenServer) Server() vault.Server
Server is the parsed server.
func (BitwardenServer) String ¶
func (b BitwardenServer) String() string
String is the setting as written.
func (*BitwardenServer) UnmarshalConfig ¶
func (b *BitwardenServer) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type BluetoothConfig ¶
type BluetoothConfig struct {
// Icon when Bluetooth is disabled or unavailable.
DisabledIcon string `cfg:"disabled-icon"`
// Icon when Bluetooth is on but no devices connected.
DisconnectedIcon string `cfg:"disconnected-icon"`
// Icon when devices are connected.
ConnectedIcon string `cfg:"connected-icon"`
// Icon when scanning for devices.
SearchingIcon string `cfg:"searching-icon"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display connection label (device name or count).
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
BluetoothConfig is ported from crates/wayle-config/src/schemas/modules/bluetooth/mod.rs.
Bluetooth connection status with a dropdown for pairing and managing devices.
func DefaultsBluetooth ¶
func DefaultsBluetooth() BluetoothConfig
DefaultsBluetooth returns the schema defaults.
func (BluetoothConfig) Clicks ¶
func (c BluetoothConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (BluetoothConfig) Icon ¶
func (c BluetoothConfig) Icon() IconConfig
Icon is the bluetooth disconnected icon.
type BorderLocation ¶
type BorderLocation string
BorderLocation is the placement of a border: one edge, all edges, or none.
Border placement for bar buttons.
const ( // No border. BorderNone BorderLocation = "none" // Border on top edge only. BorderTop BorderLocation = "top" // Border on bottom edge only. BorderBottom BorderLocation = "bottom" // Border on left edge only. BorderLeft BorderLocation = "left" // Border on right edge only. BorderRight BorderLocation = "right" // Border on all edges. BorderAll BorderLocation = "all" )
Border locations.
func (BorderLocation) CSSClass ¶
func (b BorderLocation) CSSClass() (string, bool)
CSSClass is the border placement class ("border-top", "border-all"); none has no class (ok false).
type BrightnessConfig ¶
type BrightnessConfig struct {
// Icons for brightness levels from low to maximum.
//
// The percentage is divided evenly among icons. With 3 icons:
// 0-33% uses icons\[0\], 34-66% uses icons\[1\], 67-100% uses icons\[2\].
LevelIcons []string `cfg:"level-icons"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display percentage label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ percent }}` - Brightness (0-100)
//
// ## Examples
//
// - `"{{ percent }}%"` - "65%"
Format string `cfg:"format"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Lower bound (percent) for the native brightness-adjust action and
// `lys-shell brightness`.
//
// Scrolling, clicking or a brightness key bound to `lys-shell brightness`
// never drops below this, so a dimmer cannot reach a fully dark screen by
// accident. Use the brightness-toggle action to intentionally blackout to
// 0%.
MinBrightness Percentage `cfg:"min-brightness"`
// Discover and control external monitors over DDC/CI (I²C).
//
// External monitors appear as extra sliders in the brightness panel.
// Requires the `i2c-dev` kernel module and read/write access to
// `/dev/i2c-*` (usually membership in the `i2c` group). Disable to skip
// the slow DDC scan if you only have an internal panel.
EnableExternal bool `cfg:"enable-external"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Default opens the brightness dropdown.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up. Default raises brightness by 5%.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down. Default lowers brightness by 5%, floored at
// `min-brightness`.
ScrollDown ClickAction `cfg:"scroll-down"`
// Dynamic color thresholds based on brightness percentage.
//
// Entries are checked in order; the last matching entry wins for each
// color slot. Use `below` for low-brightness warnings.
//
// ## Example
//
// “`yaml
// modules:
// brightness:
// thresholds:
// - below: 20
// icon-color: status-warning
// label-color: status-warning
// “`
Thresholds []ThresholdEntry `cfg:"thresholds"`
}
BrightnessConfig is ported from crates/wayle-config/src/schemas/modules/brightness/mod.rs.
Backlight control bar module.
func DefaultsBrightness ¶
func DefaultsBrightness() BrightnessConfig
DefaultsBrightness returns the schema defaults.
func (BrightnessConfig) Clicks ¶
func (c BrightnessConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type ButtonColors ¶
type ButtonColors struct {
Icon ColorValue // icon-color
Label ColorValue // label-color
IconBg ColorValue // icon-bg-color
ButtonBg ColorValue // button-bg-color
Border ColorValue // border-color
}
ButtonColors are the five color slots of a bar button.
type ButtonConfig ¶
type ButtonConfig struct {
BorderShow bool
IconShow bool
LabelShow bool
LabelMaxLength int
Colors ButtonColors
Defaults ButtonColors
// AutoIconColor is the token an auto icon color resolves to under
// the basic variant: a widget constant per module in Rust
// (BarButtonColors::auto_icon_color), never read from a file.
AutoIconColor CssToken
}
ButtonConfig is one module's bar-button keys plus their schema defaults (resolve_color's fallback under a non-lys-shell provider).
type CavaConfig ¶
type CavaConfig struct {
// Number of frequency bars.
Bars BarCount `cfg:"bars"`
// Visualization update rate in frames per second.
Framerate Framerate `cfg:"framerate"`
// Stereo channel visualization (splits bars between left and right).
Stereo bool `cfg:"stereo"`
// Noise reduction filter strength.
NoiseReduction NormalizedF64 `cfg:"noise-reduction"`
// Monstercat-style smoothing across adjacent bars (0.0 = off).
Monstercat float64 `cfg:"monstercat"`
// Wave-style smoothing (0 = off).
Waves uint32 `cfg:"waves"`
// Low frequency cutoff in Hz.
LowCutoff FrequencyHz `cfg:"low-cutoff"`
// High frequency cutoff in Hz.
HighCutoff FrequencyHz `cfg:"high-cutoff"`
// Audio capture backend.
Input CavaInput `cfg:"input"`
// Audio source identifier ("auto" for automatic selection).
Source string `cfg:"source"`
// Visualization rendering style.
Style CavaStyle `cfg:"style"`
// Bar growth direction.
Direction CavaDirection `cfg:"direction"`
// Bar color.
Color ColorValue `cfg:"color"`
// Module background color.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Width of each frequency bar in pixels.
BarWidth uint32 `cfg:"bar-width"`
// Gap between frequency bars in pixels.
BarGap uint32 `cfg:"bar-gap"`
// Padding at the ends of the visualizer. Accepts a scale multiplier or
// pixels (e.g. `"8px"`).
InternalPadding Size `cfg:"internal-padding"`
// Display border around the visualizer.
BorderShow bool `cfg:"border-show"`
// Border color.
BorderColor ColorValue `cfg:"border-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
CavaConfig is ported from crates/wayle-config/src/schemas/modules/cava/mod.rs.
Audio frequency bars visualising the output stream.
func (CavaConfig) Clicks ¶
func (c CavaConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type CavaDirection ¶
type CavaDirection string
CavaDirection is ported from crates/wayle-config/src/schemas/modules/cava/types.rs.
Bar growth direction relative to the bar's attached screen edge.
const ( // Bars grow away from the attached edge. CavaDirectionNormal CavaDirection = "normal" // Bars grow toward the attached edge. CavaDirectionReverse CavaDirection = "reverse" // Bars grow symmetrically from center. CavaDirectionMirror CavaDirection = "mirror" )
CavaDirection values.
type CavaInput ¶
type CavaInput string
CavaInput is ported from crates/wayle-config/src/schemas/modules/cava/types.rs.
Audio capture backend.
const ( // PipeWire multimedia server. CavaInputPipeWire CavaInput = "pipe-wire" // PulseAudio sound server. CavaInputPulse CavaInput = "pulse" // Advanced Linux Sound Architecture. CavaInputAlsa CavaInput = "alsa" // JACK Audio Connection Kit. CavaInputJack CavaInput = "jack" // Named pipe (FIFO) input. CavaInputFifo CavaInput = "fifo" // PortAudio cross-platform library. CavaInputPortAudio CavaInput = "port-audio" // sndio audio subsystem (BSD). CavaInputSndio CavaInput = "sndio" // Open Sound System (legacy). CavaInputOss CavaInput = "oss" // Shared memory input. CavaInputShmem CavaInput = "shmem" // Windows audio capture (WASAPI). CavaInputWinscap CavaInput = "winscap" )
CavaInput values.
type CavaStyle ¶
type CavaStyle string
CavaStyle is ported from crates/wayle-config/src/schemas/modules/cava/types.rs.
Visualization rendering style.
type ClickAction ¶
ClickAction is one module input binding, parsed from the schema's ClickAction strings (crates/wayle-config/src/click_action.rs): "dropdown:<name>", "brightness:<delta>" or "brightness:toggle", an empty string for no action, and anything else runs as a shell command. Like the Rust type every string parses: a brightness delta that is not an i32 is no action.
func ParseClickAction ¶
func ParseClickAction(s string) ClickAction
ParseClickAction parses one schema string (ClickAction::from_str).
func (ClickAction) MarshalConfig ¶
func (a ClickAction) MarshalConfig() any
MarshalConfig implements Marshaler.
func (ClickAction) String ¶
func (a ClickAction) String() string
String serializes back to the schema form.
func (*ClickAction) UnmarshalConfig ¶
func (a *ClickAction) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type ClickConfig ¶
type ClickConfig struct {
LeftClick ClickAction
RightClick ClickAction
MiddleClick ClickAction
ScrollUp ClickAction
ScrollDown ClickAction
}
ClickConfig is a module's five input bindings as one value, the view the bar's input routing takes; each module config declares the five keys itself (their docs differ per module) and exposes them through a Clicks method.
type ClipboardConfig ¶ added in v0.2.0
type ClipboardConfig struct {
// Most memory the history keeps, in MiB, across every entry. The
// oldest entries are forgotten to make room for a new one. The
// budget is never less than the largest single entry kept.
HistoryMiB ClipboardHistoryMiB `cfg:"history-mib"`
}
ClipboardConfig is the clipboard section: the session's clipboard history, which the launcher's clipboard mode lists.
Clipboard history settings.
func DefaultsClipboard ¶ added in v0.2.0
func DefaultsClipboard() ClipboardConfig
DefaultsClipboard returns the schema defaults.
type ClipboardHistoryMiB ¶ added in v0.2.0
type ClipboardHistoryMiB struct {
// contains filtered or unexported fields
}
ClipboardHistoryMiB is the history's byte budget, refused at load rather than clamped below the largest entry the history keeps or above the most it can count.
Clipboard history budget in MiB.
func (ClipboardHistoryMiB) Budget ¶ added in v0.2.0
func (m ClipboardHistoryMiB) Budget() clipboard.Budget
Budget is the validated budget.
func (ClipboardHistoryMiB) MarshalConfig ¶ added in v0.2.0
func (m ClipboardHistoryMiB) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*ClipboardHistoryMiB) UnmarshalConfig ¶ added in v0.2.0
func (m *ClipboardHistoryMiB) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type ClockConfig ¶
type ClockConfig struct {
// Format string using strftime syntax.
//
// ## Common Specifiers
//
// - `%H` - Hour (00-23)
// - `%I` - Hour (01-12)
// - `%M` - Minute (00-59)
// - `%S` - Second (00-59)
// - `%p` - AM/PM
// - `%a` - Abbreviated weekday (Mon, Tue)
// - `%A` - Full weekday (Monday)
// - `%b` - Abbreviated month (Jan, Feb)
// - `%B` - Full month (January)
// - `%d` - Day of month (01-31)
// - `%Y` - Year (2024)
//
// ## Examples
//
// - `"%H:%M"` - "14:30"
// - `"%I:%M %p"` - "02:30 PM"
// - `"%a %b %d %I:%M %p"` - "Mon Jan 15 02:30 PM"
Format string `cfg:"format"`
// Symbolic icon name.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display text label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Show seconds in the calendar dropdown clock display.
DropdownShowSeconds bool `cfg:"dropdown-show-seconds"`
// First day of the week in the calendar dropdown.
CalendarWeekdayStart WeekStart `cfg:"calendar-weekday-start"`
}
ClockConfig is ported from crates/wayle-config/src/schemas/modules/clock/mod.rs.
Clock module configuration.
func (ClockConfig) Clicks ¶
func (c ClockConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type ColorExtractorConfig ¶
type ColorExtractorConfig struct {
// Theme provider (lys-shell, matugen, pywal, wallust).
ThemeProvider ThemeProvider `cfg:"theme-provider"`
// Monitor whose wallpaper drives color extraction. Empty uses the first available.
ThemingMonitor string `cfg:"theming-monitor"`
// Matugen color scheme type.
MatugenScheme MatugenScheme `cfg:"matugen-scheme"`
// Matugen contrast level (-1.0 to 1.0).
MatugenContrast SignedNormalizedF64 `cfg:"matugen-contrast"`
// Matugen source color index (0-3).
MatugenSourceColor uint8 `cfg:"matugen-source-color"`
// Matugen light mode.
MatugenLight bool `cfg:"matugen-light"`
// Wallust palette mode.
WallustPalette WallustPalette `cfg:"wallust-palette"`
// Wallust saturation boost (0-100, 0 disables).
WallustSaturation Percentage `cfg:"wallust-saturation"`
// Wallust contrast checking against background.
WallustCheckContrast bool `cfg:"wallust-check-contrast"`
// Wallust image sampling backend.
WallustBackend WallustBackend `cfg:"wallust-backend"`
// Wallust color space for dominant color selection.
WallustColorspace WallustColorspace `cfg:"wallust-colorspace"`
// Apply wallust colors to terminals and external tools.
WallustApplyGlobally bool `cfg:"wallust-apply-globally"`
// Pywal saturation adjustment (0.0-1.0).
PywalSaturation NormalizedF64 `cfg:"pywal-saturation"`
// Pywal minimum contrast ratio (1.0-21.0).
PywalContrast PywalContrast `cfg:"pywal-contrast"`
// Pywal light mode.
PywalLight bool `cfg:"pywal-light"`
// Apply pywal colors to terminals and external tools.
PywalApplyGlobally bool `cfg:"pywal-apply-globally"`
}
ColorExtractorConfig is the slice of [styling] that drives wallpaper color extraction (crates/lys-shell/src/watchers/color_extractor.rs): the provider, the theming monitor, and the matugen-/wallust-/pywal- tool parameters. It is an inline group: its keys sit directly in [styling].
func DefaultsColorExtractor ¶
func DefaultsColorExtractor() ColorExtractorConfig
DefaultsColorExtractor returns the schema defaults.
type ColorKind ¶
type ColorKind uint8
ColorKind distinguishes the ColorValue variants.
ColorValue kinds, mirroring the Rust enum: the context-aware Auto that defers to its consumer (resolved as the accent), a token reference that follows the theme, a fixed hex color, or fully transparent. Auto is the zero kind, so a zero ColorValue defers rather than naming an empty token.
type ColorValue ¶
type ColorValue struct {
Kind ColorKind
Token CssToken
Hex string // #rgb, #rgba, #rrggbb, or #rrggbbaa; valid only for ColorCustom
}
ColorValue is the config color union: "bg-surface" | "#414868" | "transparent" | "auto".
func ParseColorValue ¶
func ParseColorValue(s string) (ColorValue, error)
ParseColorValue decodes one config color string. Unknown token names and malformed hex are errors, with the Rust messages (InvalidCssToken, InvalidHexColor).
func (ColorValue) IsAuto ¶
func (c ColorValue) IsAuto() bool
IsAuto reports whether the value defers to its consumer.
func (ColorValue) MarshalConfig ¶
func (c ColorValue) MarshalConfig() any
MarshalConfig implements Marshaler.
func (ColorValue) ToCSS ¶
func (c ColorValue) ToCSS() string
ToCSS is the value for an inline declaration: a token is its var(), a custom color its hex, transparent the keyword, and Auto the accent var — consumers resolve Auto before calling it. This is the Rust ColorValue::to_css.
func (*ColorValue) UnmarshalConfig ¶
func (c *ColorValue) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type CompositorWorkspacesConfig ¶
type CompositorWorkspacesConfig struct {
MonitorSpecific bool
HideTrailingEmpty bool
DisplayMode DisplayMode
LabelStrategy LabelStrategy
UrgentShow bool
UrgentMode UrgentMode
ActiveIndicator ActiveIndicator
Divider string
AppIconsShow bool
AppIconsDedupe bool
AppIconsFallback string
AppIconsEmpty string
IconGap Size
WorkspacePad Size
IconSize Size
LabelSize Size
WorkspaceIgnore []string
ActiveColor ColorValue
OccupiedColor ColorValue
EmptyColor ColorValue
ContainerBgColor ColorValue
BorderShow bool
BorderColor ColorValue
WorkspaceMap NamedWorkspaceMap
AppIconMap map[string]string
Click WorkspaceClicks
}
CompositorWorkspacesConfig is the view the sway and niri workspace modules share: their two schemas are field-for-field identical.
func (CompositorWorkspacesConfig) AppIconMapKeys ¶
func (c CompositorWorkspacesConfig) AppIconMapKeys() []string
AppIconMapKeys returns the app-icon-map patterns in the order the Rust BTreeMap iterates them: sorted.
type Config ¶
type Config struct {
// YAML files to import and merge before this config.
//
// Paths are relative to the config file.
// Imported values are overridden by values in this file.
//
// “`yaml
// imports: [themes.yaml, modules/clock.yaml]
// “`
Imports []string `cfg:"imports,nolayer"`
// General lys-shell settings.
General GeneralConfig `cfg:"general"`
// Bar layout and module placement.
Bar BarConfig `cfg:"bar"`
// Dropdown foldout panel sizing.
Dropdowns DropdownsConfig `cfg:"dropdowns"`
// Styling configuration (theme, fonts, scale).
Styling StylingConfig `cfg:"styling"`
// Module-specific configurations.
ModulesConfig `cfg:"modules"`
// On-screen display settings.
Osd OsdConfig `cfg:"osd"`
// Login screen settings: the greeter and the lock screen.
Login LoginConfig `cfg:"login"`
SharePicker SharePickerConfig `cfg:"share-picker"`
// Application launcher (rofi replacement) settings.
Launcher LauncherConfig `cfg:"launcher"`
// Animation settings.
Animations AnimationsConfig `cfg:"animations"`
// Wallpaper service settings.
Wallpaper WallpaperConfig `cfg:"wallpaper"`
// Desktop-portal policy for sandboxed apps.
Portal PortalConfig `cfg:"portal"`
// Clipboard history settings.
Clipboard ClipboardConfig `cfg:"clipboard"`
}
Config is the loaded user configuration.
Main configuration structure for lys-shell.
Represents the complete configuration schema that can be loaded from YAML files. All fields have sensible defaults.
func LoadFile ¶
LoadFile loads one main config file with its imports onto the defaults. A file-level failure (unreadable, unparseable, a broken import) returns the defaults with that error. A bad value in one field keeps that field's default and applies the rest; those field errors are returned joined, as diagnostics.
func LoadGreeter ¶
func LoadGreeter(path string, sink DiagnosticSink) (*Config, error)
LoadGreeter is the greeter's config load: the file at path with its imports on the config layer, the sibling runtime.yaml on the runtime layer. Both are system files the greeter only reads: a missing one is its layer left out, never created. A file that fails to load leaves its layer out too (the errors come back joined beside a usable config), so the greeter always renders.
func (*Config) CustomByID ¶
func (c *Config) CustomByID(id string) (CustomModuleDefinition, bool)
CustomByID finds one `modules.custom` definition by id.
type ContainerConfig ¶
type ContainerConfig struct {
BorderShow bool
Background ColorValue
BorderColor ColorValue
DefaultBackground ColorValue
DefaultBorderColor ColorValue
}
ContainerConfig is a bar_container module's keys (cava, systray): border-show, border-color, and button-bg-color, the container background, plus the schema colors.
type CpuConfig ¶
type CpuConfig struct {
// Polling interval in milliseconds.
//
// Faster polling increases CPU usage.
PollIntervalMs uint64 `cfg:"poll-interval-ms"`
// Temperature sensor label.
//
// Use `"auto"` for automatic detection, or specify a
// label (e.g., `"Tctl"`, `"Package id 0"`).
//
// Run `sensors` to see available labels.
TempSensor string `cfg:"temp-sensor"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ percent }}` - CPU usage (0-100)
// - `{{ freq_ghz }}` - Frequency of the busiest core (highest usage)
// - `{{ avg_freq_ghz }}` - Average frequency across cores
// - `{{ max_freq_ghz }}` - Maximum frequency among cores
// - `{{ temp_c }}` - Temperature in Celsius (if available)
// - `{{ temp_f }}` - Temperature in Fahrenheit (if available)
//
// ## Examples
//
// - `"{{ percent }}%"` - "45%"
// - `"{{ percent }}% @ {{ freq_ghz }}GHz"` - "45% @ 3.2GHz"
// - `"{{ percent }}% {{ temp_c }}C"` - "45% 62C"
Format string `cfg:"format"`
// Icon name.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Dynamic color thresholds based on CPU usage percentage.
//
// Entries are checked in order; the last matching entry wins for each
// color slot. Use `above` for high-value warnings (e.g., high CPU usage).
//
// ## Example
//
// “`yaml
// modules:
// cpu:
// thresholds:
// - above: 70
// icon-color: status-warning
// label-color: status-warning
// - above: 90
// icon-color: status-error
// label-color: status-error
// “`
Thresholds []ThresholdEntry `cfg:"thresholds"`
}
CpuConfig is ported from crates/wayle-config/src/schemas/modules/cpu/mod.rs.
CPU usage, frequency, and temperature.
func (CpuConfig) Clicks ¶
func (c CpuConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type CssToken ¶
type CssToken string
CssToken names a design token a ColorValue can reference; the values are the config strings ("bg-surface", "border-accent", ...). The palette-side resolution lives in the styling package; the numeric mix percentages each token resolves through live in styling/tokens.go, ported from styling/css/tokens (crates/wayle-config/src/schemas/styling/types/color.rs CssToken).
const ( // `--bg-base` - Application background. TokenBgBase CssToken = "bg-base" // `--bg-surface` - Elevated surfaces. TokenBgSurface CssToken = "bg-surface" // `--bg-surface-elevated` - Subtle elevation from surface (buttons on surface). TokenBgSurfaceElevated CssToken = "bg-surface-elevated" // `--bg-elevated` - Higher elevation surfaces. TokenBgElevated CssToken = "bg-elevated" // `--bg-overlay` - Popovers, dialogs. TokenBgOverlay CssToken = "bg-overlay" // `--bg-hover` - Hover state background. TokenBgHover CssToken = "bg-hover" // `--bg-active` - Active/pressed state background. TokenBgActive CssToken = "bg-active" // `--bg-selected` - Selected item background. TokenBgSelected CssToken = "bg-selected" // `--fg-default` - Primary text color. TokenFgDefault CssToken = "fg-default" // `--fg-muted` - Secondary text color. TokenFgMuted CssToken = "fg-muted" // `--fg-subtle` - Tertiary/hint text color. TokenFgSubtle CssToken = "fg-subtle" // `--fg-on-accent` - Text color on accent backgrounds. TokenFgOnAccent CssToken = "fg-on-accent" // `--accent` - Primary accent color. TokenAccent CssToken = "accent" // `--accent-subtle` - Subtle accent background. TokenAccentSubtle CssToken = "accent-subtle" // `--accent-hover` - Accent hover state. TokenAccentHover CssToken = "accent-hover" // `--status-error` - Error state color. TokenStatusError CssToken = "status-error" // `--status-warning` - Warning state color. TokenStatusWarning CssToken = "status-warning" // `--status-success` - Success state color. TokenStatusSuccess CssToken = "status-success" // `--status-info` - Info state color. TokenStatusInfo CssToken = "status-info" // `--status-error-subtle` - Subtle error background. TokenStatusErrorSubtle CssToken = "status-error-subtle" // `--status-warning-subtle` - Subtle warning background. TokenStatusWarningSubtle CssToken = "status-warning-subtle" // `--status-success-subtle` - Subtle success background. TokenStatusSuccessSubtle CssToken = "status-success-subtle" // `--status-info-subtle` - Subtle info background. TokenStatusInfoSubtle CssToken = "status-info-subtle" // `--status-error-hover` - Error hover state. TokenStatusErrorHover CssToken = "status-error-hover" // `--red` - Red color for stylistic/decorative use. TokenRed CssToken = "red" // `--yellow` - Yellow color for stylistic/decorative use. TokenYellow CssToken = "yellow" // `--green` - Green color for stylistic/decorative use. TokenGreen CssToken = "green" // `--blue` - Blue color for stylistic/decorative use. TokenBlue CssToken = "blue" // `--border-subtle` - Subtle border color. TokenBorderSubtle CssToken = "border-subtle" // `--border-default` - Default border color. TokenBorderDefault CssToken = "border-default" // `--border-strong` - Strong border color. TokenBorderStrong CssToken = "border-strong" // `--border-accent` - Accent-colored border. TokenBorderAccent CssToken = "border-accent" // `--border-error` - Error state border. TokenBorderError CssToken = "border-error" )
The styling tokens, grouped as in the schema.
type CustomModuleDefinition ¶
type CustomModuleDefinition struct {
// Unique identifier for this module.
//
// Referenced in bar layouts as `custom-<id>`. Must be unique across
// all custom module definitions.
//
// ## Example
//
// “`yaml
// modules:
// custom:
// - id: gpu-temp
//
// # Reference in layout:
// # layout: [custom-gpu-temp, clock]
// “`
Id string `cfg:"id,required"`
// Shell command to execute.
//
// The command runs via `sh -c` and should output to stdout.
// Stderr is discarded. Commands have a 30-second timeout.
//
// ## Output Parsing
//
// - If output starts with `{` or `[`: parsed as JSON
// - Otherwise: treated as plain text
//
// ## Behavior by Mode
//
// - **poll**: Executed every `interval-ms` milliseconds
// - **watch**: Spawned once, each stdout line triggers a display update.
// Restarts are controlled by `restart-policy`.
Command *string `cfg:"command,default"`
// Execution mode for the command.
//
// | Mode | Behavior |
// |------|----------|
// | `poll` | Run command every `interval-ms` (default) |
// | `watch` | Spawn long-running process, update on each stdout line |
//
// Use `poll` for commands that return current state and exit.
// Use `watch` for commands that stream updates (e.g., `pactl subscribe`).
Mode ExecutionMode `cfg:"mode,default"`
// Polling interval in milliseconds.
//
// Only applies to `poll` mode. Ignored in `watch` mode.
//
// Set to `0` for manual polling mode: no timer is started. In manual
// mode, the command still runs once at startup.
IntervalMs uint64 `cfg:"interval-ms,default"`
// Restart policy for watch mode.
//
// Only applies to `watch` mode. Ignored in `poll` mode.
//
// | Policy | Behavior |
// |--------|----------|
// | `never` | Do not restart after exit |
// | `on-exit` | Restart after any exit |
// | `on-failure` | Restart only after non-zero/signal exit |
RestartPolicy RestartPolicy `cfg:"restart-policy,default"`
// Base restart delay in milliseconds for watch mode.
//
// Only applies to `watch` mode. Ignored in `poll` mode.
//
// Used when `restart-policy` is `on-exit` or `on-failure`.
// Delay increases exponentially on rapid failures, capped at 30 seconds.
RestartIntervalMs RestartDelay `cfg:"restart-interval-ms,default"`
// Format string for the label using Jinja2 template syntax.
//
// ## Variables
//
// - `{{ output }}` - Raw command output
// - `{{ field }}` - JSON field access
// - `{{ nested.field }}` - Nested field access
// - `{{ items.0 }}` - Array index access
//
// ## Filters
//
// - `{{ val | default('fallback') }}` - Fallback for missing values
// - `{{ "%02d" | format(val) }}` - Zero-padding
// - `{{ val | upper }}`, `| lower`, `| trim` - String transforms
//
// ## Examples
//
// - `"{{ output }}°C"` - Plain text: "72°C"
// - `"{{ percentage }}%"` - JSON field: "75%"
// - `"{{ data.temp }}°C"` - Nested: "22°C"
//
// If JSON output contains a `text` field, it overrides this format.
Format string `cfg:"format,default"`
// Format string for the tooltip (hover text).
//
// Supports the same Jinja2 syntax as `format`. If not set, no tooltip is shown.
// If JSON output contains a `tooltip` field, it overrides this format.
//
// ## Example
//
// “`yaml
// format: "{{ percentage }}%"
// tooltip-format: "Volume: {{ percentage }}% on {{ device }}"
// “`
TooltipFormat *string `cfg:"tooltip-format,default"`
// Hide module when output is empty, "0", or "false".
//
// When enabled, the module (including its gap in the bar layout) is
// completely hidden if the output indicates an empty/disabled state.
HideIfEmpty bool `cfg:"hide-if-empty,default"`
// Static symbolic icon name.
//
// Used when `icon-names` and `icon-map` don't provide a match.
// Should be a symbolic icon name from the icon theme (e.g., `"ld-gpu-symbolic"`).
//
// ## Example
//
// “`yaml
// icon-name: ld-thermometer-symbolic
// “`
IconName string `cfg:"icon-name,default"`
// Array of icon names indexed by percentage (0-100).
//
// Requires JSON output with a `percentage` field (0-100).
// The array is divided evenly across the percentage range.
//
// ## Resolution
//
// For N icons, icon at index `floor(percentage * N / 101)` is selected:
//
// - 4 icons: 0-24% → [0], 25-49% → [1], 50-74% → [2], 75-100% → [3]
// - 5 icons: 0-19% → [0], 20-39% → [1], 40-59% → [2], 60-79% → [3], 80-100% → [4]
//
// ## Example
//
// “`yaml
// icon-names:
// - ld-battery-symbolic
// - ld-battery-low-symbolic
// - ld-battery-medium-symbolic
// - ld-battery-full-symbolic
// “`
IconNames *[]string `cfg:"icon-names,default"`
// Map of icon names keyed by the `alt` field value.
//
// Requires JSON output with an `alt` field. The `alt` value is looked up
// in this map. Use `"default"` as a fallback key.
//
// **Priority**: `icon-map[alt]` takes precedence over `icon-names[percentage]`,
// allowing state-specific icons to override percentage-based icons.
//
// ## Example
//
// “`yaml
// # Volume with muted state override
// icon-names: [vol-0, vol-33, vol-66, vol-100]
// icon-map: {muted: ld-volume-x-symbolic}
//
// # Output: {"percentage": 50, "alt": "muted"}
// # Result: Uses "ld-volume-x-symbolic" (alt match beats percentage)
//
// # Output: {"percentage": 50}
// # Result: Uses "vol-33" (percentage-based, no alt)
// “`
IconMap *map[string]string `cfg:"icon-map,default"`
// Format string for dynamic CSS classes.
//
// Supports the same Jinja2 syntax as `format`. The formatted result is
// split on whitespace and each word is added as a CSS class.
//
// Combined with the `class` field from JSON output (if present).
//
// ## Example
//
// “`yaml
// class-format: "volume-{{ alt }}"
// # Output: {"alt": "muted"} → adds class "volume-muted"
// “`
ClassFormat *string `cfg:"class-format,default"`
// Display module icon.
IconShow bool `cfg:"icon-show,default"`
// Icon foreground color.
IconColor ColorValue `cfg:"icon-color,default"`
// Icon container background color.
IconBgColor ColorValue `cfg:"icon-bg-color,default"`
// Display text label.
LabelShow bool `cfg:"label-show,default"`
// Label text color.
LabelColor ColorValue `cfg:"label-color,default"`
// Maximum label length in characters before truncation.
//
// When exceeded, label is truncated with ellipsis. Set to `0` to disable.
LabelMaxLength uint32 `cfg:"label-max-length,default"`
// Button background color.
ButtonBgColor ColorValue `cfg:"button-bg-color,default"`
// Display border around button.
BorderShow bool `cfg:"border-show,default"`
// Border color.
BorderColor ColorValue `cfg:"border-color,default"`
// Map of per-state color overrides keyed by the `alt` field value.
//
// Mirrors `icon-map`: the `alt` value from JSON output is looked up in
// this map and the colors set for that state override the module's
// static colors, letting a single widget cycle its colors alongside its
// icon as its state changes. Use `"default"` as a fallback key. Any
// color left unset for the matched state falls back to the module's
// static color of the same name.
//
// ## Example
//
// “`yaml
// icon-map: {muted: ld-volume-x-symbolic}
// color-map:
// muted: {icon-color: red}
// default: {icon-color: green}
//
// # Output: {"percentage": 50, "alt": "muted"}
// # Result: muted icon rendered in red
// “`
ColorMap *map[string]StateColors `cfg:"color-map,default"`
// Action performed on left click.
//
// Supports shell commands and dropdown toggles:
// - `"pavucontrol"` — runs a shell command
// - `"dropdown:audio"` — toggles the named dropdown panel
// - `""` — no action (default)
//
// If `on-action` is set, it runs after shell commands complete.
LeftClick ClickAction `cfg:"left-click,default"`
// Action performed on right click.
//
// Supports shell commands and dropdown toggles (see `left-click`).
// If `on-action` is set, it runs after shell commands complete.
RightClick ClickAction `cfg:"right-click,default"`
// Action performed on middle click.
//
// Supports shell commands and dropdown toggles (see `left-click`).
// If `on-action` is set, it runs after shell commands complete.
MiddleClick ClickAction `cfg:"middle-click,default"`
// Action performed on scroll up.
//
// Supports shell commands and dropdown toggles (see `left-click`).
// Scroll events are debounced (50ms) to coalesce rapid scrolls.
// If `on-action` is set, it runs after shell commands complete.
ScrollUp ClickAction `cfg:"scroll-up,default"`
// Action performed on scroll down.
//
// Supports shell commands and dropdown toggles (see `left-click`).
// Scroll events are debounced (50ms) to coalesce rapid scrolls.
// If `on-action` is set, it runs after shell commands complete.
ScrollDown ClickAction `cfg:"scroll-down,default"`
// Shell command to run after any click/scroll action completes.
//
// Executes after the action handler finishes, and its output updates
// the display immediately. Useful for reflecting state changes without
// waiting for the next poll interval.
//
// ## Example
//
// “`yaml
// # Volume control with immediate feedback
// scroll-up: pactl set-sink-volume @DEFAULT_SINK@ +5%
// scroll-down: pactl set-sink-volume @DEFAULT_SINK@ -5%
// on-action: |
// vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | head -1)
// echo "{\"percentage\": $vol}"
// “`
OnAction *string `cfg:"on-action,default"`
}
CustomModuleDefinition is ported from crates/wayle-config/src/schemas/modules/custom/mod.rs.
User-defined module that runs a shell command and renders the output in the bar.
Full walkthrough with examples in `docs/guide/custom-modules.md`.
func DefaultsCustomModuleDefinition ¶
func DefaultsCustomModuleDefinition() CustomModuleDefinition
DefaultsCustomModuleDefinition returns the schema defaults.
func (CustomModuleDefinition) Button ¶
func (c CustomModuleDefinition) Button() ButtonConfig
Button is a custom module's bar-button view; custom modules resolve an auto icon color to the accent.
func (CustomModuleDefinition) Clicks ¶
func (c CustomModuleDefinition) Clicks() ClickConfig
Clicks returns the five input bindings.
func (CustomModuleDefinition) CommandOrEmpty ¶
func (c CustomModuleDefinition) CommandOrEmpty() string
CommandOrEmpty is the command, empty when unset.
func (CustomModuleDefinition) Icon ¶
func (c CustomModuleDefinition) Icon() IconConfig
Icon is the definition's static icon.
type CyclingInterval ¶
type CyclingInterval uint64
CyclingInterval is the cycling period in minutes, at least 1 (types/cycling.rs CyclingInterval).
Cycling interval in minutes, minimum 1.
const ( CyclingIntervalMin CyclingInterval = 1 CyclingIntervalDefault CyclingInterval = 15 )
The interval's floor and default.
func (CyclingInterval) MarshalConfig ¶
func (c CyclingInterval) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*CyclingInterval) UnmarshalConfig ¶
func (c *CyclingInterval) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler: below the floor clamps with the Rust warning rather than failing.
type CyclingMode ¶
type CyclingMode string
CyclingMode is the order images cycle in (types/cycling.rs).
Wallpaper cycling order.
const ( // Alphabetical order. CyclingSequential CyclingMode = "sequential" // Random order. CyclingShuffle CyclingMode = "shuffle" )
Cycling modes; Sequential is the default.
type DashboardConfig ¶
type DashboardConfig struct {
// Override the auto-detected distro icon.
IconOverride string `cfg:"icon-override"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Shell command for the lock button in the dashboard dropdown.
DropdownLockCommand string `cfg:"dropdown-lock-command"`
// Shell command for the logout button in the dashboard dropdown.
DropdownLogoutCommand string `cfg:"dropdown-logout-command"`
// Shell command for the reboot button in the dashboard dropdown.
DropdownRebootCommand string `cfg:"dropdown-reboot-command"`
// Shell command for the power-off button in the dashboard dropdown.
DropdownPoweroffCommand string `cfg:"dropdown-poweroff-command"`
// CPU/RAM/disk usage percent at which the dashboard rings turn warning.
UsageWarning float32 `cfg:"usage-warning"`
// CPU/RAM/disk usage percent at which the dashboard rings turn error.
UsageError float32 `cfg:"usage-error"`
// CPU temperature (°C) at which the dashboard temp ring turns warning.
TempWarning float32 `cfg:"temp-warning"`
// CPU temperature (°C) at which the dashboard temp ring turns error.
TempError float32 `cfg:"temp-error"`
// Battery percent at or below which the dashboard battery shows warning.
BatteryWarning float32 `cfg:"battery-warning"`
// Battery percent at or below which the dashboard battery shows critical.
BatteryCritical float32 `cfg:"battery-critical"`
// User session configuration
UserSession UserSessionConfig `cfg:"user-session"`
}
DashboardConfig is ported from crates/wayle-config/src/schemas/modules/dashboard/mod.rs.
Quick-access button with a distro icon; opens the dashboard dropdown.
`lys-shell panel dashboard` opens or closes it from a compositor bind, on the focused monitor or the one named.
While it holds the keyboard, the arrow keys move between its controls, Home and End go to the first and the last, Return or Space press the focused one, Escape closes it, and on a slider Left and Right change the value while Up and Down leave it.
func DefaultsDashboard ¶
func DefaultsDashboard() DashboardConfig
DefaultsDashboard returns the schema defaults.
func (DashboardConfig) Clicks ¶
func (c DashboardConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type Diagnostic ¶
type Diagnostic struct {
Kind DiagnosticKind
Title string
Fields [][2]string
Hint string
}
Diagnostic is a user-facing config problem: a title, aligned label/value fields, and an optional hint (crates/wayle-config/src/ diagnostic.rs). A bad value in one field is a diagnostic, not a failed load: the field keeps its default and the rest applies, the way ApplyConfigLayer skips a field that fails to deserialize.
func (Diagnostic) Error ¶
func (d Diagnostic) Error() string
Error lets a diagnostic travel as an error.
func (Diagnostic) Field ¶
func (d Diagnostic) Field(label string) string
Field returns the value of the labelled field, or "".
func (Diagnostic) Plain ¶
func (d Diagnostic) Plain() string
Plain renders the diagnostic without color (to_plain).
func (Diagnostic) String ¶
func (d Diagnostic) String() string
String renders the diagnostic with the ANSI colors the Rust Display uses (owo-colors: red/yellow bold title, cyan labels, green hint).
type DiagnosticKind ¶
type DiagnosticKind int
DiagnosticKind is the severity of a Diagnostic.
const ( DiagnosticError DiagnosticKind = iota DiagnosticWarning )
Kinds.
type DiagnosticSink ¶
type DiagnosticSink func(Diagnostic)
DiagnosticSink receives diagnostics as layers apply. The default writes them colored to stderr, like Diagnostic::emit.
type DisplayMode ¶
type DisplayMode string
DisplayMode is ported from crates/wayle-config/src/schemas/modules/hyprland_workspaces/mod.rs.
What identifies a workspace in the UI.
const ( // Show workspace number or name. DisplayModeLabel DisplayMode = "label" // Show icon from `workspace-map` (falls back to label if unmapped). DisplayModeIcon DisplayMode = "icon" // Show nothing - only app icons visible. DisplayModeNone DisplayMode = "none" )
DisplayMode values.
type DocGroup ¶
type DocGroup struct {
Title string
Rule DocGroupRule
// Arg is the type name, prefix, or field name the rule matches.
Arg string
}
DocGroup is one H2 section of a reference page (ConfigGroup).
type DocGroupRule ¶
type DocGroupRule uint8
DocGroupRule is how a docs group claims fields (GroupRule).
const ( // DocCatchAll takes every field no other group claimed. DocCatchAll DocGroupRule = iota // DocByType takes fields whose type is the named schema type. DocByType // DocPrefix takes fields whose name starts with the argument. DocPrefix // DocStandalone takes the one field named by the argument. DocStandalone )
Group rules.
type DocSection ¶
type DocSection struct {
Name string
// LayoutID is the bar layout name a module goes by; "" for a
// top-level section.
LayoutID string
// ArrayEntry: the section is one entry of a list
// (custom modules, mail accounts, toast presets).
ArrayEntry bool
Groups []DocGroup
// Schema is schema_for! of the section's type: description,
// properties (see PropertyOrder), and its own $defs.
Schema Schema
// Required are the fields without a default, in declaration order.
Required []string
// contains filtered or unexported fields
}
DocSection is one documented schema (a ModuleInfo with its groups).
func DocSections ¶
func DocSections() []DocSection
DocSections is every documented schema, sorted by name as the Rust registry orders them.
func (DocSection) DefaultsYAML ¶
func (s DocSection) DefaultsYAML() string
DefaultsYAML is the page's defaults block: each default as the schema states it (f32 widened to f64) as YAML, under name, modules.name, or a one-entry modules.name list. A None default is skipped, and one holding a None anywhere inside is left out, as the file has no null. "" when nothing remains.
type DropdownSize ¶
type DropdownSize struct {
// Panel width override. Unset uses the built-in default width.
Width *Size `cfg:"width"`
// Panel height cap in pixels (e.g. `"400px"`): the height a panel grows
// to before its lists scroll. Shorter content keeps the panel at its own
// height. Unset grows the panel to its content, up to the monitor. A
// multiplier is an error: the height has no built-in base to scale.
Height *PixelLength `cfg:"height"`
}
DropdownSize is one panel's size override (crates/wayle-config/src/schemas/dropdowns/types.rs).
Size override for a dropdown foldout panel.
Each field is optional: when unset the dropdown keeps its built-in default width (scaled by the global scale) and the height of its content. The width is a [`Size`]: a scale multiplier of the built-in base (e.g. `1.5`) or an absolute pixel length (e.g. `"480px"`). The height is a pixel length only.
type DropdownsConfig ¶
type DropdownsConfig struct {
// Audio dropdown panel size.
Audio DropdownSize `cfg:"audio"`
// Battery dropdown panel size.
Battery DropdownSize `cfg:"battery"`
// Bitwarden dropdown panel size.
Bitwarden DropdownSize `cfg:"bitwarden"`
// Bluetooth dropdown panel size.
Bluetooth DropdownSize `cfg:"bluetooth"`
// Brightness dropdown panel size.
Brightness DropdownSize `cfg:"brightness"`
// Calendar dropdown panel size.
Calendar DropdownSize `cfg:"calendar"`
// Dashboard dropdown panel size.
Dashboard DropdownSize `cfg:"dashboard"`
// Mail dropdown panel size.
Mail DropdownSize `cfg:"mail"`
// Media dropdown panel size.
Media DropdownSize `cfg:"media"`
// Network dropdown panel size.
Network DropdownSize `cfg:"network"`
// Notification dropdown panel size.
Notification DropdownSize `cfg:"notification"`
// Treeman dropdown panel size.
Treeman DropdownSize `cfg:"treeman"`
// Weather dropdown panel size.
Weather DropdownSize `cfg:"weather"`
}
DropdownsConfig is the [dropdowns] section (crates/wayle-config/src/schemas/dropdowns/mod.rs).
Per-dropdown foldout panel sizing.
Each field overrides the size of one bar widget dropdown. Unset fields keep the built-in default (scaled by the global scale).
func (DropdownsConfig) ByName ¶
func (d DropdownsConfig) ByName(name string) (DropdownSize, bool)
ByName returns the size override of the named dropdown (the dropdown:<name> identifiers); ok is false for a dropdown without a sizing key.
type DynamicLauncherConfig ¶
type DynamicLauncherConfig struct {
// App ids granted an install token, with which they install
// desktop launchers with no confirmation dialog (a software center,
// such as `org.gnome.Software`). Every other app asks the user.
InstallTokenApps []string `cfg:"install-token-apps"`
}
DynamicLauncherConfig is the portal.dynamic-launcher section.
Launcher installation policy.
type ExecutionMode ¶
type ExecutionMode string
ExecutionMode is ported from crates/wayle-config/src/schemas/modules/custom/types.rs.
Execution mode for custom module commands.
const ( // Run command at regular intervals defined by `interval-ms`. // // Best for commands that complete quickly and return current state // (e.g., reading a file, querying system status). ExecutionModePoll ExecutionMode = "poll" // Spawn long-running process and update display on each stdout line. // // Best for event-driven updates without polling overhead // (e.g., `pactl subscribe`, `inotifywait`, `tail -f`). // Configure `restart-policy` to control restarts after exit. ExecutionModeWatch ExecutionMode = "watch" )
ExecutionMode values.
type FieldKind ¶
type FieldKind int
FieldKind is the control a leaf's type calls for: what the settings GUI edits it with when a page names only its path.
const ( // FieldOther needs an editor of its own (lists, maps, structs). FieldOther FieldKind = iota // FieldBool is a switch. FieldBool // FieldEnum picks one of Variants. FieldEnum // FieldInt is a whole number in [Min, Max]. FieldInt // FieldFloat is a number in [Min, Max]. FieldFloat // FieldText is edited as the string it encodes to (String, and the // types serializing as one: Size, a monitor target, ...). FieldText )
The kinds.
type FieldMeta ¶
type FieldMeta struct {
Kind FieldKind
// Type is the Rust schema name of the leaf's type (OsdPosition,
// uint32, ...).
Type string
// Variants are an enum's values in schema order.
Variants []string
// Min and Max bound a number: the type's own range, narrowed by a
// validated newtype's (Percentage 0-100, ScaleFactor 0.25-3).
Min, Max float64
// Optional is an Option<T> leaf, which may be unset.
Optional bool
// Elem describes a list's items (nil for anything else).
Elem *FieldMeta
}
FieldMeta describes the leaf at a path for an editor.
type FitMode ¶
type FitMode string
FitMode is how an image is scaled to its monitor (types/fit_mode.rs).
Image scaling mode.
const ( // Scale to cover entire display, cropping excess. FitFill FitMode = "fill" // Scale to fit within display, letterboxing if needed. FitFit FitMode = "fit" // Display at original size, centered. FitCenter FitMode = "center" // Stretch to exactly fill, ignoring aspect ratio. FitStretch FitMode = "stretch" )
Fit modes; Fill is the default.
type FontWeightClass ¶
type FontWeightClass string
FontWeightClass is a typography weight (crates/wayle-config/src/schemas/styling/types/typography.rs).
Font weight class for typography.
Maps to CSS classes like `.weight-normal`, `.weight-bold`, etc. Uses the existing `--weight-*` tokens defined in the stylesheet.
const ( // Normal weight (--weight-normal: 400). WeightNormal FontWeightClass = "normal" // Medium weight (--weight-medium: 500). WeightMedium FontWeightClass = "medium" // Semi-bold weight (--weight-semibold: 600). WeightSemibold FontWeightClass = "semibold" // Bold weight (--weight-bold: 700). WeightBold FontWeightClass = "bold" )
Font weights.
func (FontWeightClass) CSSClass ¶
func (w FontWeightClass) CSSClass() string
CSSClass is the weight class ("weight-medium").
func (FontWeightClass) CSSVar ¶
func (w FontWeightClass) CSSVar() string
CSSVar is the weight's variable name ("--weight-medium").
type Framerate ¶
type Framerate uint32
Framerate is the cava frame rate (modules/cava/types.rs).
Visualization framerate clamped to 1-360 fps.
func (Framerate) MarshalConfig ¶
MarshalConfig implements Marshaler.
func (*Framerate) UnmarshalConfig ¶
UnmarshalConfig implements Unmarshaler.
type FrequencyHz ¶
type FrequencyHz uint32
FrequencyHz is a cava cutoff frequency (modules/cava/types.rs).
Frequency value in Hz, minimum 1 Hz.
Cross-field constraints (high_cutoff > low_cutoff, samplerate/2 > high_cutoff) are validated at the service builder.
func (FrequencyHz) MarshalConfig ¶
func (f FrequencyHz) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*FrequencyHz) UnmarshalConfig ¶
func (f *FrequencyHz) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type GeneralConfig ¶
type GeneralConfig struct {
// Sans-serif font family for UI text and labels.
FontSans string `cfg:"font-sans"`
// Monospace font family for code and technical content.
FontMono string `cfg:"font-mono"`
// Demote overlay surfaces to allow compositor screen tearing.
//
// When enabled, surfaces that would normally use the `overlay` layer
// are demoted to `top`, allowing fullscreen games to use direct scanout.
TearingMode bool `cfg:"tearing-mode"`
}
GeneralConfig is the [general] section (crates/wayle-config/src/schemas/general/mod.rs).
Shell-wide settings that don't belong to any specific module.
func DefaultsGeneral ¶
func DefaultsGeneral() GeneralConfig
DefaultsGeneral returns the schema defaults.
func (GeneralConfig) EffectiveLayer ¶
func (g GeneralConfig) EffectiveLayer(l Layer) Layer
EffectiveLayer applies tearing mode to a surface's configured layer: overlay is demoted to top so fullscreen clients keep direct scanout.
type HexColor ¶
type HexColor struct {
// contains filtered or unexported fields
}
HexColor is a validated GTK4 CSS hex color: #rgb, #rgba, #rrggbb, or #rrggbbaa (wayle-config's styling HexColor). Construct it through ParseHexColor or config decoding; the zero value reads as opaque black.
func ParseHexColor ¶
ParseHexColor validates a hex color string. A missing '#', a digit count other than 3, 4, 6, or 8, or a non-hex character is an error, mirroring the Rust newtype's three failure cases.
func (HexColor) MarshalConfig ¶
MarshalConfig implements Marshaler.
func (HexColor) RGBA ¶
RGBA expands the color to straight-alpha 8-bit channels; the short forms double each digit (#abc is #aabbcc) and a missing alpha is opaque.
func (*HexColor) UnmarshalConfig ¶
UnmarshalConfig implements Unmarshaler.
type HyprlandWorkspacesConfig ¶
type HyprlandWorkspacesConfig struct {
// Minimum number of workspace buttons to display.
//
// When set to 0 (default), only active and occupied workspaces are shown.
// When set to N, at least N buttons are always visible, with empty ones
// using `empty-color` styling.
MinWorkspaceCount uint8 `cfg:"min-workspace-count"`
// Show only workspaces belonging to the bar's monitor.
//
// When true, each bar shows only its monitor's workspaces.
// When false, all workspaces from all monitors are shown.
MonitorSpecific bool `cfg:"monitor-specific"`
// Include special workspaces (scratchpads) in the display.
//
// Special workspaces have negative IDs in Hyprland.
ShowSpecial bool `cfg:"show-special"`
// Pulse animation on workspaces with urgent windows.
//
// When a window requests attention (e.g., terminal bell), the workspace
// button pulses until you switch to it.
UrgentShow bool `cfg:"urgent-show"`
// Where the urgent pulse is applied.
//
// - `workspace`: Entire workspace pulses (default)
// - `application`: Only the app icon(s) belonging to the urgent window
// pulse, falling back to `workspace` when app icons are disabled
UrgentMode UrgentMode `cfg:"urgent-mode"`
// What identifies each workspace button.
//
// - `label`: Shows workspace number (or name if `label-use-name` is true)
// - `icon`: Shows icon from `workspace-map` (falls back to label if unmapped)
// - `none`: Shows nothing - only app icons visible
DisplayMode DisplayMode `cfg:"display-mode"`
// Use workspace name instead of number when displaying labels.
//
// Only applies when `display-mode: label` or as fallback for unmapped
// workspaces in `display-mode: icon`.
LabelUseName bool `cfg:"label-use-name"`
// How workspace numbers are displayed.
//
// - `absolute`: Show actual Hyprland workspace IDs (1, 2, 3, 4, 5, 6...)
// - `relative`: Show numbers relative to monitor's starting workspace.
// If a monitor has workspaces 4, 5, 6 assigned, they display as 1, 2, 3.
// Useful when keybinds use per-monitor numbering.
Numbering Numbering `cfg:"numbering"`
// Text separator between workspace identity and app icons.
//
// Only shown when both `display-mode` is not `none` and `app-icons-show`
// is enabled. Common values: `"|"`, `"·"`, `"-"`.
Divider string `cfg:"divider"`
// Show application icons for windows in each workspace.
//
// When enabled, displays icons for running applications.
// Icons are resolved via `app-icon-map` configuration.
AppIconsShow bool `cfg:"app-icons-show"`
// Deduplicate application icons within a workspace.
//
// When true, shows only one icon per unique window class.
// When false, shows an icon for every window.
AppIconsDedupe bool `cfg:"app-icons-dedupe"`
// Fallback icon for applications not matched by `app-icon-map`.
AppIconsFallback string `cfg:"app-icons-fallback"`
// Icon shown for empty workspaces when `app-icons-show` is enabled.
//
// When a workspace has no windows but is displayed (via `min-workspace-count`),
// this icon appears as a placeholder.
AppIconsEmpty string `cfg:"app-icons-empty"`
// Gap between app icons within a workspace button.
//
// Only applies to spacing between app icons.
IconGap Size `cfg:"icon-gap"`
// Padding along the bar direction for content wider than the circle: app icons, a divider or a long name. Accepts a scale multiplier or pixels (e.g. `"8px"`).
//
// A short label takes no padding. It sets the circle's size instead: at least a digit's width plus this padding on each side.
//
// For horizontal bars, controls horizontal (left/right) padding.
// For vertical bars, controls vertical (top/bottom) padding.
WorkspacePadding Size `cfg:"workspace-padding"`
// Workspace icon size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
//
// Applies to workspace identity icons and custom icons from `workspace-map`.
IconSize Size `cfg:"icon-size"`
// Workspace label and divider size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
//
// Applies to workspace number/name labels and the divider text.
LabelSize Size `cfg:"label-size"`
// Workspaces to hide from the display.
//
// Glob patterns matching workspace IDs. Examples:
// - `"10"` - hide workspace 10
// - `"1?"` - hide workspaces 10-19
WorkspaceIgnore []string `cfg:"workspace-ignore"`
// Visual indicator for the active workspace.
ActiveIndicator ActiveIndicator `cfg:"active-indicator"`
// Highlight workspaces active on other monitors with a different color.
//
// When true, workspaces active on a different monior are highlicted differently.
// When false, workspaces active on a another monitor are not specially highlighted.
//
// This setting only makes sense when `monitor-specific` is false.
HighlightActiveOnOtherMonitor bool `cfg:"highlight-active-on-other-monitor"`
// Color for the active (focused) workspace.
//
// Applied to icons and labels. In `background` indicator mode,
// also used as the button background.
ActiveColor ColorValue `cfg:"active-color"`
// Color for occupied workspaces (has windows but not focused).
//
// Applied to icons and labels.
OccupiedColor ColorValue `cfg:"occupied-color"`
// Color for empty workspaces.
//
// Applied to the empty placeholder icon and labels.
EmptyColor ColorValue `cfg:"empty-color"`
// Background color for the workspaces container.
ContainerBgColor ColorValue `cfg:"container-bg-color"`
// Display border around the workspaces container.
BorderShow bool `cfg:"border-show"`
// Border color for the workspaces container.
BorderColor ColorValue `cfg:"border-color"`
// Active on other minitor indicator color.
//
// Only applies when `highlight-active-on-other-monitor` is `true`.
ActiveOnOtherMonitorColor ColorValue `cfg:"active-on-other-monitor-color"`
// Per-workspace icon and color overrides.
//
// Keys are workspace IDs (use negative for special workspaces).
//
// ## Example
//
// “`yaml
// modules:
// hyprland-workspaces:
// workspace-map:
// "1": {icon: ld-globe-symbolic, color: "#4a90d9"}
// "2": {icon: ld-terminal-symbolic}
// “`
WorkspaceMap WorkspaceMap `cfg:"workspace-map"`
// Application icon mapping with glob pattern support.
//
// Maps window class or title to symbolic icon names. Supports:
// - No prefix: Matches window class (e.g., `"*firefox*"`)
// - `class:` prefix: Explicit class match (e.g., `"class:org.mozilla.*"`)
// - `title:` prefix: Matches window title (e.g., `"title:*YouTube*"`)
//
// User mappings are merged with built-in defaults for common applications.
//
// ## Example
//
// “`yaml
// modules:
// hyprland-workspaces:
// app-icon-map:
// "*firefox*": ld-globe-symbolic
// "title:*YouTube*": ld-youtube-symbolic
// “`
AppIconMap map[string]string `cfg:"app-icon-map"`
// Action on left-clicking a workspace. Default focuses it.
LeftClick WorkspaceClickAction `cfg:"left-click"`
// Action on middle-clicking a workspace.
MiddleClick WorkspaceClickAction `cfg:"middle-click"`
// Action on right-clicking a workspace.
RightClick WorkspaceClickAction `cfg:"right-click"`
// Action on scrolling up over the module. Default focuses the previous workspace.
ScrollUp WorkspaceClickAction `cfg:"scroll-up"`
// Action on scrolling down over the module. Default focuses the next workspace.
ScrollDown WorkspaceClickAction `cfg:"scroll-down"`
}
HyprlandWorkspacesConfig is ported from crates/wayle-config/src/schemas/modules/hyprland_workspaces/mod.rs.
Hyprland workspace indicators with click-to-switch.
func DefaultsHyprlandWorkspaces ¶
func DefaultsHyprlandWorkspaces() HyprlandWorkspacesConfig
DefaultsHyprlandWorkspaces returns the schema defaults.
func (HyprlandWorkspacesConfig) Clicks ¶
func (c HyprlandWorkspacesConfig) Clicks() WorkspaceClicks
Clicks returns the five input bindings.
func (HyprlandWorkspacesConfig) View ¶
func (c HyprlandWorkspacesConfig) View() CompositorWorkspacesConfig
View returns the hyprland module's fields in the shared shape; the numeric workspace map carries over with decimal keys.
type IconConfig ¶
type IconConfig struct {
Show bool
Name string
Color ColorValue
}
IconConfig is the view of a module's icon the bar's icon helpers take: whether it shows, which theme icon, and its color. Module configs build it from their own icon-* keys.
func IconWith ¶
func IconWith(show bool, name string, color ColorValue) IconConfig
IconWith builds an icon view.
type IconMapping ¶
IconMapping is one glob pattern -> icon pair.
type IconPosition ¶
type IconPosition string
IconPosition places a button's icon.
Icon position within bar buttons.
const ( // Icon before label (left for horizontal, top for vertical bars). IconStart IconPosition = "start" // Icon after label (right for horizontal, bottom for vertical bars). IconEnd IconPosition = "end" )
Icon positions.
func (IconPosition) CSSClass ¶
func (p IconPosition) CSSClass() (string, bool)
CSSClass is the class the position adds: "icon-end" for end, none (ok false) for the default start.
type IconSource ¶
type IconSource string
IconSource is ported from crates/wayle-config/src/schemas/modules/notification/types.rs.
Source for resolving notification icons.
const ( // Use per-notification images when provided, otherwise lys-shell's mapped icon. IconSourceAutomatic IconSource = "automatic" // Always use lys-shell's mapped icons regardless of what the app provides. IconSourceMapped IconSource = "mapped" // Use the full application icon chain, falling back to mapped if unavailable. IconSourceApplication IconSource = "application" )
IconSource values.
type IdleInhibitConfig ¶
type IdleInhibitConfig struct {
// Duration in minutes when service starts. 0 means indefinite.
StartupDuration IdleInhibitDuration `cfg:"startup-duration"`
// Icon when idle inhibitor is inactive.
IconInactive string `cfg:"icon-inactive"`
// Icon when idle inhibitor is active.
IconActive string `cfg:"icon-active"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ state }}` - Inhibitor state text (On, Off)
// - `{{ remaining }}` - Time remaining (e.g., "45m", shows "--" when indefinite)
// - `{{ duration }}` - Total duration (e.g., "60m", shows "--" when indefinite)
//
// ## Examples
//
// - `"{{ state }}"` - "On"
// - `"{{ remaining }}/{{ duration }}"` - "45m/60m"
// - `"{{ state }} ({{ remaining }})"` - "On (45m)"
Format string `cfg:"format"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Default toggles indefinite idle inhibit.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click. Default toggles timed idle inhibit.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
IdleInhibitConfig is ported from crates/wayle-config/src/schemas/modules/idle_inhibit/mod.rs.
Toggle that prevents screen dim, lock, and suspend while active.
Controllable from the CLI: `lys-shell idle on|off|duration|remaining|status`.
func DefaultsIdleInhibit ¶
func DefaultsIdleInhibit() IdleInhibitConfig
DefaultsIdleInhibit returns the schema defaults.
func (IdleInhibitConfig) Clicks ¶
func (c IdleInhibitConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (IdleInhibitConfig) Icons ¶
func (c IdleInhibitConfig) Icons() map[string]IconConfig
Icons maps each idle-inhibit state to its icon.
type IdleInhibitDuration ¶ added in v0.2.0
type IdleInhibitDuration struct {
// contains filtered or unexported fields
}
IdleInhibitDuration is a timed inhibition's length, refused at load above the longest the service counts down rather than clamped: its seconds must fit the service's uint32 timer.
Idle inhibit duration in whole minutes, 0 for indefinite.
func (IdleInhibitDuration) Duration ¶ added in v0.2.0
func (d IdleInhibitDuration) Duration() idleinhibit.Duration
Duration is the validated duration.
func (IdleInhibitDuration) MarshalConfig ¶ added in v0.2.0
func (d IdleInhibitDuration) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*IdleInhibitDuration) UnmarshalConfig ¶ added in v0.2.0
func (d *IdleInhibitDuration) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type InvalidFieldError ¶
type InvalidFieldError struct {
Field string
Component string
Reason InvalidFieldReason
}
InvalidFieldError is the Rust Error::InvalidConfigField: a path segment that does not resolve.
func (*InvalidFieldError) Error ¶
func (e *InvalidFieldError) Error() string
type InvalidFieldReason ¶
type InvalidFieldReason int
InvalidFieldReason says why a path segment failed.
const ( FieldNotFound InvalidFieldReason = iota FieldEmptyPath FieldParentNotTable )
Reasons.
func (InvalidFieldReason) String ¶
func (r InvalidFieldReason) String() string
type KeybindModeConfig ¶
type KeybindModeConfig struct {
// Format string for the label.
//
// ## Placeholders
//
// - `{{ mode }}` - Current keybind mode name (shows "default" when inactive)
//
// ## Examples
//
// - `"{{ mode }}"` - "resize"
// - `"Mode: {{ mode }}"` - "Mode: resize"
// - `"[{{ mode }}]"` - "[resize]"
Format string `cfg:"format"`
// Symbolic icon name.
IconName string `cfg:"icon-name"`
// Automatically hide module when no mode is active.
AutoHide bool `cfg:"auto-hide"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display text label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
KeybindModeConfig is ported from crates/wayle-config/src/schemas/modules/keybind_mode/mod.rs.
Current keybind-mode indicator for modal compositors.
func DefaultsKeybindMode ¶
func DefaultsKeybindMode() KeybindModeConfig
DefaultsKeybindMode returns the schema defaults.
func (KeybindModeConfig) Clicks ¶
func (c KeybindModeConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (KeybindModeConfig) Icon ¶
func (c KeybindModeConfig) Icon() IconConfig
Icon is the keybind-mode icon.
type KeyboardInputConfig ¶
type KeyboardInputConfig struct {
// Format string for the label.
//
// ## Placeholders
//
// - `{{ layout }}` - Raw layout name from the compositor (e.g., "English (US)")
// - `{{ alias }}` - User-defined alias from `layout-alias-map`, falls back to `{{ layout }}`
//
// ## Examples
//
// - `"{{ layout }}"` - "English (US)"
// - `"{{ alias }}"` - "EN" (with alias map configured)
Format string `cfg:"format"`
// Symbolic icon name.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display text label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Language name mapping.
//
// ## Example
//
// “`yaml
// modules:
// keyboard-input:
// layout-alias-map:
// English (US): EN
// Czech (QWERTY): Czech
// “`
LayoutAliasMap map[string]string `cfg:"layout-alias-map"`
}
KeyboardInputConfig is ported from crates/wayle-config/src/schemas/modules/keyboard_input/mod.rs.
Active keyboard layout indicator.
func DefaultsKeyboardInput ¶
func DefaultsKeyboardInput() KeyboardInputConfig
DefaultsKeyboardInput returns the schema defaults.
func (KeyboardInputConfig) Clicks ¶
func (c KeyboardInputConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (KeyboardInputConfig) Icon ¶
func (c KeyboardInputConfig) Icon() IconConfig
Icon is the keyboard-input icon.
type LabelStrategy ¶
type LabelStrategy string
LabelStrategy is ported from crates/wayle-config/src/schemas/modules/niri_workspaces/mod.rs.
What identifies each workspace's label.
const ( // Always show the index (e.g. `1`, `2`, `3`). LabelIndex LabelStrategy = "index" // Show the name when set, fall back to the index. LabelNameOrIndex LabelStrategy = "name-or-index" // Show only the name; unnamed workspaces show nothing. LabelNameOnly LabelStrategy = "name-only" // Show both, joined as `"1: web"`. Unnamed workspaces show the index alone. LabelIndexAndName LabelStrategy = "index-and-name" )
LabelStrategy values.
type LauncherCase ¶
type LauncherCase string
LauncherCase is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
Case handling (collapses rofi `-case-sensitive`/`-case-smart`).
const ( // Always case-insensitive. CaseInsensitive LauncherCase = "insensitive" // Sensitive only when the query contains an uppercase char. CaseSmart LauncherCase = "smart" // Always case-sensitive. CaseSensitive LauncherCase = "sensitive" )
LauncherCase values.
type LauncherCombiConfig ¶
type LauncherCombiConfig struct {
// Modes merged into the combined list.
Modes []string `cfg:"modes"`
// Row template (`{mode}`, `{text}`).
DisplayFormat string `cfg:"display-format"`
}
LauncherCombiConfig is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
combi mode settings.
type LauncherConfig ¶
type LauncherConfig struct {
// Surface position on screen.
Location LauncherLocation `cfg:"location"`
// Surface width: a multiplier of the default 720px (`1.0` = default)
// or absolute pixels (e.g. `"800px"`).
Width Size `cfg:"width"`
// Visible result lines.
Lines uint32 `cfg:"lines"`
// Output connector to show on ("" = focused output).
Monitor string `cfg:"monitor"`
// Modes enabled by default (order = tab/kb-mode-next order). Script
// modes are referenced by their `[launcher.scripts]` key.
Modes []string `cfg:"modes"`
// Wrap selection at list edges.
Cycle bool `cfg:"cycle"`
// Matching method.
Matching LauncherMatching `cfg:"matching"`
// Split the query into independently matched words.
Tokenize bool `cfg:"tokenize"`
// Token prefix that negates a token.
NegateChar string `cfg:"negate-char"`
// Strip accents/normalize Unicode while matching.
NormalizeMatch bool `cfg:"normalize-match"`
// Rank results by match quality (off = keep list order, rofi default).
Sort bool `cfg:"sort"`
// Ranking method when `sort` is on.
SortingMethod LauncherSorting `cfg:"sorting-method"`
// Case handling.
Case LauncherCase `cfg:"case"`
// Terminal emulator for terminal apps ("" = autodetect).
Terminal string `cfg:"terminal"`
// Show row icons.
ShowIcons bool `cfg:"show-icons"`
// Icon theme override ("" = system theme).
IconTheme string `cfg:"icon-theme"`
// Show mode tabs at the bottom of the surface.
SidebarMode bool `cfg:"sidebar-mode"`
// Accept automatically when exactly one result remains.
AutoSelect bool `cfg:"auto-select"`
// Select the row under the mouse cursor.
HoverSelect bool `cfg:"hover-select"`
// Keep the list height fixed at `lines` rows.
FixedNumLines bool `cfg:"fixed-num-lines"`
// Per-mode display-name overrides (rofi `display-{mode}`), e.g.
// `drun: apps`.
DisplayNames map[string]string `cfg:"display-names"`
// Custom script modes: name → executable (rofi `name:script`).
Scripts map[string]string `cfg:"scripts"`
// Keybinding overrides: action (rofi `kb-` name without the prefix,
// e.g. `accept`, `cancel`, `mode-next`, `custom-1`) → comma-separated
// key list (e.g. `"Control+Tab,F3"`). Unset actions keep rofi's
// defaults.
Keybindings map[string]string `cfg:"keybindings"`
// Mouse binding overrides: action (rofi's `me-`/`ml-` name, prefix
// included, e.g. `me-accept-entry`, `ml-row-down`) → comma-separated
// button list (e.g. `"MouseDPrimary"`, `"ScrollDown"`). Unset actions
// keep their defaults.
MouseBindings map[string]string `cfg:"mouse-bindings"`
// Launcher font, as a Pango description (`"Inter 12"`). Empty keeps the
// shell's font. rofi's `-font` overrides it per invocation.
Font string `cfg:"font"`
// Named looks selectable per invocation with `-style <name>`: name →
// the CSS applied for that session, on top of `[styling]`.
//
// CSS rather than a second copy of the display keys: a preset exists to
// say "this invocation looks different", and there is no list of the
// ways someone might want that. `-style compact` then costs one config
// entry instead of a schema change.
Styles map[string]string `cfg:"styles"`
// Command that turns a `thumbnail://` row icon into an image file:
// `{input}` the icon's path, `{output}` where to write the thumbnail,
// `{size}` the requested pixel size. Empty uses the system's XDG
// thumbnailers. rofi's `-preview-cmd`.
PreviewCmd string `cfg:"preview-cmd"`
// Launch history / frecency.
History LauncherHistoryConfig `cfg:"history"`
// drun (application) mode.
Drun LauncherDrunConfig `cfg:"drun"`
// run (command) mode.
Run LauncherRunConfig `cfg:"run"`
// window switcher mode.
Window LauncherWindowConfig `cfg:"window"`
// ssh mode.
SSH LauncherSSHConfig `cfg:"ssh"`
// file browser mode.
Filebrowser LauncherFilebrowserConfig `cfg:"filebrowser"`
// combi (combined modes) mode.
Combi LauncherCombiConfig `cfg:"combi"`
// The search panel, `lys-shell launcher` with no arguments.
Search LauncherSearchConfig `cfg:"search"`
}
LauncherConfig is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
Application launcher / dmenu (rofi replacement).
func DefaultsLauncher ¶
func DefaultsLauncher() LauncherConfig
DefaultsLauncher returns the schema defaults.
type LauncherDrunConfig ¶
type LauncherDrunConfig struct {
// Only show apps within these categories (empty = all).
Categories []string `cfg:"categories"`
// Hide apps within these categories.
ExcludeCategories []string `cfg:"exclude-categories"`
// Desktop-entry fields fed to the matcher.
MatchFields []LauncherDrunField `cfg:"match-fields"`
// Row template: `{name}`, `{generic}`, `{exec}`, `{categories}`,
// `{comment}`; `[..]` renders only when its placeholders are non-empty.
DisplayFormat string `cfg:"display-format"`
// Expose desktop-file actions as extra rows.
ShowActions bool `cfg:"show-actions"`
// Command opening `Type=Link` entries.
URLLauncher string `cfg:"url-launcher"`
}
LauncherDrunConfig is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
drun (application) mode settings.
type LauncherDrunField ¶
type LauncherDrunField string
LauncherDrunField is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
Desktop-entry fields searched by drun (rofi `-drun-match-fields`).
const ( // Localized Name. DrunFieldName LauncherDrunField = "name" // GenericName. DrunFieldGeneric LauncherDrunField = "generic" // Exec command line. DrunFieldExec LauncherDrunField = "exec" // Categories list. DrunFieldCategories LauncherDrunField = "categories" // Comment. DrunFieldComment LauncherDrunField = "comment" // Keywords list. DrunFieldKeywords LauncherDrunField = "keywords" )
LauncherDrunField values.
type LauncherFileSort ¶
type LauncherFileSort string
LauncherFileSort is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
File sorting in the file browser (rofi filebrowser `sorting-method`).
const ( // By file name. FileSortName LauncherFileSort = "name" // By modification time. FileSortMtime LauncherFileSort = "mtime" // By access time. FileSortAtime LauncherFileSort = "atime" // By creation time. FileSortCtime LauncherFileSort = "ctime" )
LauncherFileSort values.
type LauncherFilebrowserConfig ¶
type LauncherFilebrowserConfig struct {
// Start directory ("" = home).
Directory string `cfg:"directory"`
// File ordering.
SortingMethod LauncherFileSort `cfg:"sorting-method"`
// List directories before files.
DirectoriesFirst bool `cfg:"directories-first"`
// Show hidden files.
ShowHidden bool `cfg:"show-hidden"`
// Command opening the picked file ("" = xdg-open).
Command string `cfg:"command"`
}
LauncherFilebrowserConfig is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
file browser mode settings.
type LauncherHistoryConfig ¶
type LauncherHistoryConfig struct {
// Record launches and rank frequently used entries first.
Enable bool `cfg:"enable"`
// Maximum remembered entries per mode.
MaxSize uint32 `cfg:"max-size"`
}
LauncherHistoryConfig is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
Launch history / frecency settings.
type LauncherLocation ¶
type LauncherLocation string
LauncherLocation is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
Launcher surface position (rofi `-location` 0-8 grid).
const ( // Centered (rofi location 0). LauncherCenter LauncherLocation = "center" // Top-left (1). LauncherNorthWest LauncherLocation = "north-west" // Top edge (2). LauncherNorth LauncherLocation = "north" // Top-right (3). LauncherNorthEast LauncherLocation = "north-east" // Right edge (4). LauncherEast LauncherLocation = "east" // Bottom-right (5). LauncherSouthEast LauncherLocation = "south-east" // Bottom edge (6). LauncherSouth LauncherLocation = "south" // Bottom-left (7). LauncherSouthWest LauncherLocation = "south-west" // Left edge (8). LauncherWest LauncherLocation = "west" )
LauncherLocation values.
func LauncherLocationFromRofi ¶
func LauncherLocationFromRofi(n int) (LauncherLocation, bool)
LauncherLocationFromRofi maps rofi's numeric -location onto the schema enum; false outside 0..8.
type LauncherMatching ¶
type LauncherMatching string
LauncherMatching is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
Matching method (rofi `-matching`).
const ( // Tokenized substring matching. MatchingNormal LauncherMatching = "normal" // Regular expression. MatchingRegex LauncherMatching = "regex" // Glob patterns per token. MatchingGlob LauncherMatching = "glob" // fzf-style fuzzy matching. MatchingFuzzy LauncherMatching = "fuzzy" // Tokenized prefix matching. MatchingPrefix LauncherMatching = "prefix" )
LauncherMatching values.
type LauncherQuicklink ¶ added in v0.3.1
type LauncherQuicklink struct {
// Name shown and searched.
Name string `cfg:"name"`
// URL to open, with `{query}` where a query goes if it takes one.
URL string `cfg:"url"`
// Word that leads a query for this link: `gh` makes `gh rust` search it.
Keyword string `cfg:"keyword"`
// Icon name or file (empty is a link icon).
Icon string `cfg:"icon"`
}
LauncherQuicklink is a [launcher] schema type.
A link in the search panel.
type LauncherRunConfig ¶
type LauncherRunConfig struct {
// Plain accept template (`{cmd}`).
RunCommand string `cfg:"run-command"`
// Run-in-terminal template (`{terminal}`, `{cmd}`).
ShellCommand string `cfg:"shell-command"`
// Extra command whose stdout lines add entries.
ListCommand string `cfg:"list-command"`
}
LauncherRunConfig is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
run (command) mode settings.
type LauncherSSHConfig ¶
type LauncherSSHConfig struct {
// SSH client binary.
Client string `cfg:"client"`
// Connect template (`{terminal}`, `{ssh-client}`, `{host}`).
Command string `cfg:"command"`
// Include hosts from `/etc/hosts`.
ParseHosts bool `cfg:"parse-hosts"`
// Include hosts from `~/.ssh/known_hosts`.
ParseKnownHosts bool `cfg:"parse-known-hosts"`
}
LauncherSSHConfig is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
ssh mode settings.
type LauncherSearchConfig ¶ added in v0.3.1
type LauncherSearchConfig struct {
// What the list searches, and what it leaves out by omission.
Providers []LauncherSearchProvider `cfg:"providers"`
// Web search fallback: the engine's name, shown on the row.
WebEngine string `cfg:"web-engine"`
// Web search fallback: the URL, with `{query}` where the search goes.
WebURL string `cfg:"web-url"`
// Directories the file index walks (`~` allowed). Empty indexes the home
// directory.
FileRoots []string `cfg:"file-roots"`
// Directory names the file index skips, on top of hidden ones and the
// built-in list (`node_modules`, `vendor`, `target`, ...).
FileExclude []string `cfg:"file-exclude"`
// Directory of script commands. Empty uses `launcher/commands` in the
// config directory.
CommandsDir string `cfg:"commands-dir"`
// Show the side pane for files, snippets and clipboard entries.
Previews bool `cfg:"previews"`
// Links to open by name or keyword.
Quicklinks []LauncherQuicklink `cfg:"quicklinks"`
// Text to copy by name or keyword.
Snippets []LauncherSnippet `cfg:"snippets"`
}
LauncherSearchConfig is a [launcher] schema type.
The search panel: one ranked list over apps, windows, files and more.
type LauncherSearchProvider ¶ added in v0.3.1
type LauncherSearchProvider string
LauncherSearchProvider is a [launcher] schema type.
A source of rows in the search panel.
const ( // Desktop entries, with their actions. SearchApps LauncherSearchProvider = "apps" // Open windows to jump to. SearchWindows LauncherSearchProvider = "windows" // Recent files and the file index. SearchFiles LauncherSearchProvider = "files" // Inline arithmetic and unit conversion. SearchCalculator LauncherSearchProvider = "calculator" // Lock, suspend, log out, reboot, shut down. SearchSystem LauncherSearchProvider = "system" // Pages of lys-settings. SearchSettings LauncherSearchProvider = "settings" // The clipboard history. SearchClipboard LauncherSearchProvider = "clipboard" // The emoji table. SearchEmoji LauncherSearchProvider = "emoji" // The Bitwarden vault. SearchVault LauncherSearchProvider = "vault" // Quick links and snippets. SearchLinks LauncherSearchProvider = "links" // Bookmarks of the installed browsers (Firefox and Chromium families). SearchBookmarks LauncherSearchProvider = "browser-bookmarks" // The most visited pages in the installed browsers' history. SearchVisited LauncherSearchProvider = "browser-history" // Do not disturb, Wi-Fi, Bluetooth and the audio output. SearchToggles LauncherSearchProvider = "quick-toggles" // Play, pause and skip on the active media player. SearchMedia LauncherSearchProvider = "media" // Screenshots, screen recording and the color picker. SearchCapture LauncherSearchProvider = "capture" // A list of your running processes to end one. SearchProcesses LauncherSearchProvider = "processes" // Script commands from the commands directory. SearchScripts LauncherSearchProvider = "scripts" // `>command` runs a shell command. SearchShell LauncherSearchProvider = "shell" // The web search fallback. SearchWeb LauncherSearchProvider = "web" )
LauncherSearchProvider values.
type LauncherSnippet ¶ added in v0.3.1
type LauncherSnippet struct {
// Name shown and searched.
Name string `cfg:"name"`
// The text Enter copies.
Text string `cfg:"text"`
// Extra word it is found by.
Keyword string `cfg:"keyword"`
}
LauncherSnippet is a [launcher] schema type.
A piece of text in the search panel.
type LauncherSorting ¶
type LauncherSorting string
LauncherSorting is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
Result sorting method (rofi `-sorting-method`).
const ( // Levenshtein distance to the query (rofi "normal"). SortingLevenshtein LauncherSorting = "levenshtein" // fzf match-quality score. SortingFzf LauncherSorting = "fzf" )
LauncherSorting values.
type LauncherWindowConfig ¶
type LauncherWindowConfig struct {
// Row template: `{w}` workspace, `{c}` class, `{t}` title, `{n}` name,
// `{r}` role.
Format string `cfg:"format"`
// Window fields fed to the matcher.
MatchFields []LauncherWindowField `cfg:"match-fields"`
// Hide the currently focused window from the list.
HideActive bool `cfg:"hide-active"`
// Shift-delete closes the selected window.
CloseOnDelete bool `cfg:"close-on-delete"`
}
LauncherWindowConfig is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
window switcher mode settings.
type LauncherWindowField ¶
type LauncherWindowField string
LauncherWindowField is a [launcher] schema type (launcher/mod.rs, launcher/types.rs).
Window fields searched by window mode (rofi `-window-match-fields`).
const ( // Window title. WindowFieldTitle LauncherWindowField = "title" // Application class/app-id. WindowFieldClass LauncherWindowField = "class" // Window name. WindowFieldName LauncherWindowField = "name" // Window role. WindowFieldRole LauncherWindowField = "role" // Workspace/desktop name. WindowFieldDesktop LauncherWindowField = "desktop" )
LauncherWindowField values.
type Layer ¶
type Layer string
Layer is the layer-shell layer a surface is placed on.
Layer-shell layer a window is placed on, from furthest back to furthest front.
const ( // Below everything else, used for wallpapers and ambient surfaces. LayerBackground Layer = "background" // Behind regular application windows. LayerBottom Layer = "bottom" // Above regular application windows. LayerTop Layer = "top" // Above everything, including fullscreen application windows. LayerOverlay Layer = "overlay" )
Layers.
type LoadError ¶
type LoadError struct {
// contains filtered or unexported fields
}
LoadError is a whole-file failure: the file (or an import) could not be read or parsed. The cause is available through errors.Unwrap.
type Location ¶
type Location string
Location is the bar's screen edge.
Bar position on screen.
const ( // Top edge of the screen. LocationTop Location = "top" // Bottom edge of the screen. LocationBottom Location = "bottom" // Left edge of the screen. LocationLeft Location = "left" // Right edge of the screen. LocationRight Location = "right" )
Bar locations.
func (Location) IsVertical ¶
IsVertical reports whether a bar at the location runs top to bottom.
type LockBackground ¶
type LockBackground string
LockBackground is how the lock screen and the greeter draw their background (lock/types.rs).
How the lock screen background is rendered.
const ( // Solid color fill (`background-color`). BackgroundColor LockBackground = "color" // A specific image file (`background-image`). BackgroundImage LockBackground = "image" // Reuse the current desktop wallpaper. BackgroundWallpaper LockBackground = "wallpaper" )
Background modes.
type LockBlur ¶ added in v0.2.0
type LockBlur struct {
// contains filtered or unexported fields
}
LockBlur is the lock background's blur, refused at load above MaxLockBlur rather than clamped.
Lock background blur in pixels, 0 for none.
func NewLockBlur ¶ added in v0.2.0
NewLockBlur validates a blur of sigma pixels.
func (LockBlur) MarshalConfig ¶ added in v0.2.0
MarshalConfig implements Marshaler.
func (LockBlur) Sigma ¶ added in v0.2.0
Sigma is the gaussian's standard deviation in the background's pixels, 0 for none.
func (*LockBlur) UnmarshalConfig ¶ added in v0.2.0
UnmarshalConfig implements Unmarshaler.
type LockdownConfig ¶
type LockdownConfig struct {
// Refuse printing.
DisablePrinting bool `cfg:"disable-printing"`
// Refuse saving files through the file chooser.
DisableSaveToDisk bool `cfg:"disable-save-to-disk"`
// Refuse opening URIs and files in other applications.
DisableApplicationHandlers bool `cfg:"disable-application-handlers"`
// Refuse location access.
DisableLocation bool `cfg:"disable-location"`
// Refuse camera access.
DisableCamera bool `cfg:"disable-camera"`
// Refuse microphone access.
DisableMicrophone bool `cfg:"disable-microphone"`
// Refuse sound output.
DisableSoundOutput bool `cfg:"disable-sound-output"`
}
LockdownConfig is the portal.lockdown section: the Lockdown portal properties the frontend consults before letting an app print, save, or use a device. They are read from here; the D-Bus properties cannot be written.
Features no app may use while set.
type LoginConfig ¶ added in v0.2.0
type LoginConfig struct {
// Background is background-mode, background-image, and
// background-color.
Background Background `cfg:",inline"`
// Gaussian blur radius applied to image/wallpaper backgrounds (0 = none).
Blur LockBlur `cfg:"blur"`
// Show a clock above the credential prompt.
ShowClock bool `cfg:"show-clock"`
// `strftime` format for the time.
ClockFormat StrftimeFormat `cfg:"clock-format"`
// `strftime` format for the date.
DateFormat StrftimeFormat `cfg:"date-format"`
// Lock screen only. Maximum failed password attempts before further
// input is blocked
// (`0` = unlimited). A locked session stays locked regardless.
MaxAttempts uint32 `cfg:"max-attempts"`
// Lock screen only. Show the failed-attempt count.
ShowFailedAttempts bool `cfg:"show-failed-attempts"`
// The lock screen's own settings.
Lock LoginLockConfig `cfg:"lock"`
// The greeter's own settings.
Greeter LoginGreeterConfig `cfg:"greeter"`
}
LoginConfig is the login screen: one screen, run as the greeter before login and as the lock screen in the session, so both look and behave alike. The keys here apply to both, except the failed-attempt keys only the lock screen counts; `greeter` and `lock` hold what only one of them has.
Login screen: the greeter and the lock screen, one screen in two modes.
The greeter reads the system config (`/etc/lys-shell/config.yaml`), the lock screen the user's: copy or symlink your user config if you want the greeter to follow it.
func DefaultsLogin ¶ added in v0.2.0
func DefaultsLogin() LoginConfig
DefaultsLogin returns the schema defaults.
type LoginGreeterConfig ¶ added in v0.2.0
type LoginGreeterConfig struct {
// Show clickable avatars for the machine's login users.
ShowUserList bool `cfg:"show-user-list"`
// Show the shutdown/reboot buttons at the bottom of the screen.
ShowPowerButtons bool `cfg:"show-power-buttons"`
// Xcursor theme used on the login screen (empty = system default).
CursorTheme string `cfg:"cursor-theme"`
// Logical cursor size on the login screen. Scaled automatically per
// display, so HiDPI outputs get a matching high-resolution cursor.
CursorSize uint32 `cfg:"cursor-size"`
// CursorThemeExplicit and CursorSizeExplicit record that a layer
// set the key: explicit values beat cursor auto-detection, schema
// defaults do not.
CursorThemeExplicit bool `cfg:"-"`
CursorSizeExplicit bool `cfg:"-"`
}
LoginGreeterConfig is login.greeter.
Greeter mode: the login screen before login, as the display manager.
type LoginLockConfig ¶ added in v0.2.0
type LoginLockConfig struct {
// Let lys-shell handle session locking. When off, lock requests are ignored
// and an external locker (e.g. hyprlock) stays responsible.
Enabled bool `cfg:"enabled"`
// Lock the session as soon as the shell starts. For autologin setups
// (e.g. greetd with no password at boot) where the lock screen is the
// access gate: the session comes up locked and requires the password
// before use. Off by default — a normal login has already authenticated.
LockOnStart bool `cfg:"lock-on-start"`
// Grace window after locking during which the screen unlocks without a
// password (milliseconds, `0` = always require the password).
GracePeriodMS uint32 `cfg:"grace-period-ms"`
// Black out the lock screen after this idle time (milliseconds, `0` =
// never). This is a visual blank that hides the clock/prompt and dismisses
// on any key; true display power-off (DPMS) is left to your idle daemon.
BlankTimeoutMS uint32 `cfg:"blank-timeout-ms"`
// PAM service name used to authenticate the unlock. Distro-dependent:
// `system-auth` (Arch/Fedora), `login`, or a custom `/etc/pam.d` entry.
PamService string `cfg:"pam-service"`
}
LoginLockConfig is login.lock.
Lock mode: the login screen locking the session via `ext-session-lock-v1`.
When `enabled`, the session locks in response to the logind `Lock` signal (`loginctl lock-session`), the `lys-shell lock` CLI, or the shell IPC `lock()` method. The lock surface grabs all input and survives client crashes (the compositor shows a solid color), unlike a layer-shell overlay.
type LysWMWorkspacesConfig ¶ added in v0.2.0
type LysWMWorkspacesConfig struct {
// Show only workspaces on this bar's monitor.
//
// When `true` (default), each bar shows only its own output's
// workspaces. When `false`, all workspaces from every output are shown.
MonitorSpecific bool `cfg:"monitor-specific"`
// What identifies each workspace button.
//
// - `label` (default): show the workspace number
// - `icon`: show an icon from `workspace-map` (falls back to label if unmapped)
// - `none`: show nothing — only app icons visible (if enabled)
DisplayMode DisplayMode `cfg:"display-mode"`
// Pulse animation on workspaces with urgent windows.
UrgentShow bool `cfg:"urgent-show"`
// Where the urgent pulse is applied.
//
// - `workspace` (default): whole button pulses
// - `application`: only the urgent app icon pulses, falling back to
// `workspace` when app icons are disabled
UrgentMode UrgentMode `cfg:"urgent-mode"`
// Visual indicator for the active workspace.
ActiveIndicator ActiveIndicator `cfg:"active-indicator"`
// Text separator between workspace identity and app icons.
Divider string `cfg:"divider"`
// Show application icons for windows on each workspace.
AppIconsShow bool `cfg:"app-icons-show"`
// Deduplicate application icons within a workspace.
//
// When `true`, one icon per unique `app_id`. When `false`, one icon
// per window.
AppIconsDedupe bool `cfg:"app-icons-dedupe"`
// Fallback icon for applications not matched by `app-icon-map`.
AppIconsFallback string `cfg:"app-icons-fallback"`
// Icon shown when a workspace has no application windows.
AppIconsEmpty string `cfg:"app-icons-empty"`
// Gap between app icons within a workspace button. Accepts a scale multiplier or pixels (e.g. `"4px"`).
IconGap Size `cfg:"icon-gap"`
// Padding along the bar direction for content wider than the circle: app icons, a divider or a long name. Accepts a scale multiplier or pixels (e.g. `"8px"`).
//
// A short label takes no padding. It sets the circle's size instead: at least a digit's width plus this padding on each side.
WorkspacePadding Size `cfg:"workspace-padding"`
// Workspace icon size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
//
// Applies to identity icons and custom icons from `workspace-map`.
IconSize Size `cfg:"icon-size"`
// Workspace label and divider size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
LabelSize Size `cfg:"label-size"`
// Workspaces to hide from the display.
//
// Glob patterns matched against the workspace number. Example:
// - `"1?"` — hide numbers 10-19
WorkspaceIgnore []string `cfg:"workspace-ignore"`
// Color for the active (visible on its output) workspace.
//
// In `background` indicator mode, also used as the button background.
ActiveColor ColorValue `cfg:"active-color"`
// Color for occupied workspaces (have windows but not active).
OccupiedColor ColorValue `cfg:"occupied-color"`
// Color for empty workspaces and placeholder slots.
EmptyColor ColorValue `cfg:"empty-color"`
// Background color for the workspaces container.
ContainerBgColor ColorValue `cfg:"container-bg-color"`
// Display border around the workspaces container.
BorderShow bool `cfg:"border-show"`
// Border color for the workspaces container.
BorderColor ColorValue `cfg:"border-color"`
// Per-workspace icon and color overrides, keyed by workspace number.
//
// ## Example
//
// “`yaml
// modules:
// lys-wm-workspaces:
// workspace-map:
// "1": {icon: ld-globe-symbolic, color: "#4a90d9"}
// "2": {icon: ld-terminal-symbolic}
// “`
WorkspaceMap NamedWorkspaceMap `cfg:"workspace-map"`
// Application icon mapping with glob pattern support.
//
// Maps window `app_id` or title to symbolic icon names. Supports:
// - No prefix: matches `app_id` (e.g. `"*firefox*"`)
// - `app:` prefix: explicit `app_id` match (e.g. `"app:org.mozilla.*"`)
// - `title:` prefix: matches window title (e.g. `"title:*YouTube*"`)
//
// ## Example
//
// “`yaml
// modules:
// lys-wm-workspaces:
// app-icon-map:
// "*firefox*": ld-globe-symbolic
// "title:*YouTube*": ld-youtube-symbolic
// “`
AppIconMap map[string]string `cfg:"app-icon-map"`
// Action on left click.
LeftClick WorkspaceClickAction `cfg:"left-click"`
// Action on middle click.
MiddleClick WorkspaceClickAction `cfg:"middle-click"`
// Action on right click.
RightClick WorkspaceClickAction `cfg:"right-click"`
// Action on scroll up.
ScrollUp WorkspaceClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown WorkspaceClickAction `cfg:"scroll-down"`
}
LysWMWorkspacesConfig is the lys-wm module: lys-wm's numbered workspaces, per output, with click-to-switch through lys-wm's IPC.
lys-wm workspace indicators with click-to-switch.
func DefaultsLysWMWorkspaces ¶ added in v0.2.0
func DefaultsLysWMWorkspaces() LysWMWorkspacesConfig
DefaultsLysWMWorkspaces returns the schema defaults.
func (LysWMWorkspacesConfig) Clicks ¶ added in v0.2.0
func (c LysWMWorkspacesConfig) Clicks() WorkspaceClicks
Clicks returns the five input bindings.
func (LysWMWorkspacesConfig) View ¶ added in v0.2.0
func (c LysWMWorkspacesConfig) View() CompositorWorkspacesConfig
View returns the lys-wm module in the shared shape: its workspaces have numbers and no names, and lys-wm keeps no trailing empty one.
type MailAccount ¶
type MailAccount struct {
// Display name shown in the dropdown.
Name string `cfg:"name,required"`
// notmuch query whose match count is this account's unread total.
Query string `cfg:"query,required"`
// Provider, selecting the default brand icon.
Provider MailProvider `cfg:"provider,default"`
// Optional icon override. Empty uses the provider's default icon.
Icon *string `cfg:"icon,default"`
}
MailAccount is ported from crates/wayle-config/src/schemas/modules/mail/account.rs.
One mail account in the `modules.mail` per-account breakdown.
Each account has its own notmuch query; the dropdown shows the per-account unread counts and the bar shows their sum.
## Example
```yaml modules: {mail: {accounts: [{name: Work, query: "folder:work/INBOX and tag:unread", provider: gmail}]}} ```
func DefaultsMailAccount ¶
func DefaultsMailAccount() MailAccount
DefaultsMailAccount returns the schema defaults.
func (MailAccount) ResolvedIcon ¶
func (a MailAccount) ResolvedIcon() string
ResolvedIcon is the account's icon: its own when set and non-empty, else the provider's (MailAccount::resolved_icon).
type MailConfig ¶
type MailConfig struct {
// Format string for the label.
//
// ## Placeholders
//
// - `{{ count }}` - Number of messages matching the query
//
// ## Examples
//
// - `"{{ count }}"` - "3"
Format string `cfg:"format"`
// notmuch search query whose match count is shown.
//
// Any query `notmuch count` accepts, e.g. `tag:unread`,
// `tag:unread and tag:inbox`, `folder:work and tag:unread`.
//
// Ignored when `accounts` is non-empty — the bar count is then the sum of
// the per-account queries.
Query string `cfg:"query"`
// Per-account unread breakdown shown in the mail dropdown. Each account
// has its own notmuch query and a provider (for its icon). When set, the
// bar count/label is the sum across accounts and `query` is ignored.
Accounts []MailAccount `cfg:"accounts"`
// Hide the module entirely while the count is zero.
HideWhenZero bool `cfg:"hide-when-zero"`
// Fire a desktop notification when the unread count
// rises — i.e. new mail arrives. One notification per newly-arrived
// message (capped per burst), showing its sender and subject. With
// `accounts` configured, each notification uses that account's provider
// icon; otherwise the module icon is used.
Notify bool `cfg:"notify"`
// Notification summary when new mail arrives.
//
// ## Placeholders
//
// - `{{ sender }}` - Message sender (name or address)
// - `{{ subject }}` - Message subject
// - `{{ count }}` - Total messages matching the query
// - `{{ new }}` - How many arrived since the last count
NotifySummary string `cfg:"notify-summary"`
// Notification body when new mail arrives. Same placeholders as
// `notify-summary`.
NotifyBody string `cfg:"notify-body"`
// Module icon.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Defaults to opening the per-account dropdown; set
// to empty for no action, or a shell command (e.g. your mail client).
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
MailConfig is ported from crates/wayle-config/src/schemas/modules/mail/mod.rs.
Unread mail count, backed by a notmuch query.
Runs `notmuch count <query>` and re-queries whenever the maildir changes (event-driven via an inotify watch on the notmuch database path). Hidden while the count is zero when `hide-when-zero` is set.
func (MailConfig) Clicks ¶
func (c MailConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type MailProvider ¶
type MailProvider string
MailProvider is ported from crates/wayle-config/src/schemas/modules/mail/account.rs.
Mail provider, used to pick a default brand icon for an account.
const ( // Generic mailbox; uses the plain mail glyph. MailProviderGeneric MailProvider = "generic" // Gmail. MailProviderGmail MailProvider = "gmail" // Microsoft Outlook. MailProviderOutlook MailProvider = "outlook" // Apple iCloud Mail. MailProviderIcloud MailProvider = "icloud" // Proton Mail. MailProviderProton MailProvider = "proton" // Fastmail. MailProviderFastmail MailProvider = "fastmail" // Yahoo Mail. MailProviderYahoo MailProvider = "yahoo" )
MailProvider values.
func (MailProvider) DefaultIcon ¶
func (p MailProvider) DefaultIcon() string
DefaultIcon is the provider's bundled brand icon, or the generic mail icon.
type MangoWorkspacesConfig ¶
type MangoWorkspacesConfig struct {
// Hide tags that hold no clients and are not active.
HideEmpty bool `cfg:"hide-empty"`
// Always show tags up to this one-based index, even when empty.
//
// `0` shows only occupied or active tags (subject to `hide-empty`). A
// value above the compositor's tag count just shows every tag.
MinTagCount uint8 `cfg:"min-tag-count"`
// What identifies each tag: its label, an icon, or nothing.
DisplayMode DisplayMode `cfg:"display-mode"`
// Text shown between the tag label and its application icons.
Divider string `cfg:"divider"`
// Show an application icon per client on each tag.
AppIconsShow bool `cfg:"app-icons-show"`
// Collapse clients that share an application to a single icon.
AppIconsDedupe bool `cfg:"app-icons-dedupe"`
// Icon for clients not matched by `app-icon-map`.
AppIconsFallback string `cfg:"app-icons-fallback"`
// Icon shown when a tag has no clients.
AppIconsEmpty string `cfg:"app-icons-empty"`
// Highlight tags whose clients requested attention.
UrgentShow bool `cfg:"urgent-show"`
// Whether urgency is tracked per tag or per application.
UrgentMode UrgentMode `cfg:"urgent-mode"`
// How the active tag is marked.
ActiveIndicator ActiveIndicator `cfg:"active-indicator"`
// Padding along the bar direction for content wider than the circle: app icons, a divider or a long name. Accepts a scale multiplier or pixels (e.g. `"8px"`).
//
// A short label takes no padding. It sets the circle's size instead: at least a digit's width plus this padding on each side.
TagPadding Size `cfg:"tag-padding"`
// Spacing between application icons. Accepts a scale multiplier or pixels (e.g. `"4px"`).
IconGap Size `cfg:"icon-gap"`
// Application icon size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
IconSize Size `cfg:"icon-size"`
// Tag label text size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
LabelSize Size `cfg:"label-size"`
// Color of the active tag.
ActiveColor ColorValue `cfg:"active-color"`
// Color of tags that hold clients but are not active.
OccupiedColor ColorValue `cfg:"occupied-color"`
// Color of empty tags.
EmptyColor ColorValue `cfg:"empty-color"`
// Background color of the tag container.
ContainerBgColor ColorValue `cfg:"container-bg-color"`
// Draw a border around the tag container.
BorderShow bool `cfg:"border-show"`
// Border color when the border is shown.
BorderColor ColorValue `cfg:"border-color"`
// Window-to-icon mappings for the application icons.
//
// Keys are glob patterns matched against a client's app id, or `title:`
// patterns matched against its title. Values are symbolic icon names.
//
// ## Example
//
// “`yaml
// modules:
// mango-workspaces:
// app-icon-map:
// "*firefox*": ld-globe-symbolic
// "title:*YouTube*": si-youtube-symbolic
// “`
AppIconMap map[string]string `cfg:"app-icon-map"`
// Per-tag icon and color overrides, keyed by one-based tag index.
//
// ## Example
//
// “`yaml
// modules:
// mango-workspaces:
// tag-map:
// "1":
// label: web
// icon: ld-globe-symbolic
// color: "#4a90d9"
// "2":
// label: term
// icon: ld-terminal-symbolic
// “`
TagMap map[string]WorkspaceStyle `cfg:"tag-map"`
// Action for a left click on a tag.
LeftClick WorkspaceClickAction `cfg:"left-click"`
// Action for a middle click on a tag.
MiddleClick WorkspaceClickAction `cfg:"middle-click"`
// Action for a right click on a tag.
RightClick WorkspaceClickAction `cfg:"right-click"`
// Action for scrolling up over the tag container.
ScrollUp WorkspaceClickAction `cfg:"scroll-up"`
// Action for scrolling down over the tag container.
ScrollDown WorkspaceClickAction `cfg:"scroll-down"`
}
MangoWorkspacesConfig is ported from crates/wayle-config/src/schemas/modules/mango_workspaces/mod.rs.
MangoWM tag switcher module configuration.
func DefaultsMangoWorkspaces ¶
func DefaultsMangoWorkspaces() MangoWorkspacesConfig
DefaultsMangoWorkspaces returns the schema defaults.
func (MangoWorkspacesConfig) Clicks ¶
func (c MangoWorkspacesConfig) Clicks() WorkspaceClicks
Clicks returns the five input bindings.
func (MangoWorkspacesConfig) View ¶
func (c MangoWorkspacesConfig) View() CompositorWorkspacesConfig
View returns the mango module in the shared workspace shape; tags are its workspaces.
type Marshaler ¶
type Marshaler interface {
MarshalConfig() any
}
Marshaler is implemented by leaf types that serialize to something other than their reflected shape (a string union, a newtype).
type MatugenScheme ¶
type MatugenScheme string
MatugenScheme is a color-extractor parameter (styling/types/extractor.rs).
Matugen color scheme type.
const ( // Adapts to image content. MatugenSchemeContent MatugenScheme = "content" // Bold, dramatic palette. MatugenSchemeExpressive MatugenScheme = "expressive" // Stays close to source colors. MatugenSchemeFidelity MatugenScheme = "fidelity" // Playful multi-color palette. MatugenSchemeFruitSalad MatugenScheme = "fruit-salad" // Single-hue grayscale palette. MatugenSchemeMonochrome MatugenScheme = "monochrome" // Muted, understated palette. MatugenSchemeNeutral MatugenScheme = "neutral" // Broad hue spread. MatugenSchemeRainbow MatugenScheme = "rainbow" // Balanced Material You default. MatugenSchemeTonalSpot MatugenScheme = "tonal-spot" // High-saturation palette. MatugenSchemeVibrant MatugenScheme = "vibrant" )
MatugenScheme values.
func (MatugenScheme) CLIValue ¶
func (m MatugenScheme) CLIValue() string
CLIValue is the value of matugen's --type flag ("scheme-tonal-spot").
type MediaConfig ¶
type MediaConfig struct {
// Icon display mode.
IconType MediaIconType `cfg:"icon-type"`
// Custom player-to-icon mappings for application-mapped mode.
//
// Keys are glob patterns matching MPRIS bus names, values are icon names
// from the installed icon set. These override built-in mappings when
// matched.
//
// ## Example
//
// “`yaml
// modules:
// media:
// player-icons:
// "*spotify*": si-spotify-symbolic
// "*firefox*": ld-globe-symbolic
// "*.mpv": ld-play-circle-symbolic
// “`
PlayerIcons map[string]string `cfg:"player-icons"`
// Player bus name patterns to exclude from discovery. Requires a restart
// to take effect.
//
// ## Example
//
// “`yaml
// modules:
// media:
// players-ignored: ["*chromium*", "*discord*"]
// “`
PlayersIgnored []string `cfg:"players-ignored"`
// Preferred player priority order as glob patterns matching bus names.
//
// When no player is manually selected, this determines which player
// becomes active. Patterns are checked in order; first match wins.
// If no pattern matches, the first playing player is selected.
//
// ## Example
//
// “`yaml
// modules:
// media:
// player-priority: ["*spotify*", "*firefox*"]
// “`
PlayerPriority []string `cfg:"player-priority"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ title }}` - Track title
// - `{{ artist }}` - Artist name(s)
// - `{{ album }}` - Album name
// - `{{ status }}` - Playback status text (Playing, Paused, Stopped)
// - `{{ status_icon }}` - Playback status icon character
//
// ## Examples
//
// - `"{{ title }} - {{ artist }}"` - "Bohemian Rhapsody - Queen"
// - `"{{ status_icon }} {{ title }}"` - "▶ Bohemian Rhapsody"
// - `"{{ artist }}: {{ title }} ({{ album }})"` - "Queen: Bohemian Rhapsody (A Night at the Opera)"
Format string `cfg:"format"`
// Symbolic icon name for default mode.
IconName string `cfg:"icon-name"`
// Icon shown for spinning-disc mode.
SpinningDiscIcon string `cfg:"spinning-disc-icon"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display text label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
MediaConfig is ported from crates/wayle-config/src/schemas/modules/media/mod.rs.
Now-playing title and playback controls for the active MPRIS player.
func (MediaConfig) Clicks ¶
func (c MediaConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (MediaConfig) PlayerIconMappings ¶
func (c MediaConfig) PlayerIconMappings() []IconMapping
PlayerIconMappings is player-icons in pattern order, the BTreeMap order the Rust lookup walks.
type MediaIconType ¶
type MediaIconType string
MediaIconType is ported from crates/wayle-config/src/schemas/modules/media/mod.rs.
Icon display mode for the media module.
const ( // Static icon from icon-name field. MediaIconTypeDefault MediaIconType = "default" // Dynamic icon from media player's desktop entry, falling back to icon-name. MediaIconTypeApplication MediaIconType = "application" // Spinning disc icon that animates during playback. Uses slightly more CPU. MediaIconTypeSpinningDisc MediaIconType = "spinning-disc" // Maps player to icon via glob patterns, with built-in mappings for common players. MediaIconTypeApplicationMapped MediaIconType = "application-mapped" )
MediaIconType values.
type MicrophoneConfig ¶
type MicrophoneConfig struct {
// Icon shown when microphone is active (unmuted).
IconActive string `cfg:"icon-active"`
// Icon shown when microphone is muted.
IconMuted string `cfg:"icon-muted"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display percentage label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click. Default toggles input mute.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Dynamic color thresholds based on microphone volume percentage.
//
// Entries are checked in order; the last matching entry wins for each
// color slot. Use `above` for high-value warnings (e.g., high input gain).
//
// ## Example
//
// “`yaml
// modules:
// microphone:
// thresholds:
// - above: 70
// icon-color: status-warning
// label-color: status-warning
// - above: 90
// icon-color: status-error
// label-color: status-error
// “`
Thresholds []ThresholdEntry `cfg:"thresholds"`
}
MicrophoneConfig is ported from crates/wayle-config/src/schemas/modules/microphone/mod.rs.
Microphone input level and mute toggle.
func DefaultsMicrophone ¶
func DefaultsMicrophone() MicrophoneConfig
DefaultsMicrophone returns the schema defaults.
func (MicrophoneConfig) Clicks ¶
func (c MicrophoneConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (MicrophoneConfig) Icon ¶
func (c MicrophoneConfig) Icon() IconConfig
Icon is the microphone's active icon.
type ModulesConfig ¶
type ModulesConfig struct {
// Battery status module.
Battery BatteryConfig `cfg:"battery"`
// Bluetooth connection module.
Bluetooth BluetoothConfig `cfg:"bluetooth"`
// Backlight brightness module.
Brightness BrightnessConfig `cfg:"brightness"`
// Cava audio visualizer module.
Cava CavaConfig `cfg:"cava"`
// Clock display module.
Clock ClockConfig `cfg:"clock"`
// CPU usage module.
CPU CpuConfig `cfg:"cpu"`
// Dashboard module.
Dashboard DashboardConfig `cfg:"dashboard"`
// Hyprland workspace switcher module.
HyprlandWorkspaces HyprlandWorkspacesConfig `cfg:"hyprland-workspaces"`
// Night light (blue light filter) module.
Nightlight NightlightConfig `cfg:"nightlight,deprecated=hyprsunset"`
// Idle inhibitor module.
IdleInhibit IdleInhibitConfig `cfg:"idle-inhibit"`
// Keybind mode indicator module.
KeybindMode KeybindModeConfig `cfg:"keybind-mode"`
// Keyboard input module.
KeyboardInput KeyboardInputConfig `cfg:"keyboard-input"`
// lys-wm workspace switcher module.
LysWMWorkspaces LysWMWorkspacesConfig `cfg:"lys-wm-workspaces"`
// Bitwarden vault module.
Bitwarden BitwardenConfig `cfg:"bitwarden"`
// Unread mail count module.
Mail MailConfig `cfg:"mail"`
// MangoWM tag switcher module.
MangoWorkspaces MangoWorkspacesConfig `cfg:"mango-workspaces"`
// Media player module.
Media MediaConfig `cfg:"media"`
// Microphone input module.
Microphone MicrophoneConfig `cfg:"microphone"`
// Network connection module.
Network NetworkConfig `cfg:"network"`
// Network traffic statistics module.
Netstat NetstatConfig `cfg:"netstat"`
// Niri workspace switcher module.
NiriWorkspaces NiriWorkspacesConfig `cfg:"niri-workspaces"`
// Notification center module.
Notification NotificationConfig `cfg:"notifications,deprecated=notification"`
// Power menu module.
Power PowerConfig `cfg:"power"`
// Power profile indicator/switcher module.
PowerProfiles PowerProfilesConfig `cfg:"power-profiles"`
// RAM usage module.
RAM RamConfig `cfg:"ram"`
// Screen recorder module.
Recorder RecorderConfig `cfg:"recorder"`
// Screenshot capture module.
Screenshot ScreenshotConfig `cfg:"screenshot"`
// Storage usage module.
Storage StorageConfig `cfg:"storage"`
// Separator module.
Separator SeparatorConfig `cfg:"separator"`
// sway workspace switcher module.
SwayWorkspaces SwayWorkspacesConfig `cfg:"sway-workspaces"`
// System tray module.
Systray SystrayConfig `cfg:"systray"`
// treeman worktree health module.
Treeman TreemanConfig `cfg:"treeman"`
// Volume control module.
Volume VolumeConfig `cfg:"volume"`
// Weather display module.
Weather WeatherConfig `cfg:"weather"`
// Window title module.
WindowTitle WindowTitleConfig `cfg:"window-title"`
// World clock module.
WorldClock WorldClockConfig `cfg:"world-clock"`
// Custom user-defined modules, each backed by a shell command. See
// [`CustomModuleDefinition`] for all fields (id, command, interval, click
// actions, icons, etc.). Reference them in a layout with `custom-<id>`.
//
// ## Example
//
// “`yaml
// modules:
// custom:
// - id: gpu-temp
// command: nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader
// interval-ms: 5000
// icon-name: ld-thermometer-symbolic
// - id: weather
// command: curl -s wttr.in/?format=%t
// interval-ms: 600000
// “`
Custom []CustomModuleDefinition `cfg:"custom"`
}
ModulesConfig is the `modules` mapping, one section per bar module (crates/wayle-config/src/schemas/modules/mod.rs). Config embeds it, so cfg.Battery reads cfg.ModulesConfig.Battery.
Configuration for all available lys-shell modules.
func DefaultsModules ¶
func DefaultsModules() ModulesConfig
DefaultsModules returns every module's schema defaults.
func (*ModulesConfig) ModuleButton ¶
func (m *ModulesConfig) ModuleButton(name string) (ButtonConfig, bool)
ModuleButton is the bar-button view of the [modules.<name>] section named by its schema key; ok is false for an unknown module. A key the section lacks reads as off for border-show and as shown for icon-show and label-show (a module without the key always shows that part).
func (*ModulesConfig) ModuleClicks ¶
func (m *ModulesConfig) ModuleClicks(name string) (ClickConfig, bool)
ModuleClicks returns the bindings of the [modules.<name>] section named by its schema key; ok is false for a module without bindings (or without a section).
func (*ModulesConfig) ModuleContainer ¶
func (m *ModulesConfig) ModuleContainer(name string) (ContainerConfig, bool)
ModuleContainer is the bar_container view of a module section.
type MonitorWallpaperConfig ¶
type MonitorWallpaperConfig struct {
// Monitor name (e.g., "HDMI-1", "DP-1").
Name string `cfg:"name,required"`
// Image scaling mode for this monitor.
FitMode FitMode `cfg:"fit-mode,default"`
// Wallpaper image path for this monitor.
Wallpaper string `cfg:"wallpaper,default"`
}
MonitorWallpaperConfig is one `wallpaper.monitors` entry, keyed by connector name.
Per-monitor wallpaper configuration.
type NamedWorkspaceMap ¶
type NamedWorkspaceMap map[string]WorkspaceStyle
NamedWorkspaceMap is the niri/sway workspace-map: styles keyed by workspace name or stable id. Its schema shares the WorkspaceMap definition, as the two Rust types share one name.
type NetstatConfig ¶
type NetstatConfig struct {
// Polling interval in milliseconds.
//
// Faster polling increases CPU usage.
PollIntervalMs uint64 `cfg:"poll-interval-ms"`
// Network interface to monitor.
//
// Use `"auto"` to select the first active interface, or specify an
// interface name like `"eth0"` or `"wlan0"`.
Interface string `cfg:"interface"`
// Format string for the label.
//
// ## Download Placeholders
//
// - `{{ down_kib }}` - Download speed in KiB/s
// - `{{ down_mib }}` - Download speed in MiB/s
// - `{{ down_gib }}` - Download speed in GiB/s
// - `{{ down_auto }}` - Download speed with auto unit (e.g., "1.5 MiB/s")
//
// ## Upload Placeholders
//
// - `{{ up_kib }}` - Upload speed in KiB/s
// - `{{ up_mib }}` - Upload speed in MiB/s
// - `{{ up_gib }}` - Upload speed in GiB/s
// - `{{ up_auto }}` - Upload speed with auto unit (e.g., "256 KiB/s")
//
// ## Other Placeholders
//
// - `{{ interface }}` - Interface name (e.g., "wlan0")
//
// ## Examples
//
// - `"{{ down_auto }} {{ up_auto }}"` - "1.5 MiB/s 256 KiB/s"
// - `"D:{{ down_mib }} U:{{ up_mib }}"` - "D:1.5 U:0.2"
// - `"{{ interface }}: {{ down_auto }}"` - "wlan0: 1.5 MiB/s"
Format string `cfg:"format"`
// Icon name.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
NetstatConfig is ported from crates/wayle-config/src/schemas/modules/netstat/mod.rs.
Network traffic counters (up/down rates).
func DefaultsNetstat ¶
func DefaultsNetstat() NetstatConfig
DefaultsNetstat returns the schema defaults.
func (NetstatConfig) Clicks ¶
func (c NetstatConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type NetworkConfig ¶
type NetworkConfig struct {
// WiFi icon when disabled.
WifiDisabledIcon string `cfg:"wifi-disabled-icon"`
// WiFi icon when connecting.
WifiAcquiringIcon string `cfg:"wifi-acquiring-icon"`
// WiFi icon when disconnected.
WifiOfflineIcon string `cfg:"wifi-offline-icon"`
// WiFi icon when connected but signal strength unavailable.
WifiConnectedIcon string `cfg:"wifi-connected-icon"`
// WiFi signal strength icons from weak to excellent.
//
// The signal percentage maps to icons: 0-25% uses icons\[0\], 26-50% uses
// icons\[1\], etc.
WifiSignalIcons []string `cfg:"wifi-signal-icons"`
// Wired icon when connected.
WiredConnectedIcon string `cfg:"wired-connected-icon"`
// Wired icon when connecting.
WiredAcquiringIcon string `cfg:"wired-acquiring-icon"`
// Wired icon when disconnected.
WiredDisconnectedIcon string `cfg:"wired-disconnected-icon"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display connection label (SSID for WiFi, "Wired" for ethernet).
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Icon when a VPN is connected.
VpnConnectedIcon string `cfg:"vpn-connected-icon"`
// Icon while a VPN connection is in flight.
VpnConnectingIcon string `cfg:"vpn-connecting-icon"`
// Icon when a VPN is configured but disconnected.
VpnDisconnectedIcon string `cfg:"vpn-disconnected-icon"`
// When the VPN state replaces the wifi/wired icon.
//
// `auto` shows it only once NetworkManager holds a VPN profile, so adding
// the key changes nothing on a machine with no VPN.
VpnShow VpnShow `cfg:"vpn-show"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
NetworkConfig is ported from crates/wayle-config/src/schemas/modules/network/mod.rs.
Network connection status with a dropdown for switching connections.
func DefaultsNetwork ¶
func DefaultsNetwork() NetworkConfig
DefaultsNetwork returns the schema defaults.
func (NetworkConfig) Clicks ¶
func (c NetworkConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (NetworkConfig) Icon ¶
func (c NetworkConfig) Icon() IconConfig
Icon is the network offline icon.
type NightlightConfig ¶ added in v0.2.0
type NightlightConfig struct {
// Format string for the label.
//
// ## Placeholders
//
// - `{{ status }}` - Filter status text (On, Off)
// - `{{ temp }}` - Current temperature in Kelvin (shows "--" when disabled)
// - `{{ gamma }}` - Current gamma percentage (shows "--" when disabled)
// - `{{ config_temp }}` - Configured temperature (always available)
// - `{{ config_gamma }}` - Configured gamma (always available)
//
// ## Examples
//
// - `"{{ status }}"` - "On"
// - `"{{ temp }}K {{ gamma }}%"` - "4500K 80%"
// - `"{{ status }} ({{ temp }}K)"` - "On (4500K)"
Format string `cfg:"format"`
// Color temperature in Kelvin when filter is enabled. Range: 1000-20000.
Temperature uint32 `cfg:"temperature"`
// Display gamma percentage when filter is enabled. Range: 0-200.
Gamma uint32 `cfg:"gamma"`
// Automatically ease the filter on at dusk and off at dawn, following the
// sun at the machine's location.
//
// The schedule anchors to civil dawn and civil dusk, when the sun is 6
// degrees below the horizon, with each transition centred on the event.
// Where the sun never crosses that line (polar day and polar night) the
// filter stays off or on with no transition.
//
// The location comes from GeoClue, unless `latitude` and `longitude` are
// both set: explicit coordinates win, and GeoClue is then never asked. A
// spelled-out 0, 0 counts as unset. The last GeoClue fix is remembered in
// the state directory. With no location at all, or with only one coordinate
// or one off the globe, the schedule does not run: the module says why in
// its tooltip and in the log, and the filter stays as it is.
//
// GeoClue answers a client only once an agent serves the user, and only
// GNOME and a few other desktops run one. With none running, lys-shell
// registers as the agent itself for the length of the lookup, which GeoClue
// allows only for names on its whitelist. The deb and rpm install that as
// `/etc/geoclue/conf.d/50-lys-shell.conf`, and the NixOS module's
// `autoInstallDependencies` sets it up too. From the release archive, install
// the archive's `geoclue-lys-shell.conf` at that path yourself and run
// `sudo systemctl restart geoclue`. GeoClue older than 2.7 does not read
// `conf.d`: put the file's `lys-shell` entry in `/etc/geoclue/geoclue.conf`
// and add `lys-shell` to `whitelist` under `[agent]` there. A `whitelist` in a
// drop-in replaces the main file's, so the shipped file repeats upstream's
// list; if you have changed yours, add your agents to the drop-in.
//
// The log names what to check when the lookup fails. No answer usually means
// the whitelist above. No fix after that usually means GeoClue has no source
// that can place the machine, as upstream's default config names no Wi-Fi
// location service: set `url` under `[wifi]`, describe the location in
// `/etc/geolocation` for the static source, or set `latitude` and `longitude`.
//
// A manual click cancels a running transition, applies at once, and holds
// until the next transition begins, after which the schedule resumes.
AutoSchedule bool `cfg:"auto-schedule"`
// Length of the transition between day and night, in whole minutes, centred
// on civil dawn or dusk. 0 switches at once. Range: 0-120.
TransitionDuration NightlightTransition `cfg:"transition-duration"`
// Latitude for the schedule, in decimal degrees (north positive). Range: -90
// to 90. Unset uses GeoClue. Set together with `longitude`, it overrides
// GeoClue. Only used when `auto-schedule` is on.
Latitude *float64 `cfg:"latitude"`
// Longitude for the schedule, in decimal degrees (east positive). Range:
// -180 to 180. Unset uses GeoClue. Set together with `latitude`, it overrides
// GeoClue. Only used when `auto-schedule` is on.
Longitude *float64 `cfg:"longitude"`
// Icon when filter is disabled (showing normal daylight colors).
IconOff string `cfg:"icon-off"`
// Icon when filter is enabled (showing warm night colors).
IconOn string `cfg:"icon-on"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Default toggles blue light filter.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
NightlightConfig is the night light: a blue-light filter lys-shell applies itself, through the compositor's colour transform matrix (hyprland-ctm-control-v1) or gamma ramps (wlr-gamma-control-v1).
Night light: warms the display colours, by hand or on a dawn/dusk schedule.
func DefaultsNightlight ¶ added in v0.2.0
func DefaultsNightlight() NightlightConfig
DefaultsNightlight returns the schema defaults.
func (NightlightConfig) Clicks ¶ added in v0.2.0
func (c NightlightConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (NightlightConfig) IconOffView ¶ added in v0.2.0
func (c NightlightConfig) IconOffView() IconConfig
IconOffView is the nightlight icon while the filter is off.
func (NightlightConfig) IconOnView ¶ added in v0.2.0
func (c NightlightConfig) IconOnView() IconConfig
IconOnView is the nightlight icon while the filter runs.
func (NightlightConfig) PinnedLocation ¶ added in v0.2.0
func (c NightlightConfig) PinnedLocation() (nightlight.Location, bool, error)
PinnedLocation is the position latitude and longitude name: false with neither set, and an error with only one set, off the globe, or at 0, 0 (nightlight.ErrNullIsland), which older default configs still spell out.
type NightlightTransition ¶ added in v0.2.0
type NightlightTransition struct {
// contains filtered or unexported fields
}
NightlightTransition is the ease's length, refused at load outside its range rather than clamped.
Night light transition length in whole minutes, 0 for an instant switch.
func (NightlightTransition) MarshalConfig ¶ added in v0.2.0
func (t NightlightTransition) MarshalConfig() any
MarshalConfig implements Marshaler.
func (NightlightTransition) Transition ¶ added in v0.2.0
func (t NightlightTransition) Transition() nightlight.Transition
Transition is the validated length.
func (*NightlightTransition) UnmarshalConfig ¶ added in v0.2.0
func (t *NightlightTransition) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type NiriWorkspacesConfig ¶
type NiriWorkspacesConfig struct {
// Show only workspaces on this bar's monitor.
//
// When `true` (default), each bar shows only its own output's
// workspaces. When `false`, all workspaces from every output are shown.
MonitorSpecific bool `cfg:"monitor-specific"`
// Hide niri's auto-allocated trailing empty workspace.
//
// Niri keeps one empty workspace at the tail of every output for
// dynamic allocation.
HideTrailingEmpty bool `cfg:"hide-trailing-empty"`
// What identifies each workspace button.
//
// - `label` (default): show the workspace label per `label-strategy`
// - `icon`: show an icon from `workspace-map` (falls back to label if unmapped)
// - `none`: show nothing — only app icons visible (if enabled)
DisplayMode DisplayMode `cfg:"display-mode"`
// How to compose the workspace label when `display-mode: label`.
//
// - `index`: index only (`"1"`, `"2"`)
// - `name-or-index` (default): name when set, index otherwise
// - `name-only`: name only; unnamed workspaces show nothing
// - `index-and-name`: `"1: web"` form; unnamed workspaces show the index alone
LabelStrategy LabelStrategy `cfg:"label-strategy"`
// Pulse animation on workspaces with urgent windows.
UrgentShow bool `cfg:"urgent-show"`
// Where the urgent pulse is applied.
//
// - `workspace` (default): whole button pulses
// - `application`: only the urgent app icon pulses, falling back to
// `workspace` when app icons are disabled
UrgentMode UrgentMode `cfg:"urgent-mode"`
// Visual indicator for the active workspace.
ActiveIndicator ActiveIndicator `cfg:"active-indicator"`
// Text separator between workspace identity and app icons.
Divider string `cfg:"divider"`
// Show application icons for windows on each workspace.
AppIconsShow bool `cfg:"app-icons-show"`
// Deduplicate application icons within a workspace.
//
// When `true`, one icon per unique `app_id`. When `false`, one icon
// per window.
AppIconsDedupe bool `cfg:"app-icons-dedupe"`
// Fallback icon for applications not matched by `app-icon-map`.
AppIconsFallback string `cfg:"app-icons-fallback"`
// Icon shown when a workspace has no application windows.
AppIconsEmpty string `cfg:"app-icons-empty"`
// Gap between app icons within a workspace button. Accepts a scale multiplier or pixels (e.g. `"4px"`).
IconGap Size `cfg:"icon-gap"`
// Padding along the bar direction for content wider than the circle: app icons, a divider or a long name. Accepts a scale multiplier or pixels (e.g. `"8px"`).
//
// A short label takes no padding. It sets the circle's size instead: at least a digit's width plus this padding on each side.
WorkspacePadding Size `cfg:"workspace-padding"`
// Workspace icon size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
//
// Applies to identity icons and custom icons from `workspace-map`.
IconSize Size `cfg:"icon-size"`
// Workspace label and divider size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
LabelSize Size `cfg:"label-size"`
// Workspaces to hide from the display.
//
// Glob patterns matched against the workspace's name (if set), then
// its index, then its stable id. Examples:
// - `"scratch"` — hide the workspace named `scratch`
// - `"1?"` — hide indices 10-19
WorkspaceIgnore []string `cfg:"workspace-ignore"`
// Color for the active (visible on its output) workspace.
//
// In `background` indicator mode, also used as the button background.
ActiveColor ColorValue `cfg:"active-color"`
// Color for occupied workspaces (have windows but not active).
OccupiedColor ColorValue `cfg:"occupied-color"`
// Color for empty workspaces and placeholder slots.
EmptyColor ColorValue `cfg:"empty-color"`
// Background color for the workspaces container.
ContainerBgColor ColorValue `cfg:"container-bg-color"`
// Display border around the workspaces container.
BorderShow bool `cfg:"border-show"`
// Border color for the workspaces container.
BorderColor ColorValue `cfg:"border-color"`
// Per-workspace icon and color overrides, keyed by name or id-as-string.
//
// ## Example
//
// “`yaml
// modules:
// niri-workspaces:
// workspace-map:
// web: {icon: ld-globe-symbolic, color: "#4a90d9"}
// terminal: {icon: ld-terminal-symbolic}
// “`
WorkspaceMap NamedWorkspaceMap `cfg:"workspace-map"`
// Application icon mapping with glob pattern support.
//
// Maps window `app_id` or title to symbolic icon names. Supports:
// - No prefix: matches `app_id` (e.g. `"*firefox*"`)
// - `app:` prefix: explicit `app_id` match (e.g. `"app:org.mozilla.*"`)
// - `title:` prefix: matches window title (e.g. `"title:*YouTube*"`)
//
// ## Example
//
// “`yaml
// modules:
// niri-workspaces:
// app-icon-map:
// "*firefox*": ld-globe-symbolic
// "title:*YouTube*": ld-youtube-symbolic
// “`
AppIconMap map[string]string `cfg:"app-icon-map"`
// Action on left click.
LeftClick WorkspaceClickAction `cfg:"left-click"`
// Action on middle click.
MiddleClick WorkspaceClickAction `cfg:"middle-click"`
// Action on right click.
RightClick WorkspaceClickAction `cfg:"right-click"`
// Action on scroll up.
ScrollUp WorkspaceClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown WorkspaceClickAction `cfg:"scroll-down"`
}
NiriWorkspacesConfig is ported from crates/wayle-config/src/schemas/modules/niri_workspaces/mod.rs.
Niri workspace indicators with click-to-switch.
func DefaultsNiriWorkspaces ¶
func DefaultsNiriWorkspaces() NiriWorkspacesConfig
DefaultsNiriWorkspaces returns the schema defaults.
func (NiriWorkspacesConfig) Clicks ¶
func (c NiriWorkspacesConfig) Clicks() WorkspaceClicks
Clicks returns the five input bindings.
func (NiriWorkspacesConfig) View ¶
func (c NiriWorkspacesConfig) View() CompositorWorkspacesConfig
View returns the shared sway/niri view.
type NormalizedF64 ¶
type NormalizedF64 float64
NormalizedF64 is a 0-1 float (validated/normalized.rs).
Floating-point value clamped to 0.0-1.0.
func (NormalizedF64) MarshalConfig ¶
func (n NormalizedF64) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*NormalizedF64) UnmarshalConfig ¶
func (n *NormalizedF64) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type NotificationConfig ¶
type NotificationConfig struct {
// Enable the notifications service and module.
Enabled bool `cfg:"enabled"`
// Icon shown when no notifications and DND is off.
IconName string `cfg:"icon-name"`
// Icon shown when notifications exist.
IconUnread string `cfg:"icon-unread"`
// Icon shown when Do Not Disturb is active.
IconDnd string `cfg:"icon-dnd"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display notification count label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click. Default toggles Do Not Disturb.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Glob patterns for app names whose notifications are blocked entirely.
//
// Matched notifications are silently dropped.
// Supports `*` (any characters) and `?` (single character).
//
// Examples: `["notify-send", "*chromium*", "Vivaldi*"]`
Blocklist []string `cfg:"blocklist"`
// How notification icons are resolved.
//
// | Mode | Per-notification image | No image provided |
// |------|----------------------|-------------------|
// | `automatic` | Shows the image | Mapped icon |
// | `mapped` | Ignored | Mapped icon |
// | `application` | Shows the image | App's generic icon, then mapped fallback |
IconSource IconSource `cfg:"icon-source"`
// How many of the newest notifications the history keeps in memory.
// Older ones stay on disk and load as the dropdown scrolls to them.
HistoryMemory NotificationHistoryMemory `cfg:"history-memory"`
// How many notifications the history keeps on disk. The oldest are
// deleted past it.
HistoryStored NotificationHistoryStored `cfg:"history-stored"`
// Screen position for popup notifications.
PopupPosition PopupPosition `cfg:"popup-position"`
// Maximum number of popups visible at once.
PopupMaxVisible uint32 `cfg:"popup-max-visible"`
// Order in which popups stack on screen.
PopupStackingOrder StackingOrder `cfg:"popup-stacking-order"`
// Which popups collapse into one stack: the newest card in front, up
// to two older ones peeking out behind it, and a count of the rest.
// Hovering a stack fans it out into a list.
PopupStack PopupStack `cfg:"popup-stack"`
// Maximum popup display duration in milliseconds.
//
// Applications may request a shorter timeout, which takes precedence.
PopupDuration uint32 `cfg:"popup-duration"`
// Pause popup auto-dismiss timer on hover.
PopupHoverPause bool `cfg:"popup-hover-pause"`
// Horizontal margin from screen edges. Accepts a scale multiplier or
// pixels (e.g. `"12px"`).
PopupMarginX Size `cfg:"popup-margin-x"`
// Vertical margin from screen edges. Accepts a scale multiplier or pixels
// (e.g. `"12px"`).
PopupMarginY Size `cfg:"popup-margin-y"`
// Gap between stacked popups: a multiplier of the default 8px (`1.0` =
// default) or absolute pixels.
PopupGap Size `cfg:"popup-gap"`
// Target monitor: "primary" or a connector name like "DP-1".
PopupMonitor PopupMonitor `cfg:"popup-monitor"`
// Layer-shell layer popup notifications are placed on.
//
// When `general.tearing-mode` is enabled, `overlay` is demoted to `top`
// to allow fullscreen tearing.
PopupLayer Layer `cfg:"popup-layer"`
// What happens when the close button on a popup is clicked.
PopupCloseBehavior PopupCloseBehavior `cfg:"popup-close-behavior"`
// Display drop shadow on popup cards.
PopupShadow bool `cfg:"popup-shadow"`
// Opacity of a popup card's frosted surface at rest (0-100). The card
// under the pointer is opaque, and so is every card where the
// compositor cannot blur what is behind the popups.
PopupOpacity Percentage `cfg:"popup-opacity"`
// Minimum urgency level that displays a colored urgency bar.
PopupUrgencyBar UrgencyBarThreshold `cfg:"popup-urgency-bar"`
// Dynamic color thresholds based on notification count.
//
// Entries are checked in order; the last matching entry wins for each
// color slot. Use `above` for high-value warnings (e.g., many unread
// notifications).
//
// ## Example
//
// “`yaml
// modules:
// notifications:
// thresholds:
// - above: 5
// icon-color: status-warning
// label-color: status-warning
// - above: 20
// icon-color: status-error
// label-color: status-error
// “`
Thresholds []ThresholdEntry `cfg:"thresholds"`
}
NotificationConfig is ported from crates/wayle-config/src/schemas/modules/notification/mod.rs.
Notification center: icon in the bar, dropdown with history, DND toggle.
func DefaultsNotification ¶
func DefaultsNotification() NotificationConfig
DefaultsNotification returns the schema defaults.
func (NotificationConfig) Clicks ¶
func (c NotificationConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (NotificationConfig) Icon ¶
func (c NotificationConfig) Icon() IconConfig
Icon is the notifications bell.
type NotificationHistoryMemory ¶ added in v0.2.0
type NotificationHistoryMemory struct {
// contains filtered or unexported fields
}
NotificationHistoryMemory is how many of the newest notifications the history keeps in memory, refused at load outside its range.
Notifications kept in memory.
func (NotificationHistoryMemory) Limit ¶ added in v0.2.0
func (m NotificationHistoryMemory) Limit() notifications.MemoryLimit
Limit is the validated bound.
func (NotificationHistoryMemory) MarshalConfig ¶ added in v0.2.0
func (m NotificationHistoryMemory) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*NotificationHistoryMemory) UnmarshalConfig ¶ added in v0.2.0
func (m *NotificationHistoryMemory) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type NotificationHistoryStored ¶ added in v0.2.0
type NotificationHistoryStored struct {
// contains filtered or unexported fields
}
NotificationHistoryStored is how many notifications the history keeps on disk, refused at load outside its range.
Notifications kept on disk.
func (NotificationHistoryStored) Limit ¶ added in v0.2.0
func (m NotificationHistoryStored) Limit() notifications.StoredLimit
Limit is the validated bound.
func (NotificationHistoryStored) MarshalConfig ¶ added in v0.2.0
func (m NotificationHistoryStored) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*NotificationHistoryStored) UnmarshalConfig ¶ added in v0.2.0
func (m *NotificationHistoryStored) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type Numbering ¶
type Numbering string
Numbering is ported from crates/wayle-config/src/schemas/modules/hyprland_workspaces/mod.rs.
How workspace numbers are displayed.
const ( // Show actual Hyprland workspace IDs (1, 2, 3, 4, 5, 6...). NumberingAbsolute Numbering = "absolute" // Show numbers relative to monitor's starting workspace. // // If monitor has workspaces 4, 5, 6 assigned, they display as 1, 2, 3. // Useful when keybinds use per-monitor numbering (Shift+1 for ws 4, etc.). NumberingRelative Numbering = "relative" )
Numbering values.
type OsdConfig ¶
type OsdConfig struct {
// Show OSD overlays for volume, brightness, keyboard layout switches, and lock keys (Caps, Num and Scroll Lock need read access to /dev/input, the input group, except on lys-wm, which reports them over its IPC).
Enabled bool `cfg:"enabled"`
// Screen anchor position.
Position OsdPosition `cfg:"position"`
// Horizontal alignment of toast and toggle overlay content. Sliders
// (volume/brightness) keep their own label+value layout.
TextAlign OsdTextAlign `cfg:"text-align"`
// Auto-dismiss delay in milliseconds.
Duration uint32 `cfg:"duration"`
// Target monitor: "primary" or a connector name like "DP-1".
Monitor OsdMonitor `cfg:"monitor"`
// Margin from screen edges: a multiplier of the default 150px (`1.0` =
// default) or absolute pixels (e.g. `"150px"`).
Margin Size `cfg:"margin"`
// Show a border around the OSD.
Border bool `cfg:"border"`
// Layer-shell layer the OSD is placed on.
//
// When `general.tearing-mode` is enabled, `overlay` is demoted to `top`
// to allow fullscreen tearing.
Layer Layer `cfg:"layer"`
// Reusable toast presets, each triggerable with `lys-shell toast --preset <id>`.
Presets []ToastPreset `cfg:"presets"`
}
OsdConfig is the `osd` section (crates/wayle-config/src/schemas/osd/mod.rs).
On-screen display overlay for transient events like volume and brightness.
type OsdMonitor ¶
type OsdMonitor struct {
// contains filtered or unexported fields
}
OsdMonitor is the OSD's target monitor.
func OsdOnConnector ¶
func OsdOnConnector(name string) OsdMonitor
OsdOnConnector targets one connector ("primary" stays the primary).
func (OsdMonitor) Connector ¶
func (m OsdMonitor) Connector() string
Connector is the configured connector name ("" for primary).
func (OsdMonitor) IsPrimary ¶
func (m OsdMonitor) IsPrimary() bool
IsPrimary reports whether the surface follows the primary monitor.
func (OsdMonitor) MarshalConfig ¶
func (m OsdMonitor) MarshalConfig() any
MarshalConfig implements Marshaler.
func (OsdMonitor) Matches ¶
Matches reports whether the target selects the named output, given the name of the primary (first) output.
func (*OsdMonitor) UnmarshalConfig ¶
UnmarshalConfig implements Unmarshaler.
type OsdPosition ¶
type OsdPosition string
OsdPosition is the OSD's screen anchor (crates/wayle-config/src/schemas/osd/types.rs).
Screen anchor for the OSD overlay.
const ( // Top-left corner. OsdTopLeft OsdPosition = "top-left" // Top-center edge. OsdTop OsdPosition = "top" // Top-right corner. OsdTopRight OsdPosition = "top-right" // Right-center edge. OsdRight OsdPosition = "right" // Bottom-right corner. OsdBottomRight OsdPosition = "bottom-right" // Bottom-center edge. OsdBottom OsdPosition = "bottom" // Bottom-left corner. OsdBottomLeft OsdPosition = "bottom-left" // Left-center edge. OsdLeft OsdPosition = "left" )
OSD positions.
type OsdTextAlign ¶
type OsdTextAlign string
OsdTextAlign is the toast/toggle content alignment.
Horizontal alignment of OSD toast/toggle content.
const ( // Align content to the start (left in LTR layouts). OsdTextAlignStart OsdTextAlign = "start" // Center content horizontally. OsdTextAlignCenter OsdTextAlign = "center" // Align content to the end (right in LTR layouts). OsdTextAlignEnd OsdTextAlign = "end" )
OSD text alignments.
type Palette ¶
type Palette struct {
Bg, Surface, Elevated string
Fg, FgMuted string
Primary string
Red, Yellow string
Green, Blue string
}
Palette is a theme's ten colors as the CSS generation consumes them (crates/wayle-config/src/infrastructure/themes/mod.rs). The values are the strings a theme or provider supplied; the [styling.palette] section's validated form is PaletteConfig.
func PaletteByName ¶
PaletteByName looks up a built-in theme's palette.
type PaletteConfig ¶
type PaletteConfig struct {
// Base background color (darkest).
Bg HexColor `cfg:"bg"`
// Card and sidebar background.
Surface HexColor `cfg:"surface"`
// Raised element background.
Elevated HexColor `cfg:"elevated"`
// Primary text color.
Fg HexColor `cfg:"fg"`
// Secondary text color.
FgMuted HexColor `cfg:"fg-muted"`
// Accent color for interactive elements.
Primary HexColor `cfg:"primary"`
// Red semantic color.
Red HexColor `cfg:"red"`
// Yellow semantic color.
Yellow HexColor `cfg:"yellow"`
// Green semantic color.
Green HexColor `cfg:"green"`
// Blue semantic color.
Blue HexColor `cfg:"blue"`
}
PaletteConfig is the [styling.palette] table (styling/palette.rs).
Color palette configuration for the active theme.
type PassphraseWords ¶ added in v0.2.0
type PassphraseWords struct {
// contains filtered or unexported fields
}
PassphraseWords is a passphrase preset's word count, refused at load outside 3-20.
A generated passphrase's number of words, 3-20.
func (PassphraseWords) MarshalConfig ¶ added in v0.2.0
func (w PassphraseWords) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*PassphraseWords) UnmarshalConfig ¶ added in v0.2.0
func (w *PassphraseWords) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
func (PassphraseWords) Words ¶ added in v0.2.0
func (w PassphraseWords) Words() generator.Words
Words is the validated word count.
type PasswordCharset ¶ added in v0.2.0
type PasswordCharset string
PasswordCharset is a generator character class.
A class of characters a generated password draws from.
const ( // Lowercase letters, a-z. PasswordCharsetLowercase PasswordCharset = "lowercase" // Uppercase letters, A-Z. PasswordCharsetUppercase PasswordCharset = "uppercase" // Digits, 0-9. PasswordCharsetDigits PasswordCharset = "digits" // The symbols `!@#$%^&*`. PasswordCharsetSymbols PasswordCharset = "symbols" )
Password character classes.
type PasswordCharsets ¶ added in v0.2.0
type PasswordCharsets struct {
// contains filtered or unexported fields
}
PasswordCharsets is a password preset's classes, refused at load when empty.
The character classes a generated password draws from, at least one of `lowercase`, `uppercase`, `digits` and `symbols` (`!@#$%^&*`). Every class listed appears in the password at least once.
func NewPasswordCharsets ¶ added in v0.2.0
func NewPasswordCharsets(listed ...PasswordCharset) (PasswordCharsets, error)
NewPasswordCharsets validates a list of character classes.
func (PasswordCharsets) MarshalConfig ¶ added in v0.2.0
func (c PasswordCharsets) MarshalConfig() any
MarshalConfig implements Marshaler.
func (PasswordCharsets) Set ¶ added in v0.2.0
func (c PasswordCharsets) Set() generator.Charsets
Set is the validated classes.
func (*PasswordCharsets) UnmarshalConfig ¶ added in v0.2.0
func (c *PasswordCharsets) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type PasswordLength ¶ added in v0.2.0
type PasswordLength struct {
// contains filtered or unexported fields
}
PasswordLength is a password preset's length, refused at load outside 5-128.
A generated password's length in characters, 5-128.
func (PasswordLength) Length ¶ added in v0.2.0
func (l PasswordLength) Length() generator.Length
Length is the validated length.
func (PasswordLength) MarshalConfig ¶ added in v0.2.0
func (l PasswordLength) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*PasswordLength) UnmarshalConfig ¶ added in v0.2.0
func (l *PasswordLength) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type Percentage ¶
type Percentage uint8
Percentage is a 0-100 value (validated/percentage.rs).
Percentage value clamped to 0-100.
func (Percentage) MarshalConfig ¶
func (p Percentage) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*Percentage) UnmarshalConfig ¶
func (p *Percentage) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type PixelLength ¶ added in v0.2.0
type PixelLength float32
PixelLength is an absolute length in logical pixels, written like "400px". Unlike a Size it takes no multiplier, having no base to scale, and fails to load rather than falling back: a bare number, a negative length or one past 10000px is an error naming the key.
Absolute length in pixels (e.g. "400px").
func (PixelLength) MarshalConfig ¶ added in v0.2.0
func (p PixelLength) MarshalConfig() any
MarshalConfig implements Marshaler: the "Npx" string.
func (*PixelLength) UnmarshalConfig ¶ added in v0.2.0
func (p *PixelLength) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type PopupCloseBehavior ¶
type PopupCloseBehavior string
PopupCloseBehavior is ported from crates/wayle-config/src/schemas/modules/notification/types.rs.
Behavior when the close button is clicked on a popup card.
const ( // Hide the popup; notification stays in history. PopupCloseBehaviorDismiss PopupCloseBehavior = "dismiss" // Remove the notification entirely. PopupCloseBehaviorRemove PopupCloseBehavior = "remove" )
PopupCloseBehavior values.
type PopupMonitor ¶
type PopupMonitor struct {
// contains filtered or unexported fields
}
PopupMonitor is the notification popups' target monitor.
func PopupOnConnector ¶
func PopupOnConnector(name string) PopupMonitor
PopupOnConnector targets one connector ("primary" stays the primary).
func (PopupMonitor) Connector ¶
func (m PopupMonitor) Connector() string
Connector is the configured connector name ("" for primary).
func (PopupMonitor) IsPrimary ¶
func (m PopupMonitor) IsPrimary() bool
IsPrimary reports whether the surface follows the primary monitor.
func (PopupMonitor) MarshalConfig ¶
func (m PopupMonitor) MarshalConfig() any
MarshalConfig implements Marshaler.
func (PopupMonitor) Matches ¶
Matches reports whether the target selects the named output, given the name of the primary (first) output.
func (*PopupMonitor) UnmarshalConfig ¶
UnmarshalConfig implements Unmarshaler.
type PopupPosition ¶
type PopupPosition string
PopupPosition is ported from crates/wayle-config/src/schemas/modules/notification/types.rs.
Screen position for notification popups.
const ( // Top-left corner. PopupPositionTopLeft PopupPosition = "top-left" // Top-center edge. PopupPositionTopCenter PopupPosition = "top-center" // Top-right corner. PopupPositionTopRight PopupPosition = "top-right" // Bottom-left corner. PopupPositionBottomLeft PopupPosition = "bottom-left" // Bottom-center edge. PopupPositionBottomCenter PopupPosition = "bottom-center" // Bottom-right corner. PopupPositionBottomRight PopupPosition = "bottom-right" // Center-left edge. PopupPositionCenterLeft PopupPosition = "center-left" // Center-right edge. PopupPositionCenterRight PopupPosition = "center-right" )
PopupPosition values.
type PopupStack ¶ added in v0.2.0
type PopupStack string
PopupStack is which notification popups share a stack.
const ( // Popups from the same app share a stack. PopupStackPerApp PopupStack = "per-app" // Every popup shares one stack. PopupStackAll PopupStack = "all" // Every popup is a card of its own. PopupStackOff PopupStack = "off" )
PopupStack values.
type PortalConfig ¶
type PortalConfig struct {
// Features to lock down for every app, for kiosk or shared setups.
Lockdown LockdownConfig `cfg:"lockdown"`
// Which apps may install launchers without asking.
DynamicLauncher DynamicLauncherConfig `cfg:"dynamic-launcher"`
}
PortalConfig is the portal section: policy for lys-shell's xdg-desktop-portal backend (`lys-shell portal`).
Desktop-portal policy for sandboxed apps.
func DefaultsPortal ¶
func DefaultsPortal() PortalConfig
DefaultsPortal returns the schema defaults: nothing locked down, and no app installs launchers without asking.
type PowerConfig ¶
type PowerConfig struct {
// Icon name to display.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Action on left click. Default opens lys-shell's native power menu (`:menu`).
LeftClick ClickAction `cfg:"left-click"`
// Command run by the power menu's Lock button.
LockCommand string `cfg:"lock-command"`
// Command run by the power menu's Log out button.
LogoutCommand string `cfg:"logout-command"`
// Command run by the power menu's Suspend button.
SuspendCommand string `cfg:"suspend-command"`
// Command run by the power menu's Reboot button.
RebootCommand string `cfg:"reboot-command"`
// Command run by the power menu's Shut down button.
ShutdownCommand string `cfg:"shutdown-command"`
// Show the Lock button in the power menu.
ShowLock bool `cfg:"show-lock"`
// Show the Log out button in the power menu.
ShowLogout bool `cfg:"show-logout"`
// Show the Suspend button in the power menu.
ShowSuspend bool `cfg:"show-suspend"`
// Show the Reboot button in the power menu.
ShowReboot bool `cfg:"show-reboot"`
// Show the Shut down button in the power menu.
ShowShutdown bool `cfg:"show-shutdown"`
}
PowerConfig is ported from crates/wayle-config/src/schemas/modules/power/mod.rs.
Shutdown, reboot, and logout menu.
func (PowerConfig) Clicks ¶
func (c PowerConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (PowerConfig) Icon ¶
func (c PowerConfig) Icon() IconConfig
Icon is the power icon; the power module always shows it.
type PowerProfilesConfig ¶
type PowerProfilesConfig struct {
// Format string for the label.
//
// ## Placeholders
//
// - `{{ profile }}` - Active profile name (power-saver, balanced, performance)
//
// ## Examples
//
// - `"{{ profile }}"` - "balanced"
Format string `cfg:"format"`
// Icon shown while the power-saver profile is active.
IconPowerSaver string `cfg:"icon-power-saver"`
// Icon shown while the balanced profile is active.
IconBalanced string `cfg:"icon-balanced"`
// Icon shown while the performance profile is active.
IconPerformance string `cfg:"icon-performance"`
// Icon/label color while the power-saver profile is active.
ColorPowerSaver ColorValue `cfg:"color-power-saver"`
// Icon/label color while the balanced profile is active.
ColorBalanced ColorValue `cfg:"color-balanced"`
// Icon/label color while the performance profile is active.
ColorPerformance ColorValue `cfg:"color-performance"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
//
// Overridden per active profile by the `color-*` fields.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Default cycles to the next power profile.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
PowerProfilesConfig is ported from crates/wayle-config/src/schemas/modules/power_profiles/mod.rs.
Power profile indicator and switcher (power-profiles-daemon).
Shows the active profile with a per-profile icon and color, and cycles through the available profiles on click. Backed by the same power-profiles-daemon D-Bus interface as `powerprofilesctl`.
func DefaultsPowerProfiles ¶
func DefaultsPowerProfiles() PowerProfilesConfig
DefaultsPowerProfiles returns the schema defaults.
func (PowerProfilesConfig) Clicks ¶
func (c PowerProfilesConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (PowerProfilesConfig) Colors ¶
func (c PowerProfilesConfig) Colors() map[string]ColorValue
Colors maps each power profile to its icon color.
func (PowerProfilesConfig) Icons ¶
func (c PowerProfilesConfig) Icons() map[string]IconConfig
Icons maps each power profile to its icon.
type PywalContrast ¶
type PywalContrast float64
PywalContrast is pywal's minimum contrast ratio, the WCAG range (styling/types/extractor.rs).
Pywal contrast ratio clamped to 1.0-21.0 (WCAG range).
func (PywalContrast) MarshalConfig ¶
func (c PywalContrast) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*PywalContrast) UnmarshalConfig ¶
func (c *PywalContrast) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler: out of range clamps with the Rust warning.
type RamConfig ¶
type RamConfig struct {
// Polling interval in milliseconds.
//
// Faster polling increases CPU usage.
PollIntervalMs uint64 `cfg:"poll-interval-ms"`
// Format string for the label.
//
// ## Memory Placeholders
//
// - `{{ percent }}` - Memory usage as integer (0-100)
// - `{{ used_gib }}` - Used memory in GiB (e.g., "7.2")
// - `{{ total_gib }}` - Total memory in GiB (e.g., "16.0")
// - `{{ available_gib }}` - Available memory in GiB (e.g., "8.8")
//
// ## Swap Placeholders
//
// - `{{ swap_percent }}` - Swap usage as integer (0-100)
// - `{{ swap_used_gib }}` - Used swap in GiB
// - `{{ swap_total_gib }}` - Total swap in GiB
//
// ## Examples
//
// - `"{{ percent }}%"` - "45%"
// - `"{{ used_gib }}/{{ total_gib }} GiB"` - "7.2/16.0 GiB"
// - `"{{ percent }}% (Swap: {{ swap_percent }}%)"` - "45% (Swap: 12%)"
Format string `cfg:"format"`
// Icon name.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Dynamic color thresholds based on RAM usage percentage.
//
// Entries are checked in order; the last matching entry wins for each
// color slot. Use `above` for high-value warnings (e.g., high memory usage).
//
// ## Example
//
// “`yaml
// modules:
// ram:
// thresholds:
// - above: 80
// icon-color: status-warning
// label-color: status-warning
// - above: 95
// icon-color: status-error
// label-color: status-error
// “`
Thresholds []ThresholdEntry `cfg:"thresholds"`
}
RamConfig is ported from crates/wayle-config/src/schemas/modules/ram/mod.rs.
Memory and swap usage.
func (RamConfig) Clicks ¶
func (c RamConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type RecorderConfig ¶
type RecorderConfig struct {
// Icon when idle (not recording).
IconIdle string `cfg:"icon-idle"`
// Icon while recording.
IconRecording string `cfg:"icon-recording"`
// Icon while recording is paused.
IconPaused string `cfg:"icon-paused"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ state }}` - Recorder state text (Idle, Recording, Paused)
// - `{{ elapsed }}` - Elapsed recording time (e.g., "01:23", "--" when idle)
Format string `cfg:"format"`
// Capture the microphone in the recording.
Microphone bool `cfg:"microphone"`
// Microphone PipeWire/PulseAudio source name. Empty uses the default source.
MicrophoneDevice string `cfg:"microphone-device"`
// Capture desktop (system) audio in the recording.
SystemAudio bool `cfg:"system-audio"`
// Capture framerate in frames per second.
Framerate uint32 `cfg:"framerate"`
// Overlay a webcam picture-in-picture frame into the recording.
WebcamEnabled bool `cfg:"webcam-enabled"`
// Webcam V4L2 device path. Empty auto-selects the first camera.
WebcamDevice string `cfg:"webcam-device"`
// Webcam frame horizontal position, as a percentage of the free
// horizontal space (0 = flush left, 100 = flush right). Stored relative so
// it stays correct across monitors of different resolutions.
WebcamX Percentage `cfg:"webcam-x"`
// Webcam frame vertical position, as a percentage of the free vertical
// space (0 = flush top, 100 = flush bottom). Stored relative so it stays
// correct across monitors of different resolutions.
WebcamY Percentage `cfg:"webcam-y"`
// Webcam frame width as a percentage of the recording width.
WebcamSize Percentage `cfg:"webcam-size"`
// Output directory for recordings. Empty uses the XDG Videos directory.
OutputDirectory string `cfg:"output-directory"`
// Container format / codec preset.
OutputFormat RecorderFormat `cfg:"output-format"`
// Draw the mouse cursor in the recording.
ShowCursor bool `cfg:"show-cursor"`
// Delay between choosing the capture source and the recording actually
// starting, in milliseconds. Gives on-screen UI (the start toast) time to
// clear so it isn't captured in the video.
StartDelayMs uint32 `cfg:"start-delay-ms"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Default toggles recording.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click. Default opens the recorder dropdown.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
RecorderConfig is ported from crates/wayle-config/src/schemas/modules/recorder/mod.rs.
Native screen recorder encoding on the GPU's video encoder.
An output is captured into GPU memory and encoded to H.264 there, through Vulkan Video or the GPU's VA-API driver, with Opus audio; a GPU without a video encoder cannot record.
Click the bar button to start/stop; the dropdown exposes the recording options below. Controllable from the CLI / RPC socket: `lys-shell recorder start|stop|toggle|pause|status`.
func DefaultsRecorder ¶
func DefaultsRecorder() RecorderConfig
DefaultsRecorder returns the schema defaults.
func (RecorderConfig) Clicks ¶
func (c RecorderConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (RecorderConfig) Icon ¶
func (c RecorderConfig) Icon() IconConfig
Icon is the recorder's idle icon.
func (RecorderConfig) Icons ¶
func (c RecorderConfig) Icons() map[string]IconConfig
Icons maps each recorder state to its icon.
type RecorderFormat ¶
type RecorderFormat string
RecorderFormat is ported from crates/wayle-config/src/schemas/modules/recorder/types.rs.
Container format / codec preset for recordings.
const ( // H.264 in an MP4 container. RecorderFormatMp4 RecorderFormat = "mp4" // H.264 in a Matroska container. RecorderFormatMkv RecorderFormat = "mkv" )
RecorderFormat values.
type RestartDelay ¶
type RestartDelay uint64
RestartDelay is a custom module's restart delay in ms (modules/custom/types.rs).
Restart delay in milliseconds, clamped to >= 1.
func (RestartDelay) MarshalConfig ¶
func (r RestartDelay) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*RestartDelay) UnmarshalConfig ¶
func (r *RestartDelay) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type RestartPolicy ¶
type RestartPolicy string
RestartPolicy is ported from crates/wayle-config/src/schemas/modules/custom/types.rs.
Restart behavior for watch-mode custom modules.
const ( // Never restart after exit. RestartPolicyNever RestartPolicy = "never" // Restart after any exit code (success or failure). RestartPolicyOnExit RestartPolicy = "on-exit" // Restart only after non-zero exit codes or signal termination. RestartPolicyOnFailure RestartPolicy = "on-failure" )
RestartPolicy values.
type RoundingCSSValues ¶
RoundingCSSValues are the var() references for one rounding level: Element for interactive elements, Container for surfaces.
type RoundingLevel ¶
type RoundingLevel string
RoundingLevel is the corner-rounding preference; the radius each level resolves to lives in styling.RoundingRadiusPx.
Global rounding preference for UI components.
const ( // The toolkit's own rounding (lys-ui's corner radius). RoundingDefault RoundingLevel = "default" // Sharp corners (no rounding). RoundingNone RoundingLevel = "none" // Subtle rounding. RoundingSm RoundingLevel = "sm" // Moderate rounding. RoundingMd RoundingLevel = "md" // Pronounced rounding. RoundingLg RoundingLevel = "lg" // Pill shape (fully rounded ends). RoundingFull RoundingLevel = "full" )
Rounding levels.
func (RoundingLevel) BarCSSValues ¶
func (r RoundingLevel) BarCSSValues() RoundingCSSValues
BarCSSValues maps the level to the bar's --bar-radius-* tokens (to_bar_css_values).
func (RoundingLevel) BarElementCSSValues ¶
func (r RoundingLevel) BarElementCSSValues() RoundingCSSValues
BarElementCSSValues maps the level to the bar buttons' and groups' --bar-button-radius-* tokens (to_bar_element_css_values).
func (RoundingLevel) CSSValues ¶
func (r RoundingLevel) CSSValues() RoundingCSSValues
CSSValues maps the level to the global --radius-* tokens; containers round one step larger for perceptual consistency (to_css_values), except at the toolkit's radius, which surfaces and controls share.
type RuntimeValueError ¶
RuntimeValueError is a runtime-layer value that failed to decode: "invalid value for '<path>': <error>".
func (*RuntimeValueError) Error ¶
func (e *RuntimeValueError) Error() string
func (*RuntimeValueError) Unwrap ¶
func (e *RuntimeValueError) Unwrap() error
type ScaleFactor ¶
type ScaleFactor float32
ScaleFactor is a 0.25-3.0 multiplier (validated/scale.rs).
Scale multiplier clamped to 0.25-3.0.
func (ScaleFactor) MarshalConfig ¶
func (s ScaleFactor) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*ScaleFactor) UnmarshalConfig ¶
func (s *ScaleFactor) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type ScreenshotConfig ¶
type ScreenshotConfig struct {
// Bar button icon.
Icon string `cfg:"icon"`
// Output directory for screenshots. Empty uses the XDG Pictures directory.
OutputDirectory string `cfg:"output-directory"`
// Saved file name, formatted with `chrono`/`strftime` specifiers.
FilenameFormat StrftimeFormat `cfg:"filename-format"`
// Copy the captured image to the clipboard.
CopyToClipboard bool `cfg:"copy-to-clipboard"`
// Show a desktop notification after capturing.
Notify bool `cfg:"notify"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Static label text shown beside the icon.
Label string `cfg:"label"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Default captures a region.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click. Default captures the focused output.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click. Default captures the active window.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
ScreenshotConfig is ported from crates/wayle-config/src/schemas/modules/screenshot/mod.rs.
Screenshot capture button.
Click the bar button to capture a region, output, or window. Controllable from the CLI / RPC socket: `lys-shell screenshot region|output|window`.
func DefaultsScreenshot ¶
func DefaultsScreenshot() ScreenshotConfig
DefaultsScreenshot returns the schema defaults.
func (ScreenshotConfig) Clicks ¶
func (c ScreenshotConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type SeparatorConfig ¶
type SeparatorConfig struct {
// Thickness of the separator line in pixels.
Size uint32 `cfg:"size"`
// Length of the separator line. Accepts a scale multiplier or pixels (e.g. `"24px"`).
Length Size `cfg:"length"`
// Color of the separator line.
Color ColorValue `cfg:"color"`
}
SeparatorConfig is ported from crates/wayle-config/src/schemas/modules/separator/mod.rs.
A vertical rule between bar modules.
func DefaultsSeparator ¶
func DefaultsSeparator() SeparatorConfig
DefaultsSeparator returns the schema defaults.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the live configuration: the defaults, the config file layer, and the runtime override layer (runtime.yaml, written by `lys-shell config set` and the settings GUI), resolved into immutable *Config snapshots that subscribers receive on every effective change. Snapshots are never mutated; a reload publishes a new one.
func Load ¶
func Load(dir string, sink DiagnosticSink) *Service
Load builds a service over dir without watching it (the CLI's one-shot load).
func Open ¶
Open loads the user's configuration from the platform directory and starts hot reload: config.yaml with its imports on the config layer, runtime.yaml on the runtime layer. A file-level failure logs and keeps the defaults for that layer; bad values are reported as diagnostics on stderr.
func (*Service) ClearSessionReducedMotion ¶ added in v0.3.1
func (s *Service) ClearSessionReducedMotion()
ClearSessionReducedMotion hands reduced motion back to the key: the compositor that owned it has gone.
func (*Service) ConfigValue ¶
ConfigValue is the value the config file sets at a dot path, false when it sets none (the property's config() slot).
func (*Service) GetByPath ¶
GetByPath returns the effective value at a dot path, as the config serializes (canonical keys; f32 values widened to f64).
func (*Service) ResetAllRuntime ¶
ResetAllRuntime drops every runtime override and removes runtime.yaml; a missing file is not an error.
func (*Service) ResetByPath ¶
ResetByPath drops the runtime override at a dot path; cleared reports whether one existed. The path must name one leaf.
func (*Service) RuntimePath ¶
RuntimePath is runtime.yaml in the config directory.
func (*Service) RuntimeValue ¶
RuntimeValue is the runtime override at a dot path, false for none.
func (*Service) RuntimeYAML ¶
RuntimeYAML renders the runtime overrides as runtime.yaml content.
func (*Service) Save ¶
Save persists the runtime overrides to runtime.yaml atomically: write runtime.tmp, fsync, rename over, fsync the directory.
func (*Service) SetByPath ¶
SetByPath sets a runtime override at a dot path. A value the field rejects is a *RuntimeValueError; an unknown path applies nothing.
func (*Service) SetSessionReducedMotion ¶ added in v0.3.1
SetSessionReducedMotion records what the compositor that owns reduced motion says. It holds across reloads and reaches subscribers as a change of the effective config.
func (*Service) Source ¶
func (s *Service) Source(path string) ValueSource
Source is the layer the value at a dot path comes from. A container path takes the highest layer any leaf under it uses.
func (*Service) Subscribe ¶
Subscribe registers fn for every change of the effective config; fn runs on the reloading goroutine with the previous and new snapshots (UI callers hop to their loop). The returned func unsubscribes.
func (*Service) SubscribeSecrets ¶
func (s *Service) SubscribeSecrets(fn func()) (cancel func())
SubscribeSecrets registers fn for every reload of the .env files.
func (*Service) SubscribeThemes ¶
func (s *Service) SubscribeThemes(fn func()) (cancel func())
SubscribeThemes registers fn for every change under themes/.
type SessionAction ¶
type SessionAction string
SessionAction is ported from crates/wayle-config/src/schemas/bar/dropdowns/dashboard/user_session.rs.
One action the dashboard session actions
const ( // Lock the session SessionActionLock SessionAction = "lock" // Logout of the current session SessionActionLogOut SessionAction = "log-out" // Reboot the machine SessionActionReboot SessionAction = "reboot" // Power off the machine SessionActionPowerOff SessionAction = "power-off" )
SessionAction values.
type ShadowPreset ¶
type ShadowPreset string
ShadowPreset is the bar shadow style (crates/wayle-config/src/schemas/bar/types/shadow.rs).
Shadow style for the bar.
const ( // No shadow. ShadowNone ShadowPreset = "none" // Directional shadow opposite the anchor edge. ShadowDrop ShadowPreset = "drop" // All-around shadow. ShadowFloating ShadowPreset = "floating" )
Shadow presets.
func (ShadowPreset) CSSShadow ¶
func (s ShadowPreset) CSSShadow(loc Location) string
CSSShadow is the box-shadow value for the bar's location.
func (ShadowPreset) MarginPx ¶
func (s ShadowPreset) MarginPx() uint32
MarginPx is the layer margin the shadow needs to render unclipped.
func (ShadowPreset) OppositeMargin ¶
func (s ShadowPreset) OppositeMargin() uint32
OppositeMargin is the margin on the edge opposite the anchor, where the shadow extends.
type SharePickerConfig ¶
type SharePickerConfig struct {
DefaultPage SharePickerPage `cfg:"default-page"`
HideTokenRestore bool `cfg:"hide-token-restore"`
// or absolute pixels (e.g. `"1200px"`).
Width Size `cfg:"width"`
// or absolute pixels.
Height Size `cfg:"height"`
ResizeSize uint32 `cfg:"resize-size"`
// (`1.0` = default) or absolute pixels.
WidgetSize Size `cfg:"widget-size"`
// (`1.0` = default) or absolute pixels.
WindowsSpacing Size `cfg:"windows-spacing"`
WindowsMinPerRow uint32 `cfg:"windows-min-per-row"`
WindowsMaxPerRow uint32 `cfg:"windows-max-per-row"`
// default 6px (`1.0` = default) or absolute pixels.
OutputsSpacing Size `cfg:"outputs-spacing"`
OutputsShowLabel bool `cfg:"outputs-show-label"`
OutputsRespectScaling bool `cfg:"outputs-respect-scaling"`
}
SharePickerConfig is the [share-picker] section (crates/wayle-config/src/schemas/share_picker/mod.rs).
Screen-share picker shown by xdg-desktop-portal when an app requests a window, output, or region to capture.
func DefaultsSharePicker ¶
func DefaultsSharePicker() SharePickerConfig
DefaultsSharePicker returns the schema defaults.
type SharePickerPage ¶
type SharePickerPage string
SharePickerPage is the page the share picker opens on (share_picker/types.rs).
Page shown when the screen-share picker opens.
const ( SharePickerWindows SharePickerPage = "windows" SharePickerOutputs SharePickerPage = "outputs" SharePickerRegion SharePickerPage = "region" )
The picker pages, in notebook order.
type SignedNormalizedF64 ¶
type SignedNormalizedF64 float64
SignedNormalizedF64 is a -1..1 float (styling/types/extractor.rs).
Floating-point value clamped to -1.0 to 1.0.
func (SignedNormalizedF64) MarshalConfig ¶
func (n SignedNormalizedF64) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*SignedNormalizedF64) UnmarshalConfig ¶
func (n *SignedNormalizedF64) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler: out of range clamps with the Rust warning.
type Size ¶
Size is a lys-shell config size: a bare number is a multiplier, a string like "4px" is absolute pixels (crates/wayle-config/src/schemas/styling/types/validated/size.rs). A negative multiplier clamps to 0 and pixels clamp to 0-10000, as the Rust type does; a string that is neither form fails to load, where the Rust type fell back to the 1.0 multiplier.
func ParseSize ¶
ParseSize is Size::parse: "Npx" is pixels, a bare number a multiplier; anything else is not a size.
func (Size) MarshalConfig ¶
MarshalConfig implements Marshaler: a multiplier is a number, pixels a string.
func (Size) PxValue ¶
PxValue is the length of a pixel size; ok is false for a multiplier (Size::px_value).
func (Size) ResolvePx ¶
ResolvePx converts the size to pixels: multipliers scale with remBase and the surface scale factor, pixel values are taken literally ignoring both. This is the Rust Size::resolve_px.
func (Size) ScaleValue ¶
ScaleValue is the multiplier of a scale size; ok is false for pixels (Size::scale_value).
func (*Size) UnmarshalConfig ¶
UnmarshalConfig implements Unmarshaler.
type StackingOrder ¶
type StackingOrder string
StackingOrder is ported from crates/wayle-config/src/schemas/modules/notification/types.rs.
Order in which popups are stacked on screen.
const ( // Newest notifications appear closest to the configured position. StackingOrderNewestFirst StackingOrder = "newest-first" // Oldest notifications appear closest to the configured position. StackingOrderOldestFirst StackingOrder = "oldest-first" )
StackingOrder values.
type StateColors ¶
type StateColors struct {
// Icon foreground color for this state.
IconColor *ColorValue `cfg:"icon-color"`
// Icon container background color for this state.
IconBgColor *ColorValue `cfg:"icon-bg-color"`
// Label text color for this state.
LabelColor *ColorValue `cfg:"label-color"`
// Button background color for this state.
ButtonBgColor *ColorValue `cfg:"button-bg-color"`
// Border color for this state.
BorderColor *ColorValue `cfg:"border-color"`
}
StateColors is ported from crates/wayle-config/src/schemas/modules/custom/types.rs.
Per-state color overrides for a custom module.
Values are keyed in `color-map` by the JSON output's `alt` field, mirroring `icon-map`. Any field left unset falls back to the module's static color of the same name. Use the `"default"` key as a fallback state.
type StorageConfig ¶
type StorageConfig struct {
// Polling interval in milliseconds.
//
// Faster polling increases CPU usage.
PollIntervalMs uint64 `cfg:"poll-interval-ms"`
// Mount point(s) to monitor (e.g., `"/"` or `["/", "/mnt/drive1"]`).
MountPoint StorageMountPoint `cfg:"mount-point"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ percent }}` - Disk usage as integer (0-100)
// - `{{ used_tib }}` - Used space in TiB
// - `{{ used_gib }}` - Used space in GiB
// - `{{ used_mib }}` - Used space in MiB
// - `{{ used_auto }}` - Used space with auto unit (e.g., "128.5 GiB")
// - `{{ total_tib }}` - Total space in TiB
// - `{{ total_gib }}` - Total space in GiB
// - `{{ total_mib }}` - Total space in MiB
// - `{{ total_auto }}` - Total space with auto unit
// - `{{ free_tib }}` - Free space in TiB
// - `{{ free_gib }}` - Free space in GiB
// - `{{ free_mib }}` - Free space in MiB
// - `{{ free_auto }}` - Free space with auto unit
// - `{{ filesystem }}` - Filesystem type (e.g., "ext4", "btrfs")
//
// ## Examples
//
// - `"{{ percent }}%"` - "45%"
// - `"{{ used_auto }}/{{ total_auto }}"` - "128.5 GiB/512.0 GiB"
// - `"{{ free_gib }} GiB free"` - "383.5 GiB free"
Format string `cfg:"format"`
// Icon name.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Dynamic color thresholds based on disk usage percentage.
//
// Entries are checked in order; the last matching entry wins for each
// color slot. Use `above` for high-value warnings (e.g., disk nearly full).
//
// ## Example
//
// “`yaml
// modules:
// storage:
// thresholds:
// - above: 70
// icon-color: status-warning
// label-color: status-warning
// - above: 90
// icon-color: status-error
// label-color: status-error
// “`
Thresholds []ThresholdEntry `cfg:"thresholds"`
}
StorageConfig is ported from crates/wayle-config/src/schemas/modules/storage/mod.rs.
Disk usage for a mount point.
func DefaultsStorage ¶
func DefaultsStorage() StorageConfig
DefaultsStorage returns the schema defaults.
func (StorageConfig) Clicks ¶
func (c StorageConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
type StorageMountPoint ¶
type StorageMountPoint struct {
// Paths are the mounts to monitor.
Paths []string
// Multiple records the list form.
Multiple bool
}
StorageMountPoint is the mount-point value: one path, or a list (the untagged Single | Multiple enum; the form round-trips).
Storage mount targets accepted by `mount-point`.
Supports a single string for backwards compatibility or an array of paths.
func (StorageMountPoint) MarshalConfig ¶
func (m StorageMountPoint) MarshalConfig() any
MarshalConfig implements Marshaler.
func (*StorageMountPoint) UnmarshalConfig ¶
func (m *StorageMountPoint) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler: a string, then an array of strings; anything else is serde's untagged error.
type StrftimeFormat ¶
type StrftimeFormat struct {
// contains filtered or unexported fields
}
StrftimeFormat is a chrono strftime format string compiled at load, so an unsupported specifier is a diagnostic for its field instead of garbage at render time. In the schema it is the plain String the Rust field holds.
func ParseStrftimeFormat ¶
func ParseStrftimeFormat(s string) (StrftimeFormat, error)
ParseStrftimeFormat compiles one format string.
func (StrftimeFormat) Layout ¶
func (f StrftimeFormat) Layout() *strftime.Layout
Layout is the compiled format.
func (StrftimeFormat) MarshalConfig ¶
func (f StrftimeFormat) MarshalConfig() any
MarshalConfig implements Marshaler.
func (StrftimeFormat) String ¶
func (f StrftimeFormat) String() string
String is the format as written.
func (*StrftimeFormat) UnmarshalConfig ¶
func (f *StrftimeFormat) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type StylingConfig ¶
type StylingConfig struct {
// Scale multiplier for dropdowns, popovers, and dialogs.
Scale ScaleFactor `cfg:"scale"`
// Corner rounding for dropdowns, popovers, and dialogs.
Rounding RoundingLevel `cfg:"rounding"`
// Light/dark appearance mode. `Auto` follows each provider / the configured
// palette; `Light`/`Dark` force the mode (static palettes swap to their
// built-in light/dark variant when one exists).
Appearance Appearance `cfg:"appearance"`
// Ask apps for higher contrast: the `contrast` preference the
// desktop portal tells GTK, Qt and Chromium apps.
HighContrast bool `cfg:"high-contrast"`
// ColorExtractor is theme-provider, theming-monitor, and the
// matugen-/wallust-/pywal- keys.
ColorExtractor ColorExtractorConfig `cfg:",inline"`
// Active color palette.
Palette PaletteConfig `cfg:"palette"`
// Currently active theme preset name, and/or the base for the
// palette when the palette has been modified. Persisted backing
// state for the theme selector; not a labeled setting of its own.
PaletteBaseTheme string `cfg:"palette_base_theme,noi18n"`
// Available is the discovered themes, populated at runtime from
// the built-ins and themes/ (never read from a config file).
Available []ThemeEntry `cfg:"-"`
}
StylingConfig is the [styling] section (crates/wayle-config/src/schemas/styling/mod.rs).
Theme, palette, and rounding tokens applied shell-wide. Changes recompile the stylesheet.
func DefaultsStyling ¶
func DefaultsStyling() StylingConfig
DefaultsStyling returns the schema defaults.
func (StylingConfig) ActivePalette ¶
func (s StylingConfig) ActivePalette() Palette
ActivePalette is the palette the static (lys-shell) provider renders: the configured [styling.palette], or — when the appearance forces light or dark and palette-base-theme names a built-in family with that variant — the variant's palette (theme_provider.rs resolve_static_palette).
type SurfaceAnimation ¶
type SurfaceAnimation struct {
// Enter transition for this surface. Unset → global `enter`, then `transition`.
Enter *AnimationType `cfg:"enter"`
// Exit transition for this surface. Unset → global `exit`, then `transition`.
Exit *AnimationType `cfg:"exit"`
// Enter duration in ms. Unset → global `enter-duration`, then `duration`.
EnterDuration *uint32 `cfg:"enter-duration"`
// Exit duration in ms. Unset → global `exit-duration`, then `duration`.
ExitDuration *uint32 `cfg:"exit-duration"`
}
SurfaceAnimation is one surface's override.
Per-surface enter/exit animation override. Any field left unset falls back to the global `[animations]` enter/exit, then to `transition`/`duration`.
type SwayWorkspacesConfig ¶
type SwayWorkspacesConfig struct {
// Show only workspaces on this bar's monitor.
//
// When `true` (default), each bar shows only its own output's
// workspaces. When `false`, all workspaces from every output are shown.
MonitorSpecific bool `cfg:"monitor-specific"`
// Hide the trailing empty workspace on each output.
//
// Off by default, since sway does not auto-allocate a trailing empty
// workspace the way niri does. Enable it if your config keeps one around.
HideTrailingEmpty bool `cfg:"hide-trailing-empty"`
// What identifies each workspace button.
//
// - `label` (default): show the workspace label per `label-strategy`
// - `icon`: show an icon from `workspace-map` (falls back to label if unmapped)
// - `none`: show nothing — only app icons visible (if enabled)
DisplayMode DisplayMode `cfg:"display-mode"`
// How to compose the workspace label when `display-mode: label`.
//
// - `index`: number only (`"1"`, `"2"`)
// - `name-or-index` (default): name when set, number otherwise
// - `name-only`: name only; unnamed workspaces show nothing
// - `index-and-name`: `"1: web"` form; unnamed workspaces show the number alone
LabelStrategy LabelStrategy `cfg:"label-strategy"`
// Pulse animation on workspaces with urgent windows.
UrgentShow bool `cfg:"urgent-show"`
// Where the urgent pulse is applied.
//
// - `workspace` (default): whole button pulses
// - `application`: only the urgent app icon pulses, falling back to
// `workspace` when app icons are disabled
UrgentMode UrgentMode `cfg:"urgent-mode"`
// Visual indicator for the active workspace.
ActiveIndicator ActiveIndicator `cfg:"active-indicator"`
// Text separator between workspace identity and app icons.
Divider string `cfg:"divider"`
// Show application icons for windows on each workspace.
AppIconsShow bool `cfg:"app-icons-show"`
// Deduplicate application icons within a workspace.
//
// When `true`, one icon per unique `app_id`. When `false`, one icon
// per window.
AppIconsDedupe bool `cfg:"app-icons-dedupe"`
// Fallback icon for applications not matched by `app-icon-map`.
AppIconsFallback string `cfg:"app-icons-fallback"`
// Icon shown when a workspace has no application windows.
AppIconsEmpty string `cfg:"app-icons-empty"`
// Gap between app icons within a workspace button. Accepts a scale multiplier or pixels (e.g. `"4px"`).
IconGap Size `cfg:"icon-gap"`
// Padding along the bar direction for content wider than the circle: app icons, a divider or a long name. Accepts a scale multiplier or pixels (e.g. `"8px"`).
//
// A short label takes no padding. It sets the circle's size instead: at least a digit's width plus this padding on each side.
WorkspacePadding Size `cfg:"workspace-padding"`
// Workspace icon size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
//
// Applies to identity icons and custom icons from `workspace-map`.
IconSize Size `cfg:"icon-size"`
// Workspace label and divider size. Accepts a scale multiplier or pixels (e.g. `"16px"`).
LabelSize Size `cfg:"label-size"`
// Workspaces to hide from the display.
//
// Glob patterns matched against the workspace's name, then its number,
// then its stable id. Examples:
// - `"scratch"` — hide the workspace named `scratch`
// - `"1?"` — hide numbers 10-19
WorkspaceIgnore []string `cfg:"workspace-ignore"`
// Color for the active (visible on its output) workspace.
//
// In `background` indicator mode, also used as the button background.
ActiveColor ColorValue `cfg:"active-color"`
// Color for occupied workspaces (have windows but not active).
OccupiedColor ColorValue `cfg:"occupied-color"`
// Color for empty workspaces and placeholder slots.
EmptyColor ColorValue `cfg:"empty-color"`
// Background color for the workspaces container.
ContainerBgColor ColorValue `cfg:"container-bg-color"`
// Display border around the workspaces container.
BorderShow bool `cfg:"border-show"`
// Border color for the workspaces container.
BorderColor ColorValue `cfg:"border-color"`
// Per-workspace icon and color overrides, keyed by name or id-as-string.
//
// ## Example
//
// “`yaml
// modules:
// sway-workspaces:
// workspace-map:
// web: {icon: ld-globe-symbolic, color: "#4a90d9"}
// terminal: {icon: ld-terminal-symbolic}
// “`
WorkspaceMap NamedWorkspaceMap `cfg:"workspace-map"`
// Application icon mapping with glob pattern support.
//
// Maps window `app_id` or title to symbolic icon names. Supports:
// - No prefix: matches `app_id` (e.g. `"*firefox*"`)
// - `app:` prefix: explicit `app_id` match (e.g. `"app:org.mozilla.*"`)
// - `title:` prefix: matches window title (e.g. `"title:*YouTube*"`)
//
// ## Example
//
// “`yaml
// modules:
// sway-workspaces:
// app-icon-map:
// "*firefox*": ld-globe-symbolic
// "title:*YouTube*": ld-youtube-symbolic
// “`
AppIconMap map[string]string `cfg:"app-icon-map"`
// Action on left click.
LeftClick WorkspaceClickAction `cfg:"left-click"`
// Action on middle click.
MiddleClick WorkspaceClickAction `cfg:"middle-click"`
// Action on right click.
RightClick WorkspaceClickAction `cfg:"right-click"`
// Action on scroll up.
ScrollUp WorkspaceClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown WorkspaceClickAction `cfg:"scroll-down"`
}
SwayWorkspacesConfig is ported from crates/wayle-config/src/schemas/modules/sway_workspaces/mod.rs.
sway workspace indicators with click-to-switch.
func DefaultsSwayWorkspaces ¶
func DefaultsSwayWorkspaces() SwayWorkspacesConfig
DefaultsSwayWorkspaces returns the schema defaults.
func (SwayWorkspacesConfig) Clicks ¶
func (c SwayWorkspacesConfig) Clicks() WorkspaceClicks
Clicks returns the five input bindings.
func (SwayWorkspacesConfig) View ¶
func (c SwayWorkspacesConfig) View() CompositorWorkspacesConfig
View returns the shared sway/niri view.
type SystrayConfig ¶
type SystrayConfig struct {
// Tray item icon size. Accepts a scale multiplier or pixels (e.g. `"20px"`).
IconScale Size `cfg:"icon-scale"`
// Gap between tray items. Accepts a scale multiplier or pixels (e.g. `"4px"`).
ItemGap Size `cfg:"item-gap"`
// Padding at the ends of the container. Accepts a scale multiplier or pixels (e.g. `"8px"`).
//
// Applies to left/right edges for horizontal bars, or top/bottom edges
// for vertical bars.
InternalPadding Size `cfg:"internal-padding"`
// Glob patterns for tray items to hide.
//
// Matches against item ID or title.
// Example: `["*discord*", "Steam"]`
Blacklist []string `cfg:"blacklist"`
// Custom icon and color overrides.
//
// First matching override wins. Supports glob patterns.
//
// “`yaml
// modules:
// systray:
// overrides:
// - name: "*discord*"
// icon: si-discord-symbolic
// color: blue
// “`
Overrides []TrayItemOverride `cfg:"overrides"`
// Display border around container.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Container background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
}
SystrayConfig is ported from crates/wayle-config/src/schemas/modules/systray/mod.rs.
System tray icons via the StatusNotifierItem protocol.
func DefaultsSystray ¶
func DefaultsSystray() SystrayConfig
DefaultsSystray returns the schema defaults.
type TemperatureUnit ¶
type TemperatureUnit string
TemperatureUnit is ported from crates/wayle-config/src/schemas/modules/weather/mod.rs.
Temperature unit for display.
const ( // Celsius (metric). TemperatureUnitMetric TemperatureUnit = "metric" // Fahrenheit (imperial). TemperatureUnitImperial TemperatureUnit = "imperial" )
TemperatureUnit values.
type ThemeEntry ¶
ThemeEntry is one theme available for selection: a built-in, or a user theme file.
func BuiltinThemes ¶
func BuiltinThemes() []ThemeEntry
BuiltinThemes returns every built-in theme, in the Rust order.
func LoadThemes ¶
func LoadThemes(dir string) (themes []ThemeEntry, skipped []error)
LoadThemes discovers the selectable themes: the built-ins first, then every <dir>/*.yaml (or .yml) theme file named by its file stem. A missing or unreadable directory yields the built-ins alone. A file that cannot be read or parsed, or whose name is already taken, is skipped; each skip comes back in skipped for the caller to log, as load_themes logs them (infrastructure/themes/utils.rs). Files load in name order.
type ThemeProvider ¶
type ThemeProvider string
ThemeProvider is where palette values come from (styling/types/color.rs).
Source of color palette values.
Dynamic providers (Matugen, Pywal, Wallust) inject palette tokens at runtime.
const ( // Static theming using lys-shell's built-in palettes. ThemeProviderLysShell ThemeProvider = "lys-shell" // Dynamic theming via Matugen. ThemeProviderMatugen ThemeProvider = "matugen" // Dynamic theming via Pywal. ThemeProviderPywal ThemeProvider = "pywal" // Dynamic theming via Wallust. ThemeProviderWallust ThemeProvider = "wallust" )
Theme providers; lys-shell is the default.
type ThresholdColors ¶
type ThresholdColors struct {
IconColor *ColorValue
LabelColor *ColorValue
IconBgColor *ColorValue
ButtonBgColor *ColorValue
BorderColor *ColorValue
}
ThresholdColors is the merged override set of every matching entry; a nil slot keeps the module's configured color.
func EvaluateThresholds ¶
func EvaluateThresholds(value float64, entries []ThresholdEntry) ThresholdColors
EvaluateThresholds walks the entries in order; for each color slot the last matching entry that sets it wins (evaluate_thresholds). The slots are copies, so a caller cannot alias the config.
func (ThresholdColors) IsEmpty ¶
func (c ThresholdColors) IsEmpty() bool
IsEmpty reports whether no slot is overridden.
type ThresholdEntry ¶
type ThresholdEntry struct {
// Activate when metric value >= this threshold.
Above *float64 `cfg:"above"`
// Activate when metric value <= this threshold.
Below *float64 `cfg:"below"`
// Override icon color when threshold is active.
IconColor *ColorValue `cfg:"icon-color"`
// Override label color when threshold is active.
LabelColor *ColorValue `cfg:"label-color"`
// Override icon background color when threshold is active.
IconBgColor *ColorValue `cfg:"icon-bg-color"`
// Override button background color when threshold is active.
ButtonBgColor *ColorValue `cfg:"button-bg-color"`
// Override border color when threshold is active.
BorderColor *ColorValue `cfg:"border-color"`
}
ThresholdEntry maps a numeric range to color overrides (crates/wayle-config/src/schemas/styling/types/threshold.rs).
A threshold entry that maps a numeric value range to color overrides.
At least one of `above` or `below` must be set. When both are set, both conditions must be satisfied (AND logic).
## YAML Example
```yaml # under modules.cpu thresholds: - {above: 70, icon-color: status-warning, label-color: status-warning} - {above: 90, icon-color: status-error, label-color: status-error} ```
func (ThresholdEntry) Matches ¶
func (t ThresholdEntry) Matches(value float64) bool
Matches reports whether value falls in the entry's range: both set bounds hold (inclusive), and an entry with neither bound never matches.
type TimeFormat ¶
type TimeFormat string
TimeFormat is ported from crates/wayle-config/src/schemas/modules/types.rs.
Time display format.
const ( // 12-hour format with AM/PM (e.g., "6:30 AM"). TimeFormat12h TimeFormat = "12h" // 24-hour format (e.g., "06:30"). TimeFormat24h TimeFormat = "24h" )
TimeFormat values.
type ToastPreset ¶
type ToastPreset struct {
// Unique identifier. Trigger with `lys-shell toast --preset <id>`.
ID string `cfg:"id,required"`
// Toast text. An explicit label on the command line overrides this.
Label *string `cfg:"label,default"`
// Symbolic icon name shown beside the text.
Icon *string `cfg:"icon,default"`
}
ToastPreset is one `osd.presets` entry.
A reusable toast preset, triggerable by id with `lys-shell toast --preset <id>`.
A preset captures a toast's text and icon so it can be fired by name. The label/icon can still be overridden per invocation, and runtime-only fields (`--percentage`, `--duration`, `--class`) are supplied at invoke time, not stored on the preset. Duration always follows the OSD config.
## Example
```yaml osd: {presets: [{id: saved, label: Saved, icon: ld-check-symbolic}]}
# Fire it: lys-shell toast --preset saved # With a progress bar: lys-shell toast --preset saved --percentage 80 ```
type TrayItemOverride ¶
type TrayItemOverride struct {
// Glob pattern to match against item ID or title.
//
// Examples: `"discord"`, `"*Discord*"`, `"org.kde.*"`
Name string `cfg:"name,required"`
// Custom icon name (symbolic icon).
Icon *string `cfg:"icon"`
// Custom icon color.
Color *ColorValue `cfg:"color"`
}
TrayItemOverride is ported from crates/wayle-config/src/schemas/modules/systray/mod.rs.
Custom icon and color override for tray items matching a pattern.
type TreemanConfig ¶
type TreemanConfig struct {
// Format string for the label.
//
// ## Placeholders
//
// - `{{ total }}` - Total active worktrees
// - `{{ stable }}` - Worktrees in the ready bucket
// - `{{ up }}` - Worktrees preparing
// - `{{ down }}` - Worktrees tearing down
// - `{{ failed }}` - Worktrees whose last finalize errored
//
// ## Examples
//
// - `"{{ total }}"` - "7"
// - `"{{ total }} ({{ failed }}!)"` - "7 (1!)"
Format string `cfg:"format"`
// Module icon (shown when every worktree is resting-ready).
IconName string `cfg:"icon-name"`
// Icon shown while any worktree is being prepared.
IconPreparing string `cfg:"icon-preparing"`
// Icon shown while any worktree is being torn down.
IconTearingDown string `cfg:"icon-tearing-down"`
// Icon shown when any worktree's last finalize errored.
IconFailed string `cfg:"icon-failed"`
// Collapse the module entirely when there are no active worktrees.
HideIfEmpty bool `cfg:"hide-if-empty"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display count label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
TreemanConfig is ported from crates/wayle-config/src/schemas/modules/treeman/mod.rs.
treeman worktree health across all registered repos, in a dropdown.
func DefaultsTreeman ¶
func DefaultsTreeman() TreemanConfig
DefaultsTreeman returns the schema defaults.
func (TreemanConfig) Clicks ¶
func (c TreemanConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (TreemanConfig) Icon ¶
func (c TreemanConfig) Icon() IconConfig
Icon is the treeman stable icon.
type Unmarshaler ¶
Unmarshaler is implemented by leaf types with their own decoding from the layer tree: string | int64 | float64 | bool | []any | map[string]any. The error text becomes the diagnostic's Error line, so it follows serde's wording where the Rust type is a serde type.
type UrgencyBarThreshold ¶
type UrgencyBarThreshold string
UrgencyBarThreshold is ported from crates/wayle-config/src/schemas/modules/notification/types.rs.
Minimum urgency level that shows a colored urgency bar on popup cards.
All urgency levels at or above the threshold display the bar. For example, `Normal` shows bars on both normal and critical popups.
const ( // Show urgency bars on all popups. UrgencyBarThresholdLow UrgencyBarThreshold = "low" // Show urgency bars on normal and critical popups. UrgencyBarThresholdNormal UrgencyBarThreshold = "normal" // Show urgency bars on critical popups only. UrgencyBarThresholdCritical UrgencyBarThreshold = "critical" // Never show urgency bars. UrgencyBarThresholdNone UrgencyBarThreshold = "none" )
UrgencyBarThreshold values.
type UrgentMode ¶
type UrgentMode string
UrgentMode is ported from crates/wayle-config/src/schemas/modules/hyprland_workspaces/mod.rs.
Where the urgent pulse animation is applied.
const ( // Pulse the entire workspace. UrgentWorkspace UrgentMode = "workspace" // Pulse only the app icon(s) belonging to the urgent window. // // Falls back to `workspace` when app icons are disabled. UrgentApplication UrgentMode = "application" )
UrgentMode values.
type UserSessionConfig ¶
type UserSessionConfig struct {
// Session actions to show on dashboard
Actions []SessionAction `cfg:"actions"`
}
UserSessionConfig is ported from crates/wayle-config/src/schemas/modules/dashboard/mod.rs.
Settings for user session the in dashboard ## Examples
```yaml modules: {dashboard: {user-session: {actions: [lock, log-out, reboot, power-off]}}} ```
func DefaultsUserSession ¶
func DefaultsUserSession() UserSessionConfig
DefaultsUserSession returns the schema defaults.
type ValueSource ¶
type ValueSource int
ValueSource is the layer a field's effective value comes from: the built-in default, the config file, or a runtime override (wayle-config's ValueSource) - what the settings GUI badges.
const ( SourceDefault ValueSource = iota SourceConfig SourceRuntime )
The layers, lowest first.
func (ValueSource) String ¶
func (v ValueSource) String() string
type VolumeConfig ¶
type VolumeConfig struct {
// Icons for volume levels from low to maximum.
//
// The percentage is divided evenly among icons. With 3 icons:
// 1-33% uses icons\[0\], 34-66% uses icons\[1\], 67-100% uses icons\[2\].
LevelIcons []string `cfg:"level-icons"`
// Icon shown when audio output is muted.
IconMuted string `cfg:"icon-muted"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display percentage label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ percent }}` - Volume (0-100)
//
// ## Examples
//
// - `"{{ percent }}%"` - "45%"
Format string `cfg:"format"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click. Default opens the audio dropdown.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click. Default toggles mute.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
// Icon source for app volume entries in the audio dropdown.
DropdownAppIcons AppIconSource `cfg:"dropdown-app-icons"`
// Dynamic color thresholds based on volume percentage.
//
// Entries are checked in order; the last matching entry wins for each
// color slot. Use `above` for high-value warnings (e.g., boosted volume).
//
// ## Example
//
// “`yaml
// modules:
// volume:
// thresholds:
// - above: 100
// icon-color: status-warning
// label-color: status-warning
// - above: 130
// icon-color: status-error
// label-color: status-error
// “`
Thresholds []ThresholdEntry `cfg:"thresholds"`
}
VolumeConfig is ported from crates/wayle-config/src/schemas/modules/volume/mod.rs.
Output volume control with a dropdown for device and app volumes.
func DefaultsVolume ¶
func DefaultsVolume() VolumeConfig
DefaultsVolume returns the schema defaults.
func (VolumeConfig) Clicks ¶
func (c VolumeConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (VolumeConfig) Icon ¶
func (c VolumeConfig) Icon() IconConfig
Icon is the volume icon at full level; the module swaps the name by level and mute state.
type VpnShow ¶
type VpnShow string
VpnShow is ported from crates/wayle-config/src/schemas/modules/network/vpn.rs.
Whether the VPN indicator is part of the network module.
type WallpaperConfig ¶
type WallpaperConfig struct {
// A single image file to use as the wallpaper on all monitors. Leave empty
// to use cycling and/or per-monitor overrides instead; a monitor none of
// them gives an image shows the built-in wallpaper.
Wallpaper string `cfg:"wallpaper"`
// How the wallpaper is scaled to the screen. Per-monitor entries in
// `wallpaper.monitors` override this.
FitMode FitMode `cfg:"fit-mode"`
// Directory of images to cycle through. Set it to enable cycling; leave
// empty to disable. Takes precedence over the single `wallpaper` image.
CyclingDirectory string `cfg:"cycling-directory"`
// Wallpaper cycling order.
CyclingMode CyclingMode `cfg:"cycling-mode"`
// Time between wallpaper changes in minutes.
CyclingIntervalMins CyclingInterval `cfg:"cycling-interval-mins"`
// Show the same cycling wallpaper on all monitors. Only affects shuffle
// mode since sequential already displays the same image.
CyclingSameImage bool `cfg:"cycling-same-image"`
// Per-monitor wallpaper and fit mode settings. Each entry targets a
// monitor by connector name. See [`MonitorWallpaperConfig`] for the
// available fields.
//
// ## Example
//
// “`yaml
// wallpaper:
// monitors:
// - name: DP-1
// wallpaper: /home/me/pictures/wall-primary.png
// fit-mode: fill
// - name: HDMI-1
// wallpaper: /home/me/pictures/wall-secondary.png
// fit-mode: fit
// “`
Monitors []MonitorWallpaperConfig `cfg:"monitors"`
}
WallpaperConfig is the `wallpaper` section (crates/wayle-config/src/schemas/wallpaper): what each monitor shows and how. Resolution order: a cycling directory, else the single Wallpaper image; Monitors entries apply on top.
Wallpaper rendering, cycling, and per-monitor overrides.
func DefaultsWallpaper ¶
func DefaultsWallpaper() WallpaperConfig
DefaultsWallpaper returns the schema defaults.
func (WallpaperConfig) Monitor ¶
func (w WallpaperConfig) Monitor(name string) (MonitorWallpaperConfig, bool)
Monitor finds the entry for a connector.
type WallustBackend ¶
type WallustBackend string
WallustBackend is a color-extractor parameter (styling/types/extractor.rs).
Wallust image sampling backend.
const ( // Reads every pixel. WallustBackendFull WallustBackend = "full" // Resizes image before sampling. WallustBackendResized WallustBackend = "resized" // Uses ImageMagick convert (pywal method). WallustBackendWal WallustBackend = "wal" // Fixed 512x512 thumbnail. WallustBackendThumb WallustBackend = "thumb" // SIMD-accelerated resize. WallustBackendFastresize WallustBackend = "fastresize" // K-means clustering. WallustBackendKmeans WallustBackend = "kmeans" )
WallustBackend values.
type WallustColorspace ¶
type WallustColorspace string
WallustColorspace is a color-extractor parameter (styling/types/extractor.rs).
Wallust color space for dominant color selection.
const ( // CIELAB perceptual color space. WallustColorspaceLab WallustColorspace = "lab" // LAB with mixing for sparse images. WallustColorspaceLabmixed WallustColorspace = "labmixed" // Cylindrical LAB (hue/chroma/lightness). WallustColorspaceLch WallustColorspace = "lch" // LCH with mixing. WallustColorspaceLchmixed WallustColorspace = "lchmixed" // LCH mapped to ANSI color ordering. WallustColorspaceLchansi WallustColorspace = "lchansi" )
WallustColorspace values.
type WallustPalette ¶
type WallustPalette string
WallustPalette is a color-extractor parameter (styling/types/extractor.rs).
Wallust palette mode.
const ( // 8 dark colors with 16-color trick. WallustPaletteDark16 WallustPalette = "dark16" // 8 dark colors, dark background and light contrast. WallustPaletteDark WallustPalette = "dark" // Dark with complementary counterparts. WallustPaletteDarkcomp WallustPalette = "darkcomp" // Dark complementary with 16-color trick. WallustPaletteDarkcomp16 WallustPalette = "darkcomp16" // Dark with hard hue colors. WallustPaletteHarddark WallustPalette = "harddark" // Hard dark with 16-color trick. WallustPaletteHarddark16 WallustPalette = "harddark16" // Hard dark complementary variant. WallustPaletteHarddarkcomp WallustPalette = "harddarkcomp" // Hard dark complementary with 16-color trick. WallustPaletteHarddarkcomp16 WallustPalette = "harddarkcomp16" // Light background, dark foreground. WallustPaletteLight WallustPalette = "light" // Light with 16-color trick. WallustPaletteLight16 WallustPalette = "light16" // Light with complementary colors. WallustPaletteLightcomp WallustPalette = "lightcomp" // Light complementary with 16-color trick. WallustPaletteLightcomp16 WallustPalette = "lightcomp16" // Lightest colors with dark background. WallustPaletteSoftdark WallustPalette = "softdark" // Soft dark with 16-color trick. WallustPaletteSoftdark16 WallustPalette = "softdark16" // Soft dark complementary variant. WallustPaletteSoftdarkcomp WallustPalette = "softdarkcomp" // Soft dark complementary with 16-color trick. WallustPaletteSoftdarkcomp16 WallustPalette = "softdarkcomp16" // Light with soft pastel colors. WallustPaletteSoftlight WallustPalette = "softlight" // Soft light with 16-color trick. WallustPaletteSoftlight16 WallustPalette = "softlight16" // Soft light with complementary colors. WallustPaletteSoftlightcomp WallustPalette = "softlightcomp" // Soft light complementary with 16-color trick. WallustPaletteSoftlightcomp16 WallustPalette = "softlightcomp16" // ANSI-ordered dark palette for LS_COLORS. WallustPaletteAnsidark WallustPalette = "ansidark" // ANSI dark with 16-color trick. WallustPaletteAnsidark16 WallustPalette = "ansidark16" )
WallustPalette values.
func (WallustPalette) IsLight ¶
func (p WallustPalette) IsLight() bool
IsLight reports whether the palette produces a light background.
type WeatherConfig ¶
type WeatherConfig struct {
// Weather data provider.
Provider WeatherProvider `cfg:"provider"`
// Location for weather data (city name or "lat,lon" coordinates).
Location string `cfg:"location"`
// Temperature unit.
Units TemperatureUnit `cfg:"units"`
// Format string for the label.
//
// ## Placeholders
//
// - `{{ temp }}` - Current temperature (e.g., "72")
// - `{{ temp_unit }}` - Temperature unit symbol ("°F" or "°C")
// - `{{ feels_like }}` - Feels-like temperature
// - `{{ condition }}` - Weather condition text (e.g., "Cloudy")
// - `{{ humidity }}` - Humidity percentage (e.g., "65%")
// - `{{ wind_speed }}` - Wind speed with unit (e.g., "12 km/h")
// - `{{ wind_dir }}` - Wind direction (e.g., "NW")
// - `{{ high }}` - Today's high temperature
// - `{{ low }}` - Today's low temperature
//
// ## Examples
//
// - `"{{ temp }}{{ temp_unit }}"` - "22°C"
// - `"{{ temp }}{{ temp_unit }} {{ condition }}"` - "22°C Partly Cloudy"
// - `"{{ temp }}{{ temp_unit }} H:{{ high }} L:{{ low }}"` - "22°C H:25 L:18"
Format string `cfg:"format"`
// Time display format for sunrise/sunset and hourly forecast.
TimeFormat TimeFormat `cfg:"time-format"`
// Polling interval in seconds.
RefreshIntervalSeconds uint32 `cfg:"refresh-interval-seconds"`
// Visual Crossing API key. Supports `$VAR_NAME` syntax to reference
// environment variables from `.*.env` files in the config directory.
VisualCrossingKey *string `cfg:"visual-crossing-key"`
// WeatherAPI.com API key. Supports `$VAR_NAME` syntax to reference
// environment variables from `.*.env` files in the config directory.
WeatherapiKey *string `cfg:"weatherapi-key"`
// Fallback icon for weather.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display temperature label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
WeatherConfig is ported from crates/wayle-config/src/schemas/modules/weather/mod.rs.
Current conditions with hourly and daily forecasts in a dropdown.
func DefaultsWeather ¶
func DefaultsWeather() WeatherConfig
DefaultsWeather returns the schema defaults.
func (WeatherConfig) Clicks ¶
func (c WeatherConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (WeatherConfig) Icon ¶
func (c WeatherConfig) Icon() IconConfig
Icon is the weather fallback icon.
type WeatherProvider ¶
type WeatherProvider string
WeatherProvider is ported from crates/wayle-config/src/schemas/modules/weather/mod.rs.
Weather data provider selection.
const ( // Open-Meteo (no API key required). WeatherProviderOpenMeteo WeatherProvider = "open-meteo" // Visual Crossing (requires API key). WeatherProviderVisualCrossing WeatherProvider = "visual-crossing" // WeatherAPI.com (requires API key). WeatherProviderWeatherApi WeatherProvider = "weather-api" )
WeatherProvider values.
type WeekStart ¶
type WeekStart string
WeekStart is ported from crates/wayle-config/src/schemas/modules/clock/mod.rs.
Which day appears in the first column of the calendar dropdown.
const ( // Week starts on Monday. WeekStartMonday WeekStart = "monday" // Week starts on Tuesday. WeekStartTuesday WeekStart = "tuesday" // Week starts on Wednesday. WeekStartWednesday WeekStart = "wednesday" // Week starts on Thursday. WeekStartThursday WeekStart = "thursday" // Week starts on Friday. WeekStartFriday WeekStart = "friday" // Week starts on Saturday. WeekStartSaturday WeekStart = "saturday" // Week starts on Sunday (default). WeekStartSunday WeekStart = "sunday" )
WeekStart values.
type WindowTitleConfig ¶
type WindowTitleConfig struct {
// Format string for the label.
//
// ## Placeholders
//
// - `{{ title }}` - Window title
// - `{{ app }}` - Application name (WM_CLASS on Hyprland)
//
// ## Examples
//
// - `"{{ title }}"` - "README.md - VSCode"
// - `"{{ app }}: {{ title }}"` - "firefox: GitHub"
Format string `cfg:"format"`
// Fallback icon when no mapping matches.
IconName string `cfg:"icon-name"`
// Icon mappings. Glob patterns to icon names.
//
// Keys are patterns matching the window class (default) or title (when
// prefixed with `title:`). Values are icon names from the installed icon
// set. User mappings are checked before built-in mappings.
//
// ## Example
//
// “`yaml
// modules:
// window-title:
// icon-mappings:
// "*firefox*": ld-globe-symbolic
// "org.mozilla.*": ld-globe-symbolic
// "title:*YouTube*": ld-youtube-symbolic
// “`
IconMappings map[string]string `cfg:"icon-mappings"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display text label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
WindowTitleConfig is ported from crates/wayle-config/src/schemas/modules/window_title/mod.rs.
Active window title with optional app-icon prefix.
func DefaultsWindowTitle ¶
func DefaultsWindowTitle() WindowTitleConfig
DefaultsWindowTitle returns the schema defaults.
func (WindowTitleConfig) Clicks ¶
func (c WindowTitleConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (WindowTitleConfig) Icon ¶
func (c WindowTitleConfig) Icon() IconConfig
Icon is the window-title fallback icon.
func (WindowTitleConfig) IconMappingsSorted ¶
func (c WindowTitleConfig) IconMappingsSorted() []IconMapping
IconMappingsSorted is icon-mappings in pattern order, the BTreeMap order the Rust lookup walks.
type WorkspaceClickAction ¶
type WorkspaceClickAction struct {
Kind WorkspaceClickKind
// Arg is the dropdown name or the shell command.
Arg string
}
WorkspaceClickAction is one workspace-module binding: focus:this, focus:next, focus:previous, focus:last, dropdown:NAME, a shell command, or empty for none (niri_workspaces WorkspaceClickAction).
func ParseWorkspaceClickAction ¶
func ParseWorkspaceClickAction(s string) WorkspaceClickAction
ParseWorkspaceClickAction parses the schema string; like the Rust from_str it never fails, anything unrecognized is a shell command.
func (WorkspaceClickAction) MarshalConfig ¶
func (a WorkspaceClickAction) MarshalConfig() any
MarshalConfig implements Marshaler.
func (WorkspaceClickAction) String ¶
func (a WorkspaceClickAction) String() string
String serializes back to the schema form.
func (*WorkspaceClickAction) UnmarshalConfig ¶
func (a *WorkspaceClickAction) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler.
type WorkspaceClickKind ¶
type WorkspaceClickKind int
WorkspaceClickKind discriminates a WorkspaceClickAction.
const ( WorkspaceClickNone WorkspaceClickKind = iota WorkspaceClickFocusThis WorkspaceClickFocusNext WorkspaceClickFocusPrevious WorkspaceClickFocusLast WorkspaceClickDropdown WorkspaceClickShell )
Workspace click kinds.
type WorkspaceClicks ¶
type WorkspaceClicks struct {
LeftClick WorkspaceClickAction
RightClick WorkspaceClickAction
MiddleClick WorkspaceClickAction
ScrollUp WorkspaceClickAction
ScrollDown WorkspaceClickAction
}
WorkspaceClicks carries a workspace module's five bindings.
type WorkspaceMap ¶
type WorkspaceMap map[int32]WorkspaceStyle
WorkspaceMap is hyprland's workspace-map: styles keyed by numeric workspace id, the string keys parsed as i32.
Per-workspace icon and color overrides, keyed by workspace ID.
Keys are written as strings, so `"1"` parses into the workspace with ID `1`. Negative IDs refer to Hyprland's special workspaces. Keys that don't appear in the map fall back to the default behaviour set by [`HyprlandWorkspacesConfig::display_mode`].
## Examples
```yaml # under modules.hyprland-workspaces.workspace-map "1": {label: Web, icon: ld-globe-symbolic, color: "#4a90d9"} "2": {icon: ld-terminal-symbolic} "3": {icon: ld-code-symbolic, color: accent} "4": {label: Chat, icon: ld-message-square-symbolic, color: status-success}
# Negative IDs target Hyprland special workspaces "-99": {icon: ld-scratch-symbolic} ```
func (WorkspaceMap) Lookup ¶
func (m WorkspaceMap) Lookup(id int32) (WorkspaceStyle, bool)
Lookup returns the style of one workspace id.
func (WorkspaceMap) MarshalConfig ¶
func (m WorkspaceMap) MarshalConfig() any
MarshalConfig implements Marshaler: keys in numeric order, as the Rust BTreeMap<i32, _> iterates them.
func (*WorkspaceMap) UnmarshalConfig ¶
func (m *WorkspaceMap) UnmarshalConfig(v any) error
UnmarshalConfig implements Unmarshaler: a table of styles whose keys must parse as i32.
type WorkspaceStyle ¶
type WorkspaceStyle struct {
// Custom icon for this workspace. When set, the icon is shown regardless
// of the module's `display-mode`, so a row can mix labelled workspaces
// with icon-only ones (e.g. `[1][2][icon]`).
Icon *string `cfg:"icon"`
// Custom background color for this workspace when active.
Color *ColorValue `cfg:"color"`
// Text shown instead of the workspace's name or index.
Label *string `cfg:"label"`
}
WorkspaceStyle is ported from crates/wayle-config/src/schemas/modules/hyprland_workspaces/mod.rs.
Per-workspace styling override.
type WorldClockConfig ¶
type WorldClockConfig struct {
// Format string with embedded timezone blocks.
//
// Use `{{ tz('timezone', 'strftime') }}` to insert a formatted time.
// Anything outside a placeholder stays as literal text.
//
// ## Examples
//
// | Format string | Renders as |
// |---|---|
// | `"{{ tz('UTC', '%H:%M %Z') }}"` | `14:30 UTC` |
// | `"NYC {{ tz('America/New_York', '%H:%M') }} TYO {{ tz('Asia/Tokyo', '%H:%M') }}"` | `NYC 09:30 TYO 23:30` |
// | `"{{ tz('America/New_York', '%H:%M %Z') }} \| {{ tz('Europe/London', '%H:%M %Z') }}"` | `09:30 EST \| 14:30 GMT` |
Format string `cfg:"format"`
// Symbolic icon name.
IconName string `cfg:"icon-name"`
// Display border around button.
BorderShow bool `cfg:"border-show"`
// Border color token.
BorderColor ColorValue `cfg:"border-color"`
// Display module icon.
IconShow bool `cfg:"icon-show"`
// Icon foreground color. Auto selects based on variant for contrast.
IconColor ColorValue `cfg:"icon-color"`
// Icon container background color token.
IconBgColor ColorValue `cfg:"icon-bg-color"`
// Display text label.
LabelShow bool `cfg:"label-show"`
// Label text color token.
LabelColor ColorValue `cfg:"label-color"`
// Max label characters before truncation with ellipsis. Set to 0 to disable.
LabelMaxLength uint32 `cfg:"label-max-length"`
// Button background color token.
ButtonBgColor ColorValue `cfg:"button-bg-color"`
// Action on left click.
LeftClick ClickAction `cfg:"left-click"`
// Action on right click.
RightClick ClickAction `cfg:"right-click"`
// Action on middle click.
MiddleClick ClickAction `cfg:"middle-click"`
// Action on scroll up.
ScrollUp ClickAction `cfg:"scroll-up"`
// Action on scroll down.
ScrollDown ClickAction `cfg:"scroll-down"`
}
WorldClockConfig is ported from crates/wayle-config/src/schemas/modules/world_clock/mod.rs.
Multiple timezones shown together in a dropdown.
func DefaultsWorldClock ¶
func DefaultsWorldClock() WorldClockConfig
DefaultsWorldClock returns the schema defaults.
func (WorldClockConfig) Clicks ¶
func (c WorldClockConfig) Clicks() ClickConfig
Clicks returns the five input bindings.
func (WorldClockConfig) Icon ¶
func (c WorldClockConfig) Icon() IconConfig
Icon is the world-clock icon.
Source Files
¶
- animations.go
- bar.go
- baritem.go
- barstyle.go
- battery.go
- bitwarden.go
- bitwardengenerator.go
- bluetooth.go
- brightness.go
- buttonview.go
- cava.go
- cli.go
- clickaction.go
- clipboard.go
- clock.go
- colorvalue.go
- config.go
- cpu.go
- custom.go
- dashboard.go
- decode.go
- diagnostic.go
- docs.go
- dropdowns.go
- enum.go
- extractor.go
- field.go
- fields.go
- general.go
- hexcolor.go
- hyprlandworkspaces.go
- i18n.go
- icon.go
- iconviews.go
- idleinhibit.go
- keybindmode.go
- keyboardinput.go
- launcher.go
- layers.go
- load.go
- lockblur.go
- login.go
- loginmigrate.go
- lyswmworkspaces.go
- mail.go
- mangoworkspaces.go
- media.go
- microphone.go
- modules.go
- monitor.go
- netstat.go
- network.go
- newtypes.go
- nightlight.go
- niriworkspaces.go
- notification.go
- osd.go
- portal.go
- power.go
- powerprofiles.go
- ram.go
- recorder.go
- removed.go
- schema.go
- schemadoc_gen.go
- screenshot.go
- secrets.go
- separator.go
- service.go
- sharepicker.go
- source.go
- stateviews.go
- storage.go
- strftimeformat.go
- styling.go
- swayworkspaces.go
- systray.go
- themes.go
- threshold.go
- tree.go
- treeman.go
- types.go
- volume.go
- wallpaper.go
- watch.go
- weather.go
- windowtitle.go
- windowtitle_icons.go
- workspaces.go
- worldclock.go
- yamlwrite.go
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
schemadoc
Package schemadoc extracts the config schema descriptions from the config package's doc comments, the way schemars reads Rust doc comments: a type's description is its doc after the first paragraph (the Go sentence naming the type, which revive requires), a field's is its whole doc, and an enum variant's is its constant's doc.
|
Package schemadoc extracts the config schema descriptions from the config package's doc comments, the way schemars reads Rust doc comments: a type's description is its doc after the first paragraph (the Go sentence naming the type, which revive requires), a field's is its whole doc, and an enum variant's is its constant's doc. |
|
schemadoc/cmd
command
Command schemadoc regenerates config/schemadoc_gen.go; run it through `go generate ./config`.
|
Command schemadoc regenerates config/schemadoc_gen.go; run it through `go generate ./config`. |