summaryrefslogtreecommitdiffstats
path: root/src/canvas.rs
AgeCommit message (Collapse)Author
2021-04-24change: remove gap between CPU and columns in basic (#460)Clement Tsang
Removes the gap between the CPU section and other columns in basic mode.
2021-04-04feature: Rework network y-axis, linear interpolation for off-screen data (#437)Clement Tsang
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-03-12feature: Add support for displaying load average (#392)pvanheus
2021-02-18feature: Add mouse support to sorting columns (#413)Clement Tsang
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-15feature: Allow toggling advanced kill menu (#408)Clement Tsang
Allows toggling the advanced kill menu via --advanced_kill or advanced_kill=true.
2021-02-15feature: add nord and nord-light colours (#406)Clement Tsang
Adds colour schemes for Nord, along with a light variant.
2021-01-25bug: Workaround for strange rendering when there are <4 CPU entries reported ↵Clement Tsang
(#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.
2020-12-22feature: Hide SWAP graph and legend in normal mode if SWAP is 0 (#372)Clement Tsang
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-15feature: Fine grained kill signals on unix (#263)Lukas Rysavy
* 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-08refactor: Refactor some canvas code (#342)Clement Tsang
2020-11-18bug: remove buggy auto-generated CPU colour implementation (#308)Clement Tsang
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-18feature: Add collapsible tree entries (#304)Clement Tsang
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-15feature: default colour schemes (#296)Clement Tsang
Adds some default colour choices to choose from.
2020-10-17feature: Add simple indicator for when data updating is frozen (#269)Clement Tsang
2020-10-17refactor: Remove redundant as_ref() calls (#268)Clement Tsang
Minor refactor to remove redundant `as_ref()` calls.
2020-09-26refactor: tui-rs 0.11.0 refactor (#253)Clement Tsang
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-22feature: Beginnings of in-app config (#231)Clement Tsang
Initial refactorings and additions to support in-app config. - Refactor our current options logic to support in-app configs. That is, we can write to a config file with our changes now. - The default action when creating a new config file is to leave it blank. (TBD and for now, not sure on this one) - Previously, we would set everything in a config file on startup; now we need to read from the config TOML struct whenever. - `C` keybind is now occupied for configs. - `no_write` option to never write to a config file.
2020-09-18bug: Fix for index oob caused by terminal size mismatch (#238)Clement Tsang
Fix for an index out-of-bounds by resizing to a smaller terminal just after the program got the terminal size, but right before the terminal started drawing.
2020-09-11feature: mouse support for tabs and dd dialog (#230)Clement Tsang
2020-09-09refactor: rewrite column algorithm (#227)Clement Tsang
Update how we position and generate column widths to look less terrible. This also adds truncation w/ ellipsis to the columns, and for processes, the state will automatically shrink to a short form (just a character) if there isn't enough space.
2020-09-06feature: Adds tree view (#223)Clement Tsang
Adds a tree process view to bottom. Currently uses a pretty jank method of column width setting, should get fixed in #225.
2020-09-02feature: Add ability to filter out disks and temp (#220)Clement Tsang
You can now filter out disks and temp sensors by name via config.
2020-08-29feature: Add mouse click support for moving between widgets (#208)Clement Tsang
Adds mouse support to the application, to move between widgets and click on elements. List of things to added: - Click to move between widgets - Click to move between widgets in basic mode - Click on widget entries - Ability to disable mouse if you don't like it, I guess
2020-08-28feature: Adaptive network widget (#206)Clement Tsang
Allows the network widget graph to grow/shrink with current data, rather than using a static size.
2020-08-25bug: fix grouping being broken after refactor (#201)0.4.6Clement Tsang
Fixes grouping not working properly after some refactoring done in 0.4.6.
2020-08-17feature: Add appox. total mem as an option for processes and basic memClement Tsang
Adds a way to display the memory value as a column in the processes widget and the basic memory widget, rather than just the percentage.
2020-08-16refactor: Revert tui upgrade to 0.10Clement Tsang
Reverts tui upgrade, there are some bugs and issues - namely, issues with rendering text. We can revert this commit when those bugs are dealt with (should be fine after 0.10.1, tested building from the repo).
2020-08-15feature: Allow sorting by any columnClement Tsang
This feature allows any column to be sortable. This also adds: - Inverting sort for current column with `I` - Invoking a sort widget with `s` or `F6`. Close with same key or esc. And: - A bugfix in regards the basic menu and battery widget - A lot of refactoring
2020-08-13refactor: remove redundant newlinesClementTsang
2020-08-12change: Refactor dd drawing codeClementTsang
This also slightly improves how we generate the widths/heights to be less... terrible. Note this is not done, unfortunately. This requires tui-rs' wrapped paragraph height PR to land and release so I can properly calculate the height offsets. See https://github.com/fdehau/tui-rs/pull/349 for details.
2020-08-11deps: Update dependencies, drop MSRVClement Tsang
Update dependencies to most recent versions if applicable. Refactor to deal with breaking changes. Drop MSRV due to dependency issues, just support stable and later.
2020-08-07feature: add full command to process widgetClement Tsang
This PR adds the ability to toggle between the process name and process path. Currently, this uses `P` as the modifier key. Currently, the longer command names are dealt with by forcefully changing the width of the columns, but this can be handled in a more graceful manner IMO.
2020-05-07refactor: avoid using max checks, use saturating_sub insteadClement Tsang
2020-05-02change: more advanced searching and filteringClementTsang
2020-04-29bug: fix broken basic table arrows on other widgetsClementTsang
2020-04-27feature: add battery flagClementTsang
2020-04-25refactor: changed how we set help text on resize and initClement Tsang
2020-04-24change: add scrolling to help menuClement Tsang
2020-04-19Move to stateful except for CPUClementTsang
2020-04-18Fix bug with network legendClementTsang
2020-04-16feature: Add battery widget (#120)Clement Tsang
2020-04-07refactor: Remove debug.ClementTsang
2020-04-06opt: Only recalculate rect layout if resize or startupClementTsang
2020-04-06refactor/bug: Array bound checking, fix CPU jumpClement Tsang
2020-04-01Add modularity to widget placement and inclusion (#95)Clement Tsang
2020-03-13Cleanup before modularity (#84)Clement Tsang
* Uptick some crates, update README dependencies * Cleanup before modularity feature. * Fix missing reset zoom on reset * Fixed reset... not resetting search or data displayed * Cleaned up options a tiny bit to make more sense. * Cleaned up some TODOs and the like. * specify only build master branch.
2020-03-10Forgot to set size field upon detecting a resize...ClementTsang
2020-03-09Add hiding time and autohiding time.ClementTsang
2020-03-08Add time scaling.ClementTsang
2020-03-08Redid basic mode logic and separated CPUClementTsang
* Separated CPU into CPU legend and graph * Redid how I did maximizing with basic mode