Skip to content

[REQUEST] Document behavior of square brackets containing a variable #1933

@LRitzdorf

Description

@LRitzdorf

Rofi version (rofi -v)

1.7.5

Configuration

Blank (tested with -config /dev/null; issue persists)

Theme

Arc Dark

Timing report

No response

Launch command

rofi -show window

Step to reproduce

  1. Configure a window-command which includes square brackets, such as echo "bracket test: [id={window}] [asdf]".
  2. Open Rofi in window mode, and Ctrl-Enter to perform the accept-alt action (which runs the specified window command).
  3. Observe that the echoed output does not include square brackets around the substituted variable.

Note that the same issue occurs with other command fields as well, such as run-command in the run mode.

Expected behavior

A command such as echo "[id={window}]" should output (for example) [id=48235161], with brackets.

Actual behavior

A command such as echo "[id={window}]" outputs (for example) id=48235161, without brackets.

Additional information

Having no experience with Rofi's internals, this feels like maybe a parser issue?

I've tried variations of my test command, for instance escaping the brackets with single and double backslashes, but none of these resolved the issue.

Using wayland display server protocol

  • No, I don't use the wayland display server protocol

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions