Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i3-input -F "<command>" fails to run when "<command>" contains a comma #4836

Closed
Myrdden opened this issue Feb 6, 2022 · 2 comments
Closed
Labels
4.20 bug missing-log Read the CONTRIBUTING.md file for instructions

Comments

@Myrdden
Copy link

Myrdden commented Feb 6, 2022

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

This is possibly related to/the same as #4694, when using i3-input -F "<command>", no prompt is shown and no replacement of %s occurs if the command has a comma or a semicolon.

Reproduction Instructions

Here's the specific one I tried:

exec --no-startup-id i3-input -F "floating enable, resize set width %s ppt height %s ppt, move position center"

Although in the case of the above I could take the two non-interpolated commands out, for whatever reason when I do so the move position center simply fails to run.

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.20.1 (2021-11-03) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.20.1 (2021-11-03) (pid 517)

Here's the error I get when running the above:

ERROR: Expected one of these tokens: 'height', 'width', <number>
ERROR: Your command: exec --no-startup-id i3-input -F "floating enable, resize set width %s ppt height %s ppt"; mode "default"
- Linux Distribution & Version: Arch 5.16.5 (I think, that's the kernel version, anyways?)
- Are you using a compositor (e.g., xcompmgr or compton): Yes, xcompmgr, because apparently mode-setting sucks without it.
@i3bot
Copy link

i3bot commented Feb 6, 2022

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@i3bot i3bot added bug missing-log Read the CONTRIBUTING.md file for instructions 4.20 labels Feb 6, 2022
@stapelberg
Copy link
Member

I think the problem is with your i3 configuration file, not with i3-input.

When I run i3-input -F 'floating enable, resize set width %s ppt height %s ppt' in a terminal, it works as expected, i.e. in i3-dump-log -f, I see: 2022-09-05 18:00:00 - ../src/commands_parser.c:parse_command:241 - COMMAND: *floating enable, resize set width 80 ppt height 80 ppt*

Can you try quoting the command for i3’s exec directive, so that i3 doesn’t interpret the comma as a command separator?

An easier approach might be to move your i3-input command into a shell script and just specify a path to that in your exec directive.

@stapelberg stapelberg closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.20 bug missing-log Read the CONTRIBUTING.md file for instructions
Projects
None yet
Development

No branches or pull requests

3 participants