Commit graph

120 commits

Author SHA1 Message Date
Clement Tsang
cc03d57f37
change: Add decimal to disk values larger than 1GB (#451)
A bit of a followup to #449, this adds decimal places for values over 1GB in regards to disk usage. This affects the disk widget (for the read/write per second) and process widgets (total read, total write, read/write per second).
2021-04-09 16:14:01 -04:00
Clement Tsang
8c7e85b923
change: Tweak default light colour scheme (#450)
Removes/tweaks some really light colours that might cause issues with a white background. For example, yellow on white didn't look so great, so I adjusted the memory/rx colours for this mode.
2021-04-09 15:57:54 -04:00
Clement Tsang
edb29a43b9
change: Add decimal to actual memory usage in proc (#449)
This change adds a decimal + single digit to memory usage values over the 1 GiB threshold. Otherwise, there is no visible change.

(Note to self: implement the per-column width system soon, this change causes some values to potentially look a bit weird in mem-non-percent mode as it is if the value is really large, like 530.2GiB pushing right up against the column width, but it's currently tied to mem-percent mode. Ugh.)

Also revert a change made by accident where I switched to a decimal prefix system (GB) for memory values. This has been reverted back to a binary prefix (GiB).
2021-04-09 15:43:34 -04:00
Clement Tsang
5bd9e4f6ae
feature: Collapsing in tree mode sums usage to parent (#445)
For the process widget, we now sum the resource usage of the child processes on the parent entry when collapsing in tree mode.

Note that if you search to filter, and collapse, it will not sum the pruned values (values that cannot be seen).  This is partly because I'm a bit lazy, and partly because I think this behaviour makes sense.

For example, let's say I search for a process with 4 child processes "AA, AB, BA, BB", with CPU usage 0.1, 0.2, 0.3, 0.4 respectively.  Assume the parent process has 0 usage.

- Without filter, it sums to 1.0
- With a filter on A, it would sum to just 0.3
- With a filter on AA, it would sum to 0.1

I think this is fine because I'm treating this as summing any child that is still *visible* somehow.  Summing unseen values would probably be weird as it would look like it's not adding up.

Further note that if you had, say, a child "CC" with a usage of, say, 2.0, and its parent of "AB", and you searched for CC in our above example, you would get a sum of 2.2.  This is because AB is still visible by the fact that CC was the searched process, and AB must still exist (albeit faded out) in the tree hierarchy, and as such will still be displayed.
2021-04-05 01:19:17 -04:00
Clement Tsang
476aaff45c
change: Make proc widget unit consistent with disk (#443)
In particular, use non-binary prefixes for disk and memory usage in a process. Ideally everything is configurable by the user, but this is fine for now IMO until I can get around to doing in-app config.
2021-04-04 17:03:52 -04:00
Clement Tsang
eb6a737d34
feature: Rework network y-axis, linear interpolation for off-screen data (#437)
Rewrite of the y-axis labeling and scaling for the network widget, along with more customization. This still has one step to be optimized (cache results so we don't have to recalculate the legend each time), but will be done in another PR for sake of this one being too large already.

Furthermore, this change adds linear interpolation at the 0 point in the case a data point shoots too far back - this seems to have lead to ugly gaps to the left of graphs in some cases, because the left hand limit was not big enough for the data point. We address this by grabbing values just outside the time range and linearly interpolating at the leftmost limit. This affects all graph widgets (CPU, mem, network).

This can be optimized, and will hopefully be prior to release in a separate change.
2021-04-04 05:38:57 -04:00
Clement Tsang
53d8bdae32
feature: User info in proc widget for Unix-based systems (#425)
Adds users into the process widget (for Unix-based systems).  This shows only in non-grouped modes, similar to state.  Search is also supported.

In addition, a quick fix to prevent users from being in grouped mode when they tried to enter tree mode while grouped.
2021-02-28 17:40:55 -05:00
Clement Tsang
fe74328647
bug: Fix bugs with disk widget and disk encryption (#423)
Two issues were highlighted as a result of using either Void Linux with disk encryption, or just disk encryption on Linux in general:

Two fixes:
1. Fixes a failed `usage()` call in the `get_disk_usage` function from failing the entire result.  Now it only returns an entry with N/A results.  This occurred in some distros and disk encryption setups, for example, the one for Void Linux here: https://docs.voidlinux.org/installation/guides/fde.html.

2. Fixes a potential mapping issue with disk encryption on Linux in general.  Since the disk might map to `/dev/mapper/whatever`, but the I/O harvester was using another name, the mappings would not match.  As such, we now also check if a symlink exists; if it does, then we take it and work out the correct path.  This also fixes the disk name being wrong.
2021-02-24 20:23:35 -05:00
Clement Tsang
cb1191ff35
deps: Update various deps as per 2021-02-19 (#420)
Major update is tui-rs from 0.13 to 0.14.  This change allows us to update our tables to make them look nicer!
2021-02-19 17:57:39 -05:00
Clement Tsang
f2975c3a7c
change: Don't jump to top when using sort shortcuts (#418)
For consistency, we now don't automatically jump to the top of the list when using a sort shortcut. This behaviour already occurred with the sort menu and sorting by mouse clicks, so this is just now more consistent (and IMO less annoying, you can also always jump to the top via gg).
2021-02-19 01:22:19 -05:00
Clement Tsang
e6c9187928
bug: Fix sorting menu and sort shortcuts not syncing in gui (#417)
Fixes sorting menus and shortcuts not syncing correctly if the sorting window is open.
2021-02-19 01:02:21 -05:00
Clement Tsang
e6230ef156
bug: fix inconsistent spacing with grouped vs non-grouped in the process widget (#416)
Fixes grouped mode having different spacing than non-grouped mode.
2021-02-18 19:15:07 -05:00
Clement Tsang
4db39da75e
feature: Add mouse support to sorting columns (#413)
Adds mouse support for sorting columns within the process widget. You can now click on the column header to sort (or invert the sort).
2021-02-18 17:10:51 -05:00
Clement Tsang
cf14abe37d
feature: Add ctrl-w and ctrl-h support in the search (#409)
Ctrl-w deletes one word backwards from the current cursor location. Ctrl-h is just an alias for backspace.
2021-02-16 18:07:41 -05:00
Clement Tsang
fb7b1226fd
feature: add nord and nord-light colours (#406)
Adds colour schemes for Nord, along with a light variant.
2021-02-15 14:12:43 -05:00
ClementTsang
c94e1e821b docs: Reorder some of the changelog items 2021-01-31 14:19:26 -05:00
ClementTsang
425f4877de docs: Update changelog, revert formatting typo in README 2021-01-30 20:26:38 -05:00
Clement Tsang
d48e6cd7e0
bug: Workaround for strange rendering when there are <4 CPU entries reported (#398)
So it seems that tui-rs doesn't like rendering my CPU bars if the height is exactly 1. It needs at least 2. I have no idea why, this is probably something weird with how I render.

This, of course, breaks when there is only one row to report (i.e. with a dual core setup in #397).

The workaround switches the gap between the CPU and mem/net parts to 0, and increases the CPU's draw height by 1, only when the height is otherwise 1 (so the draw height is now at least 2). This does have the side effect of including an extra line to the side borders, but I think it's fine.
2021-01-25 02:21:33 -05:00
Clement Tsang
e30518bf62
bug: Fix missing sorting arrow when for non-% mem (#389)
Fixes a bug where you could make the sorting arrow disappear in the mem column if you did:

1. Go to proc widget
2. Switch to memory values from %
3. Press `m`
2021-01-12 21:41:59 -05:00
ClementTsang
f7244d2927 docs: Update changelog with #386 2021-01-05 22:21:27 -05:00
Clement Tsang
90be9730a6
feature: Add network interface filtering (#381)
Adds a new option in the config file to filter out network interfaces.  Also add the option to filter by whole words.

Interface follows that of the existing ones:

```toml
[net_filter]
is_list_ignored = false
list = ["virbr0.*"]
regex = true
case_sensitive = false
whole_word = false
```
2021-01-01 18:09:28 -05:00
Clement Tsang
60d0117c85
feature: Add process_command to default to the process command (#379)
Adds a `process_command` flag and config option to default to showing the full command in the process widget on startup.
2020-12-28 14:34:32 -05:00
ClementTsang
2f0cecf817 docs: Update changelog 2020-12-22 02:21:14 -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
7272786e86
uptick: 0.5.5 (#356) 2020-12-15 00:05:18 -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
74f4b386d7
uptick: 0.5.4 (#348) 2020-12-10 22:57:54 -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
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
ClementTsang
781691d3c9 uptick: 0.5.2 2020-11-25 20:39:37 -05:00
ClementTsang
2d127f198e ci: uptick to 0.5.1, fix ci 2020-11-22 02:33:48 -05:00
ClementTsang
1cb580b91f docs: Update README and changelog for 0.5.0 2020-11-20 14:47:55 -05:00
ClementTsang
79acbf9462 docs: Update changelog 2020-11-20 00:15:54 -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
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
05b39d29ae
feature: Add simple indicator for when data updating is frozen (#269) 2020-10-17 23:26:03 -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
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
7eff79395d
bug: fix chart and data point overlap (#256)
Update to tui-rs, which fixes #255, as well as some miscellaneous things like updating changelogs and travis.
2020-09-27 14:23:18 -04:00
Clement Tsang
750d8f3cb7 refactor: tui-rs 0.11.0 refactor (#253)
Refactors tui-rs usage to the new 0.11.0 release. This release also fixes the highlighting bug from #249, and now, expanding a widget no longer overrides the widget title colour.

This commit also introduces #255, but that seems to be easy to bandaid so hopefully it will get fixed soon?
2020-09-26 20:21:59 -04:00