Commit Graph
536 Commits
Author SHA1 Message Date
Clement Tsang 30b2c2ea05 feature: Adds uid and gid collection (no GUI yet) (#375)
Just adds uid and gid collection to the process collection step. This does not add GUI changes, that'll come later.
2020-12-27 10:25:04 -05:00
ClementTsang 2bad8f2d72 other: re-enable table scroll position 2020-12-25 14:34:25 -05:00
Clement Tsang 23ad597d18 bug: Fixes incorrect colours being used the CPU widget in basic mode (#373)
Fixes the colour order being off in basic mode, and not using the average CPU colour.
2020-12-22 02:19:46 -05:00
Clement Tsang 9d1f3c9ac2 feature: Hide SWAP graph and legend in normal mode if SWAP is 0 (#372)
Firstly, note this currently won't affect basic mode. There is code changes due to it, but instead, we'll just display `0.0B/0.0B` instead. I'm personally not really sure if we want to get rid of it in basic mode, since it'll leave an ugly gap in that mode.

Anyways, this change is mainly for the normal mode. All this does is hide the legend entry and chart if the total SWAP drops to 0 KB. It also has a small change to do a unit check on the memory used, as well as slightly adjusting the calculation we use.
2020-12-22 01:12:13 -05:00
Clement Tsang 837c382ee9 refactor: Cut out sysinfo from Linux builds (#368)
Refactors to use only heim for Linux builds. This is now much easier to do since the 0.1 version of heim works fine for ARM. This is ideal since having to rely on two separate sources of data isn't the greatest if we can avoid it.

Sysinfo is still required for macOS and Windows, though. Temperature sensors do not work for those from heim, and for some reason, networks also don't work on Windows with heim...?

My personal CPU core calculation is also currently Linux-only, and as such, I'll still rely on sysinfo for Windows and macOS for now.

This isn't really a big optimization or anything btw. Just something I wanted to try.
2020-12-21 20:24:27 -05:00
Clement Tsang bfdaa09e3a uptick: 0.5.6 (#362) 2020-12-17 18:42:08 -05:00
Clement Tsang 682f6493d1 refactor: re-use heim for ARM targets if possible (#360)
Use heim on ARM targets again where appropriate.
2020-12-17 17:57:38 -05:00
Clement Tsang 061cdb913b bug: Fix missing component list refresh (#361) 2020-12-17 17:38:41 -05:00
Clement Tsang 4471ecc161 deps: Update various dependencies (#358) 2020-12-16 00:41:54 -05:00
Lukas Rysavy 120da2c85a feature: Fine grained kill signals on unix (#263)
* feature: added signal selection for killing in unix

* feature: set default signal to 15 (TERM)

* feature: selecting kill signal number with number keys

* feature: mouse selection of kill signals

* fix: restore working previous kill dialog for win

* bug: more fixes for killing on windows

* feature: made two digit number selection only work in time window

* feature: replaced grid with scrollable list for kill signal selection

* fix: handling scrolling myself

* chore: replaced tui list with span
so we actually know for sure where the buttons are

* feature: always display cancel button in kill signal selection

* chore: simplified as suggested in review

* fix: made scrolling in kill list more intuitive

* fix: differentiating macos from linux signals

* fix: fixed reversed kill confirmation movement

* chore: fixed unused warnings for windows

* feature: added G and gg keybindings for kill signal list
2020-12-15 21:39:17 -05:00
Clement Tsang 49cfc75aca deps: Update to heim 0.1 (#354) 2020-12-15 21:34:45 -05:00
Clement Tsang 5d7697d3da refactor: More minor optimization changes (#353)
- Move data rather than cloning during data transferring step
- Try using beef?
2020-12-12 21:06:46 -05:00
Clement Tsang 766fe25c55 refactor: Use feature flags to avoid building with fern and log (#351) 2020-12-11 20:39:32 -05:00
Clement Tsang 8c4ad90e67 refactor: Another small optimization pass (#350)
Making some small changes that would hopefully improve performance a bit.

- Remove redundant string generations for CPU data conversion
- Switch to fnv for PID hashmap and hashsets
- Use buffered reading to avoid having to store too many lines as strings
2020-12-11 19:54:02 -05:00
Clement Tsang 86135e466c bug: Fix incorrect cpu colour matching again in all position (#349)
Turns out there was yet another bug with the CPU colour allocation. I had forgotten to use the same index calculation for the "all" position.
2020-12-11 16:14:17 -05:00
Clement Tsang fd003f84da bug: Fix some performance regressions (#344)
Fixes some performance regressions and forgotten cleanup.

Changes to attempt to improve performance to match 0.4.x:

- Remove `trace!` and `--debug` for now.  These were a significant hog.  Removing this dropped initial memory usage by about half.
- Add additional cleaning step for `pid_mapping`  during process harvesting.  This should hopefully improve memory usage as time goes on.
- Slightly change how we do sorting to hopefully be a bit more optimal?  This was just an easy change to make that I spotted.
- Fix broken cleaning child thread task.
2020-12-10 22:29:25 -05:00
Clement Tsang ce020a7429 bug: Fix missing states in processes (#345)
Fixes another change breaking states from showing in processes.
2020-12-10 00:03:55 -05:00
Clement Tsang 19cdc269fb refactor: Refactor some canvas code (#342) 2020-12-08 22:34:21 -05:00
Clement Tsang f4b8386063 refactor: Rename battery_harvester to batteries (#340) 2020-12-05 18:51:21 -05:00
Clement Tsang e56367fcbb refactor: Clean up some parts of data harvesting (#336) 2020-12-03 23:45:54 -05:00
Clement Tsang 86169871cb refactor: Simplify data harvesting (#335)
Refactors the data harvesting system function names.
2020-11-30 19:40:17 -05:00
Clement Tsang 3260ff4663 feature: Add scroll indicator to keep track of table position in widgets. (#333)
Adds the option to enable an "out of" indicator for scrollable table widgets (using --show_table_scroll_position).
2020-11-28 15:37:06 -05:00
Clement Tsang 41b8dd61d0 bug: Fix inverted battery colours (#331)
Fixes colour theming for batteries being flipped.
2020-11-26 19:14:27 -05:00
Clement Tsang a634934e3d bug: Fix inverted hide_avg_cpu option in config (#327) 2020-11-25 20:30:16 -05:00
Clement Tsang 6aa0dd64a6 other: Switch to once_cell (#324)
Switch from lazy_static to once_cell.
2020-11-22 16:44:40 -05:00
ClementTsang 5abb1ce1a3 other: update default config.toml 2020-11-22 13:26:58 -05:00
ClementTsang 2d127f198e ci: uptick to 0.5.1, fix ci 2020-11-22 02:33:48 -05:00
ClementTsang e04ce4fa1b bug: [skip travis] Fix use_old_network_legend
This was caused by invalid widths being set for the maximal widths in
the table.  This made it impossible to draw.
2020-11-21 14:56:34 -05:00
ClementTsang 99d04029f0 bug: [skip travis] Add a better check for default colors in the config file 2020-11-21 14:49:44 -05:00
ClementTsang 6ef1d66b2b bug: [skip travis] remove nord from possible values 2020-11-20 22:43:28 -05:00
Clement Tsang 2ff8b418b2 feature: add tree flag (#312)
Adds a --tree flag that defaults to tree mode for the process widget.
2020-11-20 00:13:46 -05:00
Clement Tsang 5fedf8a5db other: update gruvbox and some documentation (#310) 2020-11-19 23:32:57 -05:00
Clement Tsang 92636f3bf9 feature: Add mem_as_value flag (#309)
Adds a new flag, --mem_as_value (and its corresponding config option, mem_as_value = true), which defaults to showing process memory values by their amount rather than percentage.
2020-11-19 00:28:04 -05:00
Clement Tsang c0a8c347e1 bug: remove buggy auto-generated CPU colour implementation (#308)
Removes the random automatically generated colours for the CPU metrics. This was not supported in all terminal emulators, and would cause some of them to break (namely macOS Terminal).

Instead we'll default to colours we can be more certain will work and loop through them as required. Users can still override these colours with their own.
2020-11-18 20:00:31 -05:00
Clement Tsang 669b245367 feature: Add collapsible tree entries (#304)
Adds collapsible trees to the tree mode for processes. These can be toggled via the + or - keys and the mouse by clicking on a selected entry.
2020-11-18 01:28:53 -05:00
Clement Tsang e43456207b feature: default colour schemes (#296)
Adds some default colour choices to choose from.
2020-11-15 05:16:47 -05:00
Clement Tsang 1d35e1c8b4 refactor: Better responsiveness when resizing cpu basic widget (#292)
Gives better and less jank responsiveness when resizing the window in narrow sizes for the cpu basic widget.
2020-11-02 23:41:57 -05:00
Clement Tsang e8358f8f47 bug: fix incorrect basic cpu spacing (#291)
Fixes a bug with CPU spacing on basic mode.
2020-11-02 22:39:02 -05:00
Clement Tsang 3d9c6b757f bug: fix incorrect offset for cpu list in cpu basic widget (#289)
Fixes the CPU basic widget showing incorrect data due to an incorrect offset when displaying the data.
2020-11-02 20:59:54 -05:00
Clement Tsang 5df1764e90 bug: fix incorrect CPU colour offset (#290)
Fixes an incorrect offset affecting the CPU colour when scrolling.
2020-11-02 20:29:34 -05:00
Clement Tsang 465a433d0d clippy: fix unwrap_or_else usage (#286)
Removes some unwrap_or_else calls when unwrap_or would suffice that were caught by clippy nightly.
2020-11-02 15:19:38 -05:00
Clement Tsang 309ebd8dc3 deps: switch from dirs to dirs-next (#285)
Addresses RUSTSEC-2020-0053.
2020-11-01 22:03:29 -05:00
Clement Tsang 05b39d29ae feature: Add simple indicator for when data updating is frozen (#269) 2020-10-17 23:26:03 -04:00
Clement Tsang b8606c41b9 refactor: Remove redundant as_ref() calls (#268)
Minor refactor to remove redundant `as_ref()` calls.
2020-10-17 18:35:21 -04:00
Clement Tsang 914079868f bug: Fix widget highlighting styling for dialogs (#266)
Fixes styling for dialog titles.  Cherry picked from commit 06573becfa3c089ac4b2a17c9443f84b6a5af3e8.
2020-10-13 02:45:01 -04:00
Clement Tsang 5675d8192c other: more traces to debug, update some deps (#264)
Minor update to update some dependencies and remove some traces.
2020-10-02 22:12:07 -04:00
Clement Tsang ba7738e73e bug: terminate threads, fix blocking poll in input (#262)
Bug fix for improper use of threads, where they were not properly terminated (not really too bad) and the input thread code actually blocked.
2020-10-02 02:49:45 -04:00
Clement Tsang a5b95ae8b2 bug: use cmdline for Linux proc name if >=15 chars (#261)
This was the cause of some process names getting cut off and looking weird for Linux (and Linux only, I'm not directly responsible for the other OSes).

This also adds spaces in between command line flags. Before, they were usually separated by either spaces (which looked fine) or null terminators (which meant it looked like something was broken).
2020-10-01 01:46:09 -04:00
Clement Tsang 5b33e8d6b4 Use tmp_dir rather than /tmp/ (#260)
Uses a less hard-coded method of writing to /tmp/.
2020-09-30 22:53:54 -04:00
Clement Tsang 9afb6d7c88 feature: add --debug flag for logging (#259)
Adds a `--debug` flag to aid in debugging issues.  This saves to `/tmp/bottom_debug.log`.
2020-09-30 22:06:57 -04:00