Skip to content

0.55 hyprland.lua Incompatibility #18

Description

@jayshozie

Hi, hope you're doing great.

The Issue

Currently, hyprsession doesn't work with hyprland 0.55 style hyprland.lua config files. It still works without a problem with hyprland.conf files, but that will be deprecated within 1-2 releases1.

Calling any hyprsession load ... command returns the following error from hyprland:

Error: NotOkDispatch("error: [string \"return hl.dispatch(exec [monitor 0;workspace ...\"]:1: ']' expected near '0'\n\n → Note: dispatch in lua is a shorthand for hl.dispatch(...), your syntax might need to be updated.")

and fails to load any windows because of that.

  • Tested with:
  -- File: ${XDG_CONFIG_HOME}/hypr/hyprland.lua
hl.on("hyprland.start", function()
  ...
  hl.exec_cmd('hyprsession') -- First Test
  hl.exec_cmd('hyprsession -i 30 default') -- Second Test
  ...
end)
# bash
# Manual Tests
hyprsession default
hyprsession -i 30 default
hyprsession load
hyprsession load default

In all cases, because dispatch exec [monitor 0;workspace 6 silent;move 1 33;size 1598 966;fullscreenstate 0] librewolf is sent, loading fails.

Sadly, I'm not experienced with Rust, otherwise I'd be happy to help.

Footnotes

  1. Relevant Article: hypr.land/news/26_lua

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions