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

Wrong exit code when aborting selection #127

Closed
mhdna opened this issue Sep 10, 2023 · 3 comments
Closed

Wrong exit code when aborting selection #127

mhdna opened this issue Sep 10, 2023 · 3 comments

Comments

@mhdna
Copy link

mhdna commented Sep 10, 2023

When I quit the menu and not select any item, unlike dmenu or bemenu which return an exit code of one, tofi returns an exit code of zero.

As a very simple example, aborting selection using dmenu will give the expected result (i.e. not printing anything to the screen), while aborting it using tofi will print 0:

{ ls | dmenu; } && echo $? -->
{ ls | tofi; } && echo $? --> 0

@heroin-moose
Copy link

Do you have the latest version?

$ echo test | tofi
<escape>
$ echo $?
1

@mhdna
Copy link
Author

mhdna commented Sep 16, 2023

Yeah, I have it installed from the AUR, but I tried compiling the latest release myself, just in case, and the problem persists.
Then I tried compiling it from the master branch and the issue seems to be resolved, but I've got another issue of it not treating my remapped Caps Lock key as an Escape key, so it doesn't exit unless I press the actual Escape key or one of the other quit key bindings.

@mhdna
Copy link
Author

mhdna commented Sep 28, 2023

Closing now as compiling from master fixes the issue, but has the side effect of it not recognizing remapped CapsLock as an Escape key, which needs to be addressed in another issue (btw, after I made the switch to keyd, the latter issue got fixed for me too).

@mhdna mhdna closed this as completed Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants