-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
Feature, add PID column to processes table #165
Conversation
Hello @imsnif! I don't know how to resolve conflicts in this file |
This is likely due to the recent update to Bandwhich adding cumulative usage tracking. There were changes to the Most of the conflicts should be pretty easy to resolve, but it's possible that you'll need to do some more manual intervention. Let me know if you have any questions! |
sorry, guys @TheLostLambda @imsnif , there is an issue with macos build and i cannot reproduce it on my local machine (arch linux). I tried |
Hi @olehs0! I've done some cross-compilation in the past from Arch Linux an it's a little finicky. Have you installed apple-darwin-osxcross? That's needed to link binaries for Mac OS. Let me know if installing that helps any! |
|
thank you! i cannot build |
Hey @olehs0 - just a note: I will admit I could also never get cross-compiling working for macos. :) The good news is that the macos version works on linux (it gets its info from lsof instead of the /proc filesystem which does not exist on mac). When I want to test stuff on mac, I usually just switch the "cfgs" around. So that everything that was "linux" becomes "macos" and the other way around. Hope that helps! |
Hey @imsnif , ok, i see, thank you, i'll try to use it. anyway, i fixed that issues and now the PR is valid and has no conflicts. |
Hi @imsnif ! Is everything fine there, or should I improve something else ? |
Hey @olehs0 - great work! |
Sure, i think i can swap the |
Do you think we can keep them where they are and only change which ones disappear when we resize? |
Don't swap the columns. "Rate" should be on the right. When resizing the window (making it smaller), we should have: IF you make it even smaller, you'll have only: Does that make sense? |
@imsnif yes, thank you for your explanation, let me try to rework it |
sorry guys, i don't know how to implement it properly, could someone suggest something to me about the resizing ? |
Hey @olehs0, no worries - it's definitely a little tricky with the way things are written now. What I like doing is starting simple, even if it means duplicating code. Then once everything works as I want it to, I try to refactor out the duplications. I think a good direction here would be to move the ColumnCount ( bandwhich/src/display/components/table.rs Line 28 in b25c035
Does that make sense? Or did you have issues in a different place? Please don't hesitate to ask. :) |
Morning! Yeah I see, i got the idea. Thank you for your suggestion, let my work around it |
Hey, this was closed by mistake and I don't seem to be able to re-open it. Please feel free to re-open or make another PR with this if you wish. My apologies! |
* feat: add `PID` column to `Process` table * fix(tests): populate fake data with the correct `ProcessInfo` type * test: update snapshots * refactor: use more idiomatic rust * refactor: rename function from `get_proc_name` to `get_proc_info` * refactor: only display PID when width available is highest ref: #165 (comment) * tests: update snapshots * chore: update CHANGELOG * fix: clippy warnings * Revert "fix: clippy warnings" This reverts commit e5f06cb. We will do this separately for the sake of keeping a clean history * refactor: use `u32` for PID * refactor: more idiomatic rust --------- Co-authored-by: cyqsimon <[email protected]>
Fixes #159.
Grab and show process identifier in a particular column to the processes table