Skip to content

Releases: BlueManCZ/hyprland-state

v0.4.3

24 Jun 09:58
737c5a5

Choose a tag to compare

Added

  • HyprlandState.has_touchscreen() — mirrors has_touchpad() for touchscreen hardware, reporting whether the running compositor lists any touch device. Lets callers gate touchscreen-only settings (e.g. workspace-swipe touch gestures) the same way touchpad settings are gated.

v0.4.2

20 May 19:39
447de46

Choose a tag to compare

Changed

  • revert_dispatchers_for_effect() now handles toggleable static effects (float, tile, pin, fullscreen, maximize) — applies the inverse toggle when the window matches the rule's target state, mirroring the apply path's behavior.

v0.4.1

17 May 16:15
7ca5bdb

Choose a tag to compare

Fixed

  • Monitors.apply() — resetting sdrbrightness / sdrsaturation back to their defaults now actually takes effect. Hyprland's hl.monitor() IPC is additive, so omitted SDR keys kept the previous live value; live-apply lines now emit them explicitly.

v0.4.0

16 May 19:42
8765f4d

Choose a tag to compare

Added

  • hyprland_state.dispatchers_for_effect(name, args, window) and revert_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_EFFECTS and hyprland_state.RETROACTIVE_EFFECTS — frozensets exposing the curated effect catalog used by the dispatch helpers. Callers can use RETROACTIVE_EFFECTS as a fast-path predicate to skip the get_windows IPC round-trip when no outgoing effect could mutate existing windows.
  • Monitors.get_all_cached() — list-returning counterpart to the renamed get_cached() (see Changed).
  • AnimState.from_keyword(), body(), to_line(), to_data() — parse/serialize helpers that mirror hyprland_config.AnimationData's shape, with to_data() projecting to the format-only sibling.

Changed

  • BREAKINGMonitors.get_cached() now takes a name argument and returns MonitorState | None, matching Animations.get_cached(name). The previous list-returning form is now Monitors.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 returned None for those keys and required the caller to send a fallback value via IPC.

v0.3.0

15 May 20:45
bd9dbe7

Choose a tag to compare

Added

  • Lua-mode bridgeHyprlandState transparently routes live-apply, dispatch, and submap setup through hyprctl eval when Hyprland 0.55.0+ runs with configProvider: lua. Detection is lazy via is_live_lua_mode() and re-probes on reconnect().
  • HyprlandState.define_submap(name, binds) — atomic submap registration that abstracts over Hyprlang's stateful submap=… / bind=… / submap=reset sequence (now sent as one batch) and Lua's declarative hl.define_submap(…, function() … end). Empty binds raises CommandError in both modes.
  • Support for cssgap / font_weight schema types.
  • Gradient IPC field rename — accepts both 0.54.x's "custom" and 0.55+'s "gradient".

Changed

  • BREAKINGOptionInfo has been removed. HyprlandState.inspect() now returns hyprland_schema.HyprOption directly; OptionInfo.validate() moved onto HyprOption.validate() upstream. Update imports from hyprland_state.OptionInfo to hyprland_schema.HyprOption.
  • BREAKINGAnimations.apply(), Animations.preview(), and Animations.define_bezier() no longer swallow hyprland_socket.HyprlandError — they now propagate it, matching HyprlandState.apply()'s failure mode. Callers that relied on the False return for IPC rejection need an except HyprlandError.
  • BREAKINGANIM_FLAT, ANIM_CHILDREN, Animations.tree, Animations.names, and Animations.get_children() now return tuples instead of lists, completing the immutable-tree migration started in 0.2.0.
  • _normalize_gradient_string moved to hyprland_config.normalize_gradient_string — the transform belongs with the config-string parser, not the state library.
  • HyprlandState.reload_config() now uses hyprland_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 of dirty_files(), which could include paths that weren't actually written when an explicit override was used.

v0.2.1

05 May 08:08
201aa58

Choose a tag to compare

Fixed

  • Gradient values read from IPC now have 0x prepended to bare AARRGGBB hex tokens, so they round-trip into config files without being rejected by Hyprland's parser on reload. BlueManCZ/hyprmod#21

v0.2.0

26 Mar 19:34
a56d6e5

Choose a tag to compare

Breaking changes

  • get_styles_for() / Animations.get_styles() return type — now returns tuple[str, ...] instead of list[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() and get_live()
  • Immutable animation constantsANIMATION_TREE, style lists, and flattened tree entries now use tuples instead of lists, preventing accidental mutation of module-level data

v0.1.0

24 Mar 20:03
e85da15

Choose a tag to compare

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