-
Notifications
You must be signed in to change notification settings - Fork 255
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
Fine grained kill signals on unix #263
Conversation
Oh, right, and I'll test it on other platforms as well (macOS and Windows) later. |
the thing with the layout is a good point; i have to admit that i havent tried resizing... |
I have replaced the grid with a scrollable list; what do you think? Imo it looks pretty usable... (and also scales better) I'm not completely satisfied with the code yet, so I havent added it to the PR, but you can see it on the Also, I havent tried building on windows yet, so I might have broken smth EDIT: it builds on windows, and I think it works (?) what I can tell from the broken layout... |
Also yeah feel free to take your time on this. |
fixed the number input thing, and cleaned up my scroll list and merged it into this branch |
92dfdbc
to
67de1e8
Compare
Sorry, been busy for the past few days. Let me know whenever you're ready for me to take another look and I'll check it + test it (just not sure about the status of this PR and whether you're happy with it). If it's good I'll merge. |
4f9ab2c
to
98b08e8
Compare
No problem! I've fixed the things you suggested and just rebased to master, so imo the PR should be good to go whenever you're happy with it also :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long to do this. Work ramping up and a bad sleep schedule haven't been kind to me.
I prefer the list approach a lot more, and it generally looks better and feels more responsive to resizes, so that's good. However, a list approach brings in a lot of gotchas, mainly with how to achieve the list scrolling behaviour currently used in the application for other widgets. I've left some tips on how to fix it, but I know it's currently a bit of a confusing mess so let me know if you need some more help on it.
I tested running it on macOS, it looks fine, though you should double check which signals are valid on macOS, because some signals are not accepted that do work on Linux. Check htop and/or documentation for which signals are valid on macOS and Linux.
It looks fine on Windows as well other than the minor reversed movement bug, and you should make sure there aren't any warnings on compilation if you're using cfg
to gate some of the imports:
I would also appreciate adding support for G
and gg
keybinds to jump to the end and start of the list respectively, but that's pretty easy for me to add later so no worries if it's not done in this PR.
since I haven't answered in a while: I haven't forgotten about this, and will look into the things you noted, but have a lot of other stuff currently, so I'll see when I have the time :) |
No worries, I've also been a bit busy with IRL stuff too so I'm in no rush. |
88cff32
to
57c12fa
Compare
so we actually know for sure where the buttons are
57c12fa
to
5f105a6
Compare
Finally got around to looking into the things you commented; got some very good points there, thanks for the feedback! |
Took a look on macOS and Windows, looks good there. I'll take a look at the code and if it looks good I'll merge. |
@LlinksRechts LGTM. I'll merge this - thanks for the work you've done! @all-contributors add @LlinksRechts for code |
I've put up a pull request to add @LlinksRechts! 🎉 |
This reverts commit 120da2c.
Description
This PR adds a menu for selecting the signal to send to the selected process when pressing
dd
in unix.The signals are aligned in a 8×8 grid, which can be navigated with either the arrow keys,
hjkl
, or the mouse (if enabled). In addition, number keys can be pressed to quickly jump to the respective signal. On enter, the selected signal is sent to the process and the popup is closed (or no signal is sent if0: Cancel
is selected).The signal selected by default is 15 (SIGTERM), which is the default signal for killing processes on unix systems.
Issue
Closes: #251
Type of change
Test methodology
Tested on:
The feature was tested on Linux. In theory, the original functionality should still be in place for windows builds; however, I was not able to verify this as I could not get the app to run properly on windows in any version (including current master, release branch). I can verify that the build succeeds and the app starts on windows, but the output I get in the terminal (cmd, powershell, git bash) of my (virtual) machine (win7) is garbled, and I sadly don't have any other versions of windows to test with (according to the documentation of crossterm, it should work on win7...).
Checklist
cargo test
check)cargo fmt
)