Commit Graph

728 Commits

Author SHA1 Message Date
Clement Tsang eb8295c430
feature: Adds tree view (#223)
Adds a tree process view to bottom.

Currently uses a pretty jank method of column width setting, should get fixed in #225.
2020-09-06 23:03:03 -04:00
Clement Tsang 0d8572c692
fix: Fixes count being sortable, but nothing occuring (#224)
Fixes sorting by count being available, but doing nothing. This fix makes it sortable.
2020-09-06 02:16:50 -04:00
ClementTsang cc87fa8e4a fix: Fix mouse detection not working on proc after closing search 2020-09-05 16:25:35 -04:00
ClementTsang 3843d63dbb bug: change heim io fn to not bail on any error 2020-09-03 03:18:18 -04:00
Clement Tsang cef3166cf8
feature: Add ability to filter out disks and temp (#220)
You can now filter out disks and temp sensors by name via config.
2020-09-02 22:02:49 -04:00
Clement Tsang a949073728
bug: fix being able to click widgets when dd-dialog was open (#219)
Fixes a bug where you could click on a widget when dd's dialog was open.
2020-09-02 05:00:01 -04:00
Clement Tsang 22278d7d75
other: aarch64 support (#217)
Adds theoretical aarch64 support.
2020-09-02 02:59:51 -04:00
ClementTsang 663ae6c5c2 bug: fix broken check from last commit, add tests 2020-09-01 03:08:46 -04:00
ClementTsang d24a797ce9 other: Add config error if default_widget_count is not used with default_widget_type 2020-09-01 00:29:46 -04:00
Clement Tsang a4ddd649e1
refactor: Update error messages w/ anyhow and thiserror (#216)
Refactoring and updating of error messages + tests to be more useful.
2020-08-31 23:59:33 -04:00
Clement Tsang 5ed573157c
bug: Use correct labels for sensors in Linux (#215)
Update temperature sensors in Linux to use labels + names rather than just names.
2020-08-31 20:02:48 -04:00
Clement Tsang 5aa7b4df08
docs: Update some arguments, and documentation (#214)
Some more updates to arguments and documentation.
2020-08-31 18:57:01 -04:00
Clement Tsang 3431411215
other: Add autocomplete file generation (#213)
Adds shell completion generation as part of the build, as well as tweaking install scripts/templates/CI to use them.
2020-08-31 17:50:21 -04:00
Clement Tsang 6632714f26
feature: Allow Ctrl-F and / to work in sort (#212)
Fixes a bug, and also allows `Ctrl-F` and `/` to work in the sort widget.
2020-08-29 19:23:20 -04:00
Clement Tsang 3d2fc76aa2
feature: Add mouse click support for moving between widgets (#208)
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-29 18:54:18 -04:00
Clement Tsang b6363096b4
bug: fix bug where you could move down in basic proc when search was off (#211)
Fixes a bug where you could move down in a process widget even if search was disabled while in basic mode.
2020-08-29 04:06:21 -04:00
Clement Tsang 9a11e77aa0
feature: Adaptive network widget (#206)
Allows the network widget graph to grow/shrink with current data, rather than using a static size.
2020-08-28 16:30:24 -04:00
Clement Tsang 2425779e7f
bug: fix searching by command being broken (#204)
Fixes searching by command name being broken.
2020-08-26 20:29:55 -04:00
Clement Tsang 9158c5f6d5
bug: fix grouping being broken after refactor (#201)
Fixes grouping not working properly after some refactoring done in 0.4.6.
2020-08-25 03:36:29 -04:00
ClementTsang 93cf53e5d7 docs: Clarify description 2020-08-25 01:12:57 -04:00
Clement Tsang 7e8bf95179
uptick: 0.4.6 (#200) 2020-08-25 01:01:14 -04:00
Clement Tsang 3252796f17
change: Allow e to also close expanded widgets
Allow `e` to toggle expansion, rather than only allowing it to open.
2020-08-22 17:31:19 -04:00
Clement Tsang 1a25fbb987
bug: fix freezing not affecting processes during search and sort
Fixes a bug where searching refreshed process data even when frozen.
2020-08-22 17:23:27 -04:00
Clement Tsang 3394b9ee66
feature: allow searching by state, add more keyword variants
Allows searching by state (`state = sleep`), and adds more keyword variants for searching: `cpu%`, `mem%`, `r/s`, `w/s`, matching the columns.
2020-08-22 15:38:13 -04:00
Clement Tsang c82f4d40b4
feature: Support memb (mem bytes) searching in processes
Supports searching by the new mem value.
2020-08-21 22:59:49 -04:00
Clement Tsang ff15649be7
refactor: remove kill command, use libc
Removes the kill command call and instead uses libc to manage killing processes.
2020-08-21 18:16:37 -04:00
Clement Tsang 7475f24a4e
feature: Add hook to properly clean up in the case of a kill call
Adds a hook to properly clean up the program in case the program gets SIGTERM'd.
2020-08-21 16:00:14 -04:00
Clement Tsang 1dc9346d3b
refactor: Remove ps calls
Removes and refactor ps calls that... should have not been there in the first place.
2020-08-21 01:33:12 -04:00
Clement Tsang 4b03b4b0b0
refactor: Refactor code, add new tests
Refactor code so we use a lib, allowing for easier testing. Adds additional tests for layouts.
2020-08-19 16:32:33 -04:00
ClementTsang eb5ac54ad0 bug: fix not switching sort type when toggling % in mem 2020-08-17 15:52:09 -04:00
Clement Tsang 3c373d7129
feature: Add appox. total mem as an option for processes and basic mem
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-17 15:41:37 -04:00
Clement Tsang 59ce90f577
bug: Fix bug w/ parsing `/proc/{pid}/stats`
Fixes a bug caused by incorrectly reading the `/proc/{pid}/stats` file.  Due to splitting by whitespace, the string parsing was read incorrectly if the process also contained spaces.
2020-08-16 20:53:34 -04:00
Clement Tsang 08e49b63c1
refactor: Revert tui upgrade to 0.10
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-16 04:25:59 -04:00
ClementTsang 9068108d0f bug: fix missing default battery layout during refactor 2020-08-16 03:08:09 -04:00
Clement Tsang d211c6474c
bug: Fix bug caused by hitting enter w/ a failed dd
This would cause the dd fields to get stuck due to never resetting.
2020-08-16 02:56:54 -04:00
Clement Tsang f3897f0538
feature: Allow sorting by any column
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-15 20:35:49 -04:00
ClementTsang 84f63f2f83 refactor: remove redundant newlines 2020-08-13 02:04:53 -04:00
Clement Tsang e1a7378386
change: Update macOS config dir
Update documentation and program to use the correct config directory as per the dirs package.
2020-08-12 02:15:57 -04:00
ClementTsang 6e38d73116 change: Refactor dd drawing code
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-12 00:27:02 -04:00
ClementTsang 60f4759494 change: Add WASD keys for widget selection movement 2020-08-11 21:19:55 -04:00
Clement Tsang d0cc6078df
deps: Update dependencies, drop MSRV
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-11 20:22:39 -04:00
Clement Tsang 30bdaa6073
feature: add full command to process widget
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-08-07 04:29:20 -04:00
ClementTsang be6f824a43 clippy: clippy error due to redundant conversion
Fixes a redundant usize to usize conversion.
2020-07-06 02:36:24 -04:00
ClementTsang cef81d1b8d refactor: use fold to avoid clones in search for implied AND 2020-05-21 22:06:51 -04:00
ClementTsang c7edad91ed refactor: fix clippy error 2020-05-21 21:46:21 -04:00
ClementTsang b33ea11af2 bug: fix query not working for or, refactor a bit 2020-05-21 21:40:40 -04:00
ClementTsang 948c1206e9 chore: wrote better debugging printing for queries
This should make reading completed queries a bit easier for debugging
2020-05-21 16:55:51 -04:00
ClementTsang dcaef7ebc4 bug: fix incorrect parsing for process i/o calc
Cause was checking the wrong indices for values.  I thought I
had taken in a vector of strings that were just byte values,
but they actually contained the labels... oops.
2020-05-21 14:03:00 -04:00
Clement Tsang cf1d41c83a
feature: add back states to unmerged processes 2020-05-19 17:58:17 -04:00
ClementTsang e2e1ac3006 change: always highlight selected cpu 2020-05-18 23:36:58 -04:00
Clement Tsang e6379982f1
refactor: reduce unchecked type conversions to usize 2020-05-18 23:34:50 -04:00
Clement Tsang 12e4777d97
change: remove slash, change scroll behaviour on cpu
- Removal of the old slash-space-to-hide behaviour of CPU widget
- Scrolling onto a specific entry will only show that entry
- Showing average is now default
2020-05-16 22:38:19 -04:00
ClementTsang 2ae2ebd6d8 deps: update sysinfo 2020-05-14 22:22:29 -04:00
ClementTsang 549d61b836 bug: add extra check for process cpu value to be >= 0 2020-05-13 00:15:41 -04:00
ClementTsang a8ed838726 refactor: use a nicer match statement in one spot 2020-05-11 22:52:35 -04:00
ClementTsang ce563542ee force SWAP and RAM labels to show even if at 0 2020-05-11 22:48:37 -04:00
Clement Tsang 137e3cea5f
bug: disk displays nothing on if IO fails to match
Obvious on macOS.
2020-05-11 22:34:35 -04:00
Clement Tsang 7b5685bf44
refactor: remove redundant empty checks in graphs
Now that the fix for empty data is patched in tui, these checks are
redundant.
2020-05-11 01:32:39 -04:00
ClementTsang 56d6771d1b refactor: re-enable tui-rs linear interpolation 2020-05-10 17:01:45 -04:00
Clement Tsang 90272777f7
change: hide table gap if widget height is small 2020-05-09 16:23:15 -04:00
ClementTsang e6181d4aa4 change: hide time legend if window gets too small 2020-05-09 14:54:23 -04:00
ClementTsang b253d0153b change: reallow spaces to represent "and" 2020-05-08 15:34:46 -04:00
Clement Tsang a71d991695
refactor: avoid using max checks, use saturating_sub instead 2020-05-07 01:09:24 -04:00
ClementTsang 9152ba3281 docs: make process help text consistent with README 2020-05-05 18:57:38 -04:00
Kim Brose 095fb7e54e
Update constants.rs 2020-05-05 20:45:43 +02:00
ClementTsang 38f4967a8a bug/change: removed space as and for now 2020-05-04 23:44:33 -04:00
ClementTsang c8afe0d4f8 chore: support MSRV of 1.40.0 2020-05-04 17:45:11 -04:00
ClementTsang a56156a8f2 bug: swap 'and' and 'or' calls around for correct precedence 2020-05-04 00:27:21 -04:00
ClementTsang 2a32bbac3b change: separated search and process widgets again 2020-05-04 00:03:11 -04:00
ClementTsang 83a4a15cd5 bug: fix broken case if quotes surrounded paren 2020-05-03 00:54:33 -04:00
ClementTsang 0986b96056 bug: made the regex error one line in search 2020-05-03 00:08:18 -04:00
ClementTsang 73c16e259d docs: update with search details 2020-05-02 23:46:07 -04:00
ClementTsang 8307b06c56 bug: fix bug with multiple tokens 2020-05-02 21:50:35 -04:00
ClementTsang e12c2f5212 change: add byte units to search 2020-05-02 19:24:19 -04:00
ClementTsang 5e874eab77 refactor/bug: moved search logic; fix quoted words 2020-05-02 18:36:18 -04:00
ClementTsang ecc111b21a refactor: fix clippy errors 2020-05-02 17:39:48 -04:00
ClementTsang 6e81fbeebf change: more advanced searching and filtering 2020-05-02 16:01:07 -04:00
ClementTsang bb45763b39 feature: Add alt-h and alt-l to move left/right within widget 2020-04-30 15:29:36 -04:00
ClementTsang ecd5a003cf change: Use e key instead to maximize; rename to expand 2020-04-29 23:52:25 -04:00
ClementTsang edd5cff12d change: merge search and process widgets together 2020-04-29 23:43:49 -04:00
ClementTsang dacf8b1abb bug: fix broken basic table arrows on other widgets 2020-04-29 23:12:49 -04:00
ClementTsang 70779c078d docs: update help and README for bindings 2020-04-28 22:46:48 -04:00
Andy e850d3d2a8
Kill dialog: vim navigation (#134)
Add `hjkl` as navigation keys in kill dialog.

Closes #133
2020-04-28 17:43:15 -04:00
Clement Tsang 2faf3c6592
refactor: revert linear interpolation until tui fix comes 2020-04-28 16:44:10 -04:00
ClementTsang 78e3c37947 refactor: fix clippy errors 2020-04-27 16:40:45 -04:00
ClementTsang 15dba2e6cf bug: fix empty widget in layout 2020-04-27 16:20:36 -04:00
ClementTsang 8e4f6a3a02 feature: add battery flag 2020-04-27 15:56:39 -04:00
ClementTsang 8534d42f1b refactor: separate state to different file 2020-04-27 13:48:56 -04:00
ClementTsang e33dbbd350 clippy: remove redundant clone 2020-04-26 20:08:02 -04:00
ClementTsang 80548457f9 refactor: cleaned up some of the concurrent parts 2020-04-26 19:53:26 -04:00
Clement Tsang cf48561777
feature: add battery health percentage 2020-04-26 00:11:34 -04:00
Clement Tsang 3a6f7a6750
refactor: changed how we set help text on resize and init 2020-04-25 17:32:31 -04:00
Clement Tsang 863e780f2f
change: add scrolling to help menu 2020-04-24 19:17:58 -04:00
ClementTsang 9fe6e7d4d2 clippy: use suggested to_string and dereferencing 2020-04-23 15:51:35 -04:00
ClementTsang a6b48921ee refactor: hoist painter creation up to avoid having to clean if fail 2020-04-23 15:33:31 -04:00
ClementTsang 04e4c32aec refactor: update error messages and hex error detection 2020-04-23 15:33:13 -04:00
ClementTsang b1f86262f3 refactor: update error messages to be more uniform 2020-04-23 14:10:59 -04:00
ClementTsang 87dba602f9 fix: Fixes typo in config generation 2020-04-22 17:26:50 -04:00
ClementTsang 121370e9f4 docs: update default config 2020-04-22 17:19:36 -04:00
ClementTsang 25addaee63 chore: Add some words to VS Code dict 2020-04-22 17:13:05 -04:00
ClementTsang 7004649a6d Move to tui-rs' built in linear interpolation 2020-04-20 00:29:59 -04:00
ClementTsang 0574678746 Move to stateful except for CPU 2020-04-19 23:39:24 -04:00
ClementTsang f334a72fb1 Made table gap optional rather than enforced 2020-04-19 17:45:32 -04:00
ClementTsang b42583e04c Remove header gap in most tables 2020-04-18 22:54:35 -04:00
ClementTsang 90e1e9f4cb Fix bug with network legend 2020-04-18 21:11:20 -04:00
ClementTsang 207444fbbf Update network legend again 2020-04-18 20:42:52 -04:00
ClementTsang 7248298995 Update highlight to light blue; new network legend 2020-04-18 19:53:11 -04:00
ClementTsang bc571588e4 refactor: Update tui to 0.9; refactor with new features 2020-04-18 18:05:41 -04:00
Clement Tsang 163f6823a2
feature: Add battery widget (#120) 2020-04-16 20:06:50 -04:00
Clement Tsang 4a4a9cf221
bug: Fix dd failing on non-first entries (#116) 2020-04-12 19:26:32 -04:00
Clement Tsang bcfd09da88
change: highlight borders & table headers to cyan (#115) 2020-04-12 18:27:58 -04:00
Clement Tsang a351f05d4a
feature: Show process state (#114)
This is not 100% finished and will be refined in the future, as I plan to
do a bit of an overhaul on how the process widget is going to look and
functionality.  In particular, tabbed is currently kinda just slapped
together (I just combine all the states together as one big string).

However, it is enough to work and show state normally...
2020-04-11 21:02:27 -04:00
Clement Tsang f210681ae7
feature: add io and io/s for processes (#113) 2020-04-10 20:18:26 -04:00
ClementTsang ba5c2734cf refactor: Remove debug. 2020-04-07 22:38:53 -04:00
Clement Tsang 7d9ad1ee78
bug: Fix sizing in search and broken tab logic 2020-04-07 22:38:22 -04:00
Clement Tsang b32c984843
bug: Fix sorting processes by name being case-sensitive 2020-04-07 21:42:57 -04:00
ClementTsang 46e0eee1d3 bug: fix issue with proc widget merging if in the same column as another 2020-04-07 21:15:58 -04:00
Clement Tsang d2434bf8ad
uptick: 0.3.0 2020-04-07 21:07:24 -04:00
ClementTsang 07efc3f301 opt: Only recalculate rect layout if resize or startup 2020-04-06 23:38:00 -04:00
Clement Tsang 9127cb1468
refactor/bug: Array bound checking, fix CPU jump 2020-04-06 23:04:04 -04:00
Clement Tsang 0a63ee46ef
refactor: Deal with some cognitive complexity 2020-04-06 00:40:55 -04:00
Clement Tsang a40ddce84f
deps: Upgrade crossterm and sysinfo (#105) 2020-04-05 23:20:22 -04:00
Clement Tsang ba0fbf808e
(perf) Avoid harvesting if widget is not being displayed 2020-04-04 18:29:32 -04:00
ClementTsang 14c58507c0 (docs): Updates docs and removes a debug 2020-04-03 01:14:41 -04:00
ClementTsang 572d665a8a (docs): Update README to be a bit nicer 2020-04-03 00:50:56 -04:00
Clement Tsang 0b1d84fdf5
Add modularity to widget placement and inclusion (#95) 2020-04-01 20:31:43 -04:00
Mahmoud Al-Qudsi 2b418fb506
Fix division by zero when memory data is not available (#85)
The total memory values may be zero when bottom is run on an unsupported
(or not-fully-supported) platform.

The previous behavior resulted in a NaN value for the memory datapoints,
which was passed through to tui-rs which ultimately panicked when
attempting to graph the memory widget.
2020-03-19 21:03:52 -04:00
Clement Tsang 1968bb14b4
Cleanup before modularity (#84)
* 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-13 01:07:24 -04:00
Clement Tsang d07cee0f7e
Fix cpu legend colouring (#83)
* Initial fix, but pending a rewrite.

* Initial fix, but pending a rewrite.

* Merged two separate iterations into one for cpu legend.

* Refactor average cpu, fix bug with legend and cursor.
2020-03-11 01:02:47 -04:00
Clement Tsang 6c5f95aa5e
Merge branch 'master' into fix_cpu_scroll 2020-03-10 22:21:08 -04:00
ClementTsang 05e0e6bb82 Forgot to set size field upon detecting a resize... 2020-03-10 21:42:12 -04:00
ClementTsang ee1504db89 Fix cpu scroll. 2020-03-10 21:36:13 -04:00
ClementTsang 648864176f Updated documentation, made error in args clearer 2020-03-10 01:51:28 -04:00
ClementTsang 46f1b7df00 Redid how we auto-set time if we have autohide on. 2020-03-10 01:43:42 -04:00
ClementTsang 8630287676 Default to showing time at first for autohide. 2020-03-10 01:38:37 -04:00
ClementTsang 1046043138 Fix bug with autohide causing hide to break. 2020-03-10 01:26:30 -04:00
ClementTsang e5588f1606 Add hiding time and autohiding time. 2020-03-09 00:52:29 -04:00
ClementTsang 78a05bc683 Fixes bug with too large inputs causing a panic
We would prefer a more graceful error message stating what went wrong.
Caught by the Travis test.
2020-03-08 22:27:41 -04:00
ClementTsang f70cf02414 Add configurable default time and interval values
Also added documentation both in app and in the README.
2020-03-08 22:01:49 -04:00
ClementTsang 3026fbd1bc Add time scaling. 2020-03-08 19:47:10 -04:00
ClementTsang 6d0b7035d3 Redid basic mode logic and separated CPU
* Separated CPU into CPU legend and graph

* Redid how I did maximizing with basic mode
2020-03-08 16:17:28 -04:00
Clement Tsang 01b37368b2
More basic cleaning (#74)
* Add htop link.

* Move dd and help dialog into separate files

* Move to  folder

* Properly show error message if DD fails on macOS and linux.
2020-03-08 13:56:18 -04:00
Clement Tsang 226c4e5a68
Clean up and manage some basic stuff (#73)
* Remove debug statement.

* Remove redundant functions from main

* Update pull request template.

* Format temperature line.

* Update README for chocolatey.

* Add note about basic mode and htop's inspiration.
2020-03-08 00:35:01 -05:00
ClementTsang 03ec52c5b1 Split up widgets to make it a bit easier to work with. 2020-03-07 23:47:53 -05:00
Clement Tsang 132a5a2170
Fix dialog box height and scroll label (#71)
* Fixes search with small mode by changing the prompt based on size.

* Minor fixes for search

- Remove ignore unused var lint
- Add a bit more spacing to deal with large unicode
- Add on-right movement on type

* Add contributor's list and bug/req section

* Check for div by zero

* Fix for dd in terms of sizing.

* Added (temporary) fix for help box.  Scrolling is the ideal solution but will leave that for another time.
2020-03-05 23:54:39 -05:00
Clement Tsang f2b5f96d80
Fix by doublechecking the remaining width calculation. (#67) 2020-03-05 11:46:38 -05:00
Clement Tsang 188858fedd
Formatting and typos (#63)
* Fix typo and run rustfmt.

* Also add rustfmt check to travis... this might be temporary.

* Add a bit on default config files being created in the debian extended description.

* Add rustup component add to travis.

* Disable rustfmt for now, seems to play weird on windows builds.

* Remove unneccesary deprecate ignore.
2020-03-05 02:09:29 -05:00
Clement Tsang d018c6ee88
Make update rate u128 across the board. (#64) 2020-03-05 01:30:53 -05:00
Clement Tsang 657cb2dd9b
remove ram rounding. (#62) 2020-03-05 00:38:09 -05:00
ClementTsang b26f2eca4e Rename cevent to event. 2020-03-04 23:51:05 -05:00
ClementTsang 26c1175a8a More merge conflicts. 2020-03-04 23:48:40 -05:00
Clement Tsang fee8b5c8a1
Merge branch 'master' into simple_mode 2020-03-04 23:47:53 -05:00
ClementTsang 2a40750067 Fix merge conflict. 2020-03-04 23:45:59 -05:00
ClementTsang c69362000d Add CPU row allocation system to more evenly distribute it (aka simple division) 2020-03-04 23:13:00 -05:00
ClementTsang 32ca9edf11 Fix highlighting and cpu filtering when maximized 2020-03-04 18:16:19 -05:00
ClementTsang a8d3593518 [skip travis] Update README. 2020-03-03 00:59:03 -05:00
ClementTsang 0c65d5ff56 Added spacing for RAM/net column. 2020-03-03 00:54:49 -05:00
ClementTsang f3ebed6185 Add table indicator to basic. 2020-03-03 00:48:07 -05:00
ClementTsang 9cad3bb4ec Add basic flag to sample config, also fixed incorrect flag name for configs. 2020-03-03 00:08:09 -05:00
ClementTsang 1ba1b0318f Fixed bug with basic mode and default position with basic variants. 2020-03-02 23:45:44 -05:00
shilangyu 47cc34a8e2 reflected auto config creation 2020-03-02 22:07:41 +01:00
ClementTsang 8ee9b72da2 Changed search to be a constant height of 3. 2020-03-02 00:09:45 -05:00
ClementTsang 225ad5366c Added proper navigation for basic mode. 2020-03-02 00:09:45 -05:00
ClementTsang fcd529aca2 Fixed column organization, need to refactor CPU side to remove any redundant code. 2020-03-02 00:09:45 -05:00
ClementTsang 14c2320de2 Added highlighting + begin finalizing arrangement. Still not done. 2020-03-02 00:09:45 -05:00
ClementTsang 953dd81a5d Added space, fixed div by 0 error. 2020-03-02 00:09:45 -05:00
ClementTsang 269d344c5b Renamed total rx/tx styles. 2020-03-02 00:09:45 -05:00
ClementTsang d917a27faa Add minimal mode widgets
This adds minimal mode widgets to the program.  This is not done, still
gotta play around with rearranging it to look nice.

Also going to have to change search bar to always take a constant 3.
May remove borders.
2020-03-02 00:09:45 -05:00
ClementTsang 4c98fe4fde Refactoring. 2020-03-02 00:09:45 -05:00
ClementTsang eb2622467f Refactoring. 2020-03-02 00:09:45 -05:00
ClementTsang ff43799037 Add basic flag + option. Not functional yet. 2020-03-02 00:09:45 -05:00
ClementTsang df01a94cb0 Another import optimization. 2020-03-02 00:09:45 -05:00
Clement Tsang 735038f060
Merge branch 'master' into populate-config 2020-02-29 23:16:15 -05:00
shilangyu f0da30f2cb added missing endline 2020-02-29 13:06:49 +01:00
shilangyu 6a1fa8f379 rust fmt 2020-02-29 12:54:57 +01:00
shilangyu 622703f4b6 create config if doesnt exist 2020-02-29 12:49:56 +01:00
ClementTsang c715133b4d Some more suggestions based on clion. Mostly removing brackets. 2020-02-28 22:39:26 -05:00
ClementTsang 75a1934420 rustfmt 2020-02-28 22:27:35 -05:00
ClementTsang bbdd7786ce Optimized imports as per clion 2020-02-28 22:24:24 -05:00
ClementTsang 6d0136fa26 Remove a debug line. 2020-02-28 21:15:08 -05:00
ClementTsang 05d4982a1a Treat backspace as a cursor left movement. 2020-02-28 19:54:20 -05:00
ClementTsang 818d920835 Fixed cursor issue. 2020-02-28 01:12:24 -05:00
ClementTsang 3f55f071b7 Some minor things like adding a question template + removal of debug. 2020-02-27 22:50:43 -05:00
ClementTsang 09b7e5cb49 Switch to another arrow. 2020-02-27 18:25:08 -05:00
ClementTsang b00740a7dd Added total rx + tx colouring options. 2020-02-27 17:54:39 -05:00
ClementTsang b32d2dca26 Tiny formatting fix. 2020-02-27 17:42:34 -05:00
ClementTsang cc751e19ae Fix issue with cursor on canvas due to not incrementing by the SIZE of the grapheme. 2020-02-27 17:15:09 -05:00
ClementTsang ce9b5372d9 Use max grapheme length rather than max "string" length. 2020-02-27 16:15:28 -05:00
ClementTsang a755a5d41c Switch to using unicode_segmentation's cursor as a basis on how we do cursor movement in search. 2020-02-27 16:10:33 -05:00
ClementTsang 5d90c235eb Add space after arrow due for Konsole
Fix as per https://old.reddit.com/r/kde/comments/6fxf5t/konsole_font_issue/
2020-02-25 22:41:53 -05:00
ClementTsang 0660184099 Colours if selected and F1-3 keys for search options
Added different colours to search options if selected; added F1-3 keys as an alternative for searching.  Both are available, but on macOS F1-3 will be suggested instead.
2020-02-25 21:24:31 -05:00
Clement Tsang 138e9c2132
Merge pull request #27 from ClementTsang/fix_broken_shift
Fix for issue in powershell.
2020-02-24 22:15:05 -05:00
ClementTsang fc52c579d3 Just make swap always display... I think it's fine to keep, even if it's 0. 2020-02-24 21:46:41 -05:00
ClementTsang 1c52587760 Fix alt key too... windows treats it as a CAPITAL. Go figure. 2020-02-24 21:37:36 -05:00
ClementTsang 2f7840568c Fix for issue in powershell.
Insure that this is tested on other systems first.  At least Linux.
2020-02-24 21:29:04 -05:00
ClementTsang 34b84d6b04 Add explicit lifetime parameters as per 2018 idioms. 2020-02-24 21:10:12 -05:00
ClementTsang ceaedad6dc Skip control characters if they are somehow passed in as a char to on_char_key. 2020-02-24 20:07:38 -05:00
ClementTsang 59238c2687 Added named colour support + rgb colour support in config files. 2020-02-23 13:15:46 -05:00
ClementTsang cefa227060 Re-added Red to default cpu pool... this does mean that there is a conflict with avg and cpu core 10, but eh... whatever I guess. 2020-02-23 00:31:35 -05:00
ClementTsang a756c44c66 Support average cpu colour separately from others. Redid documentation. 2020-02-23 00:30:00 -05:00
ClementTsang 0697d9dd56 Fix issue with default file paths not being respected; updated default file paths. 2020-02-20 23:10:52 -05:00
ClementTsang f4b7df139a Merge execute macro calls. 2020-02-20 01:19:26 -05:00
ClementTsang efd74f6fb9 One last change, made head 2 colours const and shared. 2020-02-19 22:32:04 -05:00
ClementTsang c377278974 [skip travis] Update documentation. 2020-02-19 22:21:18 -05:00
ClementTsang c4cd43968e Increased number of default colours. 2020-02-19 22:07:51 -05:00
ClementTsang 1c1efcc714 Colour issue... on powershell. 2020-02-19 22:00:20 -05:00
ClementTsang ae935b6f08 Change default colouring to be compatible on macOS default terminal. 2020-02-19 21:29:53 -05:00
ClementTsang 67c6984406 Pretty sure I fixed scroll resizing... 2020-02-19 19:56:18 -05:00
ClementTsang 8cf5b42f29 Update cargo.toml, some todos 2020-02-19 00:16:40 -05:00
ClementTsang 2135ebbef1 Aaaaand revert again. 2020-02-19 00:06:36 -05:00
ClementTsang bbd475cfdb Scroll bar fix v2, electric boogaloo 2020-02-18 23:33:15 -05:00
ClementTsang e4597730bd Revert scroll fix. 2020-02-18 23:04:50 -05:00
ClementTsang fd32de2774 Add default windows path. 2020-02-18 23:03:01 -05:00
ClementTsang 5131859ab8 Fix scroll problem with resizing/maximizing. 2020-02-18 23:02:52 -05:00
ClementTsang 47b78d22f8 Sanity checks as we approach release... bug patching:
* Fix for freeze not working (due to change with how we eat data)
* Fix for typos with newlines
* Made help box larger
* Made dd box larger
2020-02-17 23:48:27 -05:00
ClementTsang 48d2afc54a Tweak dot generation again... it was too sparse in some cases. 2020-02-17 23:22:03 -05:00
ClementTsang 40900d91ba Fix issue with missing CPU... 2020-02-17 23:15:14 -05:00
ClementTsang 2f59af412d Tons of refactoring and fixes.
* Fixed a bunch of previously introduced bugs.  Oops.
* Some minor refactoring/efficiency changes that *should* help.  Should.
2020-02-17 22:59:35 -05:00
ClementTsang 6dc78a0c0c Update how cpu disabling field looks. 2020-02-17 19:25:59 -05:00
ClementTsang 9b13ac1158 Skip 2 points to reduce CPU load. 2020-02-17 18:48:20 -05:00
ClementTsang 8e1c525e2a Fix issue introduced with searching and ctrl-u 2020-02-17 18:13:31 -05:00
ClementTsang b3eafe711e Fix issue introduced with last commit on searching. 2020-02-17 17:53:49 -05:00
ClementTsang 4485d1b380 Some clippy and refactoring. 2020-02-17 17:42:51 -05:00
ClementTsang c669b5337c Add ability to still show data entries in the legend even if line is disabled. 2020-02-17 12:07:43 -05:00
ClementTsang cbafbfc699 Minor rearrangement of CPU toggle location. 2020-02-17 00:40:39 -05:00
ClementTsang b80259d4d2 Add ctrl-u, update in-program docs 2020-02-17 00:20:22 -05:00
ClementTsang 9fcbff99a3 Update GIF, add DELETE key to search options. 2020-02-16 21:54:29 -05:00
ClementTsang e2039722eb Reversed CPU drawing order; this promotes average (if enabled) to draw on top. 2020-02-16 20:37:34 -05:00
ClementTsang c09c4a37c4 Update some documentation to reflect filter feature in CPU 2020-02-16 20:21:42 -05:00
ClementTsang 65634f23d4 Not implementing mem and network for now... sorry. 2020-02-16 19:50:10 -05:00
ClementTsang 01b1ec8380 Disabled for now... 2020-02-16 19:45:31 -05:00
ClementTsang 32e8be93b7 CPU title bar and esc sequencing. 2020-02-16 19:32:21 -05:00
ClementTsang 8856ea152e De-selected cpu lines are hidden from normal chart. 2020-02-16 18:40:13 -05:00
ClementTsang 8a718080a5 CPU specific line filtering added. 2020-02-16 17:48:24 -05:00
ClementTsang 74df90010d Some basic setup for adding graph filtering; added delete key to allow dd-ing, some refactoring. 2020-02-16 15:25:52 -05:00
ClementTsang 882e5d9289 More minor refactoring to generalize the app search state struct. 2020-02-15 20:25:32 -05:00
ClementTsang 4dc5a3f6d4 Minor refactoring again. 2020-02-15 20:16:05 -05:00
ClementTsang 51761400ce Some minor refactoring; added a quick skip for invalid or blank searches 2020-02-15 20:01:59 -05:00
ClementTsang ccf58bace9 [skip travis] Some notes and readme changes... and an additional commit before starting next feature. 2020-02-15 18:15:25 -05:00
ClementTsang 0c48c5973f More refactoring of some code to make it cleaner. 2020-02-15 18:06:17 -05:00
ClementTsang 05acba2f47 Fixed issue with HJKL keys interfering with search widget. Oops! 2020-02-15 17:34:59 -05:00
ClementTsang 470e431e55 Fixed network chart bug, changed search widget option positioning to always place at bottom. 2020-02-15 17:19:49 -05:00
ClementTsang 3b588f1ba9 Removed extra debug statements. 2020-02-15 16:45:09 -05:00
ClementTsang 7a6d8f088c Some refactoring... I also tried to make the processes part mutlithreaded, but that saved negliglble time and increase cpu usage... 2020-02-15 16:28:44 -05:00
ClementTsang e05b5c46fe Merged async together. 2020-02-14 22:51:20 -05:00
ClementTsang fe5f911ad3 Added ability to set default highlighted widget. 2020-02-13 21:06:11 -05:00
ClementTsang 5ad522be43 Removed unnecessary clone. 2020-02-12 20:09:36 -05:00
ClementTsang 20b5efcc01 Added esc to title of maximized widgets 2020-02-12 19:55:58 -05:00
ClementTsang f0dad8f5bf Added maximizing mode to allow users to zoom into a particular widget. Not 100% done. 2020-02-12 00:35:37 -05:00
ClementTsang 908960f783 Potential fix for strange use% in macos...? 2020-02-11 00:45:13 -05:00
ClementTsang 0051477f56 Accidentally left in an extra line of code. 2020-02-11 00:41:28 -05:00
ClementTsang b17094d4b1 Add current cpu total flag to other OS 2020-02-11 00:34:39 -05:00
ClementTsang 6aaa53ec37 Appease clippy more, remove clippy from travis for now. 2020-02-10 21:59:57 -05:00
ClementTsang a7025aca4a More clippy fixing. 2020-02-10 19:44:26 -05:00
ClementTsang f21c06f8ed Update documentation and help menu for HJKL 2020-02-10 00:29:23 -05:00
ClementTsang 37b1d93d05 removed control + hjkl again, added shift + hjkl (or just HJKL) to navigate widgets 2020-02-10 00:26:17 -05:00
ClementTsang 60b6a0911a Major refactoring to appease clippy; potential reintroduction of hjkl keys to navigate widgets... 2020-02-10 00:16:11 -05:00
Clement Tsang 7ec52b722b Some more changes to support sysinfo update 2020-02-09 22:32:28 -05:00
ClementTsang dbc970abec Accidentally left in some code that prevented the total rx/tx from being shown on windows... oops. 2020-02-09 22:25:47 -05:00
ClementTsang 8098e45dcf Update canvas to support network change on windows 2020-02-09 22:19:05 -05:00
ClementTsang 1ac6cdde2f Update sysinfo, add total network to windows/linux. 2020-02-09 22:11:03 -05:00
ClementTsang 5dd22c6c89 Minor refactoring. 2020-02-09 21:34:44 -05:00
ClementTsang 82cab62790 Made dialog screens affected by colour choice. 2020-02-09 21:28:01 -05:00
ClementTsang 4bc07debb4 Some minor formatting of dialog boxes, added back widget title to search bar 2020-02-09 19:24:22 -05:00
ClementTsang fac67e00ae Split up help screen into categories, hopefully this makes it easier to spot what you are looking for 2020-02-09 19:17:59 -05:00
ClementTsang 909fbd3571 Made the dd screen prettier. 2020-02-09 17:11:57 -05:00
ClementTsang 4ac3a10fbf Update and clean up ? menu... some more work to be done though 2020-02-08 22:38:55 -05:00
ClementTsang b593a29e9c More cleaning up of new colour feature 2020-02-08 18:00:50 -05:00
ClementTsang 8764b3092a Some cleaning up of the canvas colour setting feature 2020-02-08 16:39:50 -05:00
ClementTsang f3a70fbf6d Added more options and removed cursor (merged with overall text highlighting) 2020-02-08 16:00:43 -05:00
ClementTsang 2123becb81 Added colour options to config; updated sample config to reflect this; updated README 2020-02-08 14:28:19 -05:00
ClementTsang 238e0c88e0 Update documentation again, also change temp a bit 2020-02-07 00:28:26 -05:00
ClementTsang 027220e285 [skip travis] Update documentation for config. 2020-02-07 00:19:50 -05:00
ClementTsang 96d405a353 Add config options 2020-02-07 00:16:41 -05:00
ClementTsang 8782b327b9 [skip travis] minor refactor of conversion fns 2020-02-05 21:37:49 -05:00
ClementTsang 7ea20283cf Update cargo to newer versions of crates 2020-02-05 19:53:42 -05:00
ClementTsang 0b857f6609 Remove useless to_vec() calls to reduce clones 2020-02-04 23:33:09 -05:00
ClementTsang 146424a1d4 [skip travis] Remove redundant code 2020-02-04 23:21:44 -05:00
ClementTsang e0115624a9 Refactoring - moved canvas into its own struct... time to do some more fun optimization. 2020-02-04 22:44:49 -05:00
ClementTsang 41d56d8a9b Update Cargo, changed the CLI flags for search a bit along with the docs to be a bit easier to remember (all caps, change regex option to `-R`) 2020-02-04 20:07:53 -05:00
ClementTsang 18ae433f22 Tweaked default colour to have better contrast, added labels back to network (note they won't show as of now due to tui-rs, but that should change with an upcoming TUI release) 2020-02-03 00:39:46 -05:00
ClementTsang 3779109180 [skip travis] Rounding added to mem totals 2020-02-03 00:31:38 -05:00
ClementTsang 7bf88dffd1 Fixed network chart to make it a bit more like before my changes 2020-02-03 00:06:54 -05:00
ClementTsang 0a13d75415 Made search drawing on canvas a bit more efficient if possible, fixed app positionings due to search repositioning 2020-02-02 23:50:18 -05:00
ClementTsang 616ba01be0 Added flag functionality, made case insensitive default from now on 2020-02-02 23:25:15 -05:00
ClementTsang 6551885666 Update documentation and added more flags for search as per last commit 2020-02-02 23:20:53 -05:00
ClementTsang fc3a2e69ec Made search look prettier and organized it a bit... also added match whole word functionality. 2020-02-02 23:15:28 -05:00
ClementTsang e98cc770a5 Removed Ctrl-hjkl as movement between widgets as Ctrl-j seemed to be broken... replaced with Shift-arrow keys for an alternative 2020-02-02 17:45:05 -05:00
ClementTsang e548d07c1f Add panic hook, fix cpu legend causing panic on small windows 2020-02-02 17:09:42 -05:00
ClementTsang 96bb4d1dc1 Fix too small window bug 2020-02-02 14:24:10 -05:00
ClementTsang 1b09133e3b Refactor i64 to u64 for position 2020-02-02 14:22:16 -05:00
Clement Tsang 35f78a7e91
Merge pull request #7 from ClementTsang/optimization_and_refactoring_branch
Optimization and refactoring branch
2020-02-02 01:52:39 -05:00
ClementTsang 853ce3c736 Move ignore case to tab 2020-02-02 00:55:57 -05:00
ClementTsang 3327087443 Fix dd with new changes 2020-02-02 00:52:41 -05:00
ClementTsang 0ab4b7f7cc Fix process searching while scrolling... that was broken for a while, I guess 2020-02-02 00:24:00 -05:00
ClementTsang 0bf7f32473 Optimizing processes... 2020-02-01 23:49:44 -05:00
ClementTsang 67ff2f28eb Tweaked point generation a bit again 2020-01-31 21:01:33 -05:00
ClementTsang 971384cf3a New way of doing referencing previous pid stats without having to GC - just write a new one every time... 2020-01-31 20:49:30 -05:00
ClementTsang 24f0bbc852 dd works on macOS now. 2020-01-30 23:13:12 -05:00
ClementTsang 4f31c6ee02 Lowered stale timing again 2020-01-28 22:48:51 -05:00