Skip to content

Conversation

@sigmaSd
Copy link
Collaborator

@sigmaSd sigmaSd commented Oct 26, 2025

The motivation is I have some programs that use bandwhich --raw, I usually run it with pkexec

The issue is to close bandhwich , the only way currently is to kill it and not only that I need to use pkexec kill which is just a bad experience for the user. (2 password prompts instead if 1)

This simple idea resolves the issue, bandwhich now just listens to a stop command in raw mode to exit.

@sigmaSd sigmaSd requested a review from cyqsimon October 26, 2025 19:45
@sigmaSd sigmaSd changed the title feat: stop the program in raw mode if we recive "stop" in stdin feat: stop the program in raw mode if we recive "q" in stdin Nov 3, 2025
@sigmaSd
Copy link
Collaborator Author

sigmaSd commented Nov 3, 2025

I realized that the app already listens to "q" to exit, but because crossterm poll can't read stdin at the same time it doesn't work crossterm-rs/crossterm#396

So I changed stop to q to match the current behavior

Also it know listen to input on a separate thread because otherwise it will block and will only read the first input correcttly

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

Successfully merging this pull request may close these issues.

1 participant