Releases: BlueManCZ/hyprland-state
Releases · BlueManCZ/hyprland-state
v0.4.3
v0.4.2
v0.4.1
v0.4.0
Added
hyprland_state.dispatchers_for_effect(name, args, window)andrevert_dispatchers_for_effect(name, args, window)— per-window retroactive dispatch translation for Hyprland window-rule effects. Returns the(dispatcher, arg)tuples that bring an already-mapped window into a rule's target state (apply path) or back out of it (revert path).hyprland_state.SETPROP_PASSTHROUGH_EFFECTSandhyprland_state.RETROACTIVE_EFFECTS— frozensets exposing the curated effect catalog used by the dispatch helpers. Callers can useRETROACTIVE_EFFECTSas a fast-path predicate to skip theget_windowsIPC round-trip when no outgoing effect could mutate existing windows.Monitors.get_all_cached()— list-returning counterpart to the renamedget_cached()(see Changed).AnimState.from_keyword(),body(),to_line(),to_data()— parse/serialize helpers that mirrorhyprland_config.AnimationData's shape, withto_data()projecting to the format-only sibling.
Changed
- BREAKING —
Monitors.get_cached()now takes anameargument and returnsMonitorState | None, matchingAnimations.get_cached(name). The previous list-returning form is nowMonitors.get_all_cached(). HyprlandState.discard()now falls back to the schema default when an option has no on-disk value, so a single discard call fully restores the compositor to its pre-edit state. Previously it returnedNonefor those keys and required the caller to send a fallback value via IPC.
v0.3.0
Added
- Lua-mode bridge —
HyprlandStatetransparently routes live-apply, dispatch, and submap setup throughhyprctl evalwhen Hyprland 0.55.0+ runs withconfigProvider: lua. Detection is lazy viais_live_lua_mode()and re-probes onreconnect(). HyprlandState.define_submap(name, binds)— atomic submap registration that abstracts over Hyprlang's statefulsubmap=…/bind=…/submap=resetsequence (now sent as one batch) and Lua's declarativehl.define_submap(…, function() … end). EmptybindsraisesCommandErrorin both modes.- Support for
cssgap/font_weightschema types. - Gradient IPC field rename — accepts both 0.54.x's
"custom"and 0.55+'s"gradient".
Changed
- BREAKING —
OptionInfohas been removed.HyprlandState.inspect()now returnshyprland_schema.HyprOptiondirectly;OptionInfo.validate()moved ontoHyprOption.validate()upstream. Update imports fromhyprland_state.OptionInfotohyprland_schema.HyprOption. - BREAKING —
Animations.apply(),Animations.preview(), andAnimations.define_bezier()no longer swallowhyprland_socket.HyprlandError— they now propagate it, matchingHyprlandState.apply()'s failure mode. Callers that relied on theFalsereturn for IPC rejection need anexcept HyprlandError. - BREAKING —
ANIM_FLAT,ANIM_CHILDREN,Animations.tree,Animations.names, andAnimations.get_children()now return tuples instead of lists, completing the immutable-tree migration started in 0.2.0. _normalize_gradient_stringmoved tohyprland_config.normalize_gradient_string— the transform belongs with the config-string parser, not the state library.HyprlandState.reload_config()now useshyprland_config.load_any()so Lua entrypoints (hyprland.lua) reload correctly alongside Hyprlang configs.
Fixed
HyprlandState.save()short-circuits when nothing is pending — no disk write, no compositor reload, returns[].HyprlandState.save(path=...)now reports[Path(path)]as the written file instead ofdirty_files(), which could include paths that weren't actually written when an explicit override was used.
v0.2.1
Fixed
- Gradient values read from IPC now have
0xprepended to bareAARRGGBBhex tokens, so they round-trip into config files without being rejected by Hyprland's parser on reload. BlueManCZ/hyprmod#21
v0.2.0
Breaking changes
get_styles_for()/Animations.get_styles()return type — now returnstuple[str, ...]instead oflist[str], matching the immutable nature of animation style data
Improvements
- Deduplicated color conversion — extracted shared
_extract_value()method, eliminating duplicated ARGB-to-hex logic between_read_ipc()andget_live() - Immutable animation constants —
ANIMATION_TREE, style lists, and flattened tree entries now use tuples instead of lists, preventing accidental mutation of module-level data
v0.1.0
Live state interface for Hyprland — options, animations, monitors, binds, and devices
- Options — read effective values (IPC > disk > schema default), apply changes, inspect metadata, validate against schema constraints
- Animations — read/write animation states, manage bezier curves, navigate the animation tree
- Monitors — read monitor layout from IPC, apply monitor configuration
- Binds — read keybind definitions, execute dispatchers
- Devices — detect input devices (touchpad, etc.)
- Persistence — track pending changes, save to disk, discard/revert
- Offline mode — works without a running Hyprland instance, reads from config files and schema
- Schema validation — values validated against schema constraints (min/max, enum) before being sent to the compositor