Skip to content

Parse error on @enter and @escape when no additional normal command is given #311

@Borroot

Description

@Borroot

Version Information:

  • Distribution Information: Linux 6.14.6-arch1-1 x86_64 GNU/Linux

  • swhkd version: Simple-Wayland-HotKey-Daemon 1.3.0-dev

Describe the bug:

Parse error.

Expected behavior:

Should be parsed.

Actual behavior:

Swhkd exits on parse error.

To Reproduce:

Config file:

alt + m
	@enter music

mode music
q
	@escape
endmode

Start swhkd:

~ $ swhks && sudo swhkd
[2025-05-23T00:02:10Z ERROR swhkd] Config Error: unable to parse config file
[2025-05-23T00:02:10Z ERROR swhkd]  --> 1:1
      |
    1 | alt + m
    2 | 	@enter music␊
      | ^-----------^
      |
      = the number of possible binding variants 1 does not equal the number of possible command variants 0.

Additional information:

Can be fixed by adding the optional commands to the internal calls, e.g.

alt + m
	@enter music && echo

mode music
q
	@escape && echo
endmode

Note that swhkd 1.2.1 does not capture any keystrokes on my setup for unknown reasons.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions