-
Notifications
You must be signed in to change notification settings - Fork 629
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
[BUG] Empty keybind arguments appear to be skipped #1950
Comments
Tested, works with latest and 1.7.5. I can reproduce your error: rofi -no-config -kb-mode-previous -kb-mode-next -show keys
are you sure you shell/launcher passes empty arguments? |
If I substitute
So I guess it works as intended? Edit: tested with ZSH 5.9, Bash 5.2.26 and Dash 0.5.12. All show the above output |
What shell do you use, because from your error message, those empty ones are not there. For me with bash, your example works fine (see screenshot). also tested zsh 5.9, works fine. This does not feel like a rofi issue because rofi code does not skip 'empty' arguments (it gets an array passed), but I am unsure why for you the shell does not pass those . |
Calling rofi from python does seem to work on my system ( #!/bin/python3
import os
os.execv('/bin/rofi', [ 'rofi', # argv[0] needs to be passed again
'-no-config',
'-kb-mode-previous', '',
'-kb-mode-next', '',
'-show', 'keys'
]) I am unsure why this works, while the shell does not |
Ok, that confirms it aint rofi's fault, but I wonder why your shell is behaving differently for you then me. |
This is incredibly embarassing, I had a wrapper around rofi in my home directoy that set some environment variables which did not properly forward the arguments. Thanks for helping out though! |
Happy the problem is resolved . |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Rofi version (rofi -v)
Version: 1.7.5
Configuration
https://gist.github.com/lonkaars/b3bed963fd102a0ff76af67cf892d37d#file-rofi-dump-config
Theme
https://gist.github.com/lonkaars/b3bed963fd102a0ff76af67cf892d37d#file-rofi-dump-theme
Timing report
No response
Launch command
rofi -no-config -kb-mode-previous '' -kb-mode-next '' -show run
Step to reproduce
Run:
Expected behavior
I expected rofi to parse the empty arguments as empty keysims, effectively un-binding the keys
Actual behavior
rofi appears to skip the empty arguments entirely, which results in the following error:

Additional information
Substituting the empty strings for comma's seems to mitigate the issue:
My guess is that rofi parses a single comma as a list of two empty keysims, and does not skip the arguments because they are no longer empty. Man rofi-keys(5) does describe the usage of the comma to specify multiple keybinds for the same action, but unbinding a key only seems to be documented in the online manpage.
Using wayland display server protocol
I've checked if the issue exists in the latest stable release
The text was updated successfully, but these errors were encountered: