hyprctl -j monitors doesn't always produce valid JSON when executed in bash #11190
Replies: 3 comments
-
can you post the output of the faulty command? |
Beta Was this translation helpful? Give feedback.
-
I tried to format it but its invalid json :) |
Beta Was this translation helpful? Give feedback.
-
I have spent sometime reading the code around this, I have no clue how
Ever happens. I mean the output of avilableModes goes directly into a formatted string "[{}]" , so even if nothing is returned you should still see
I am afraid I am at the end of my usefulness I haven't programmed in cpp since the 90's and it hardly looks the same. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hyprland 0.50.1
To reproduce in Bash:
The bad JSON is:
"availableModes": x
Where "x" should either be a string in quotes, or a numeric literal.
Please note that just running
hyprctl -j monitors
from command line produces good JSON with lots of values for availableModes. I suspect when in bash you can't access this information.How I discovered this, is hyprshot is broken when you try to bind a window snapshot to a key:
bind = SHIFT, code:191, exec, hyprshot -m window
I have opened a bug with hyprshot too, but after thinking about it I think the expectation is that hyprctl -j should always return valid json.
Gustash/Hyprshot#118
Beta Was this translation helpful? Give feedback.
All reactions