summaryrefslogtreecommitdiffstats
path: root/src/options.rs
AgeCommit message (Collapse)Author
2021-09-05refactor: delete a bunch of old unused codeClementTsang
2021-09-05refactor: move basic mode overClementTsang
Because writing your own layout system and management is just *so much fun*. Totally. ------------------------------------------------------------------- Moves the basic mode system over to the new drawing/widget system. In the process, it has forced me to completely redo how we do layouts... again. This is because basic mode has widgets that control their own height - this means the height of the columns and rows that wrap it are also affected by the widget's height. The previous system, using a constraint tree and splitting draw Rects via tui-rs' built-in constraint solver, did not support this concept very well. It was not simple to propagate up the widths/heights towards parents while also using tui-rs' built-in constraint solver. In the end, it was easier to just rewrite it using another algorithm. We now follow a process very similar to Flutter's layout system. Relevant links to the Flutter docs are found in the code or below: - https://flutter.dev/docs/development/ui/layout/constraints - https://flutter.dev/docs/resources/inside-flutter#sublinear-layouts The gist of it, however, is that we now instead a few new options for any element in the layout tree. A node can either: - Grow to fill remaining space - Take up as much room as its children - Be a specific length Technically right now, it's not perfect, in that leaf nodes can be as large as their children (which makes no sense), though in that case it just treats it as an expand.
2021-08-28refactor: start moving over drawing systemClementTsang
In particular, moving over table-style widgets
2021-08-24refactor: more glue code to build layoutClementTsang
Even more glue code to help glue together our layout options to our new layout system! Note that this PR will most likely likely break the two options: - default_widget_type - default_widget_count and as such, they'll probably be deleted in a later commit. As for why, it's since they're kinda a pain to support and don't work well. Users can still enable default widget selection through the layout system (which will also see a revamp in the future).
2021-08-23refactor: Start state refactorClementTsang
2021-07-14bug: Fix missing config options in docs and default config (#542)Clement Tsang
Adds the missing hide_time and battery config option to the default config and corresponding documentation. Should probably automate the generation of this somehow tbh, though this might change when I add in-app config (soon™)
2021-07-12refactor: remove beef dependency for nowClementTsang
This is just a temp change, I wanted to remove it just for clarity's sake among dependencies, and will probably add it back in the future. For now I'll just stick to std's beef.
2021-05-06other: make advanced kill default (#463)Clement Tsang
We make the advanced kill menu the default instead. You can opt out with disable_advanced_kill.
2021-04-22feature: Add mount filtering, rework filter priority logic (#455)Clement Tsang
This PR accomplishes two things: 1. This PR aims to add mount_filter to the config file. This allows a user to filter their disk widget entries by the mount name as well; this was particularly a problem in trying to address #431. 2. A slight rework of how the filter system works due to the need of being able to manage two potentially conflicting filter sources, since the disk widget will now potentially filter on both the disk name and the mount name. In regards to the second point, the new behaviour is as such: 1. Is the entry allowed through any filter? That is, does it match an entry in a filter where is_list_ignored is false? If so, we always keep this entry. 2. Is the entry denied through any filter? That is, does it match an entry in a filter where is_list_ignored is true? If so, we always deny this entry. 3. Anything else is allowed. This main (breaking) change is really the third point. This would mean that temp_filter and net_filter, when set to allow listed entries with is_list_ignored = false, are kinda... useless, as a whitelist in the scenario of being the only filter is kinda pointless. But hopefully this shouldn't be a problem...?
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-02-15feature: Allow toggling advanced kill menu (#408)Clement Tsang
Allows toggling the advanced kill menu via --advanced_kill or advanced_kill=true.
2021-01-01feature: Add network interface filtering (#381)Clement Tsang
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 ```
2020-12-28feature: Add process_command to default to the process command (#379)Clement Tsang
Adds a `process_command` flag and config option to default to showing the full command in the process widget on startup.
2020-12-25other: re-enable table scroll positionClementTsang
2020-12-12refactor: More minor optimization changes (#353)Clement Tsang
- Move data rather than cloning during data transferring step - Try using beef?
2020-12-10bug: Fix missing states in processes (#345)Clement Tsang
Fixes another change breaking states from showing in processes.
2020-11-28feature: Add scroll indicator to keep track of table position in widgets. (#333)Clement Tsang
Adds the option to enable an "out of" indicator for scrollable table widgets (using --show_table_scroll_position).
2020-11-25bug: Fix inverted hide_avg_cpu option in config (#327)Clement Tsang
2020-11-21bug: [skip travis] Add a better check for default colors in the config fileClementTsang
2020-11-20feature: add tree flag (#312)Clement Tsang
Adds a --tree flag that defaults to tree mode for the process widget.
2020-11-19feature: Add mem_as_value flag (#309)Clement Tsang
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-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-01bug: use cmdline for Linux proc name if >=15 chars (#261)Clement Tsang
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-09-28feature: Add persistent search settings (#257)Clement Tsang
Adds persistent search settings across runs, by saving to the config file. Each process widget keeps track of it's *own* behaviour. The previous flags/options are now for *global* behaviour. The following new behaviour is: - Relevant flags: `--case_sensitive`, `--whole_word`, and `--regex`, will *override* the current widget's default behaviour. - Relevant options: `case_sensitive`, `whole_word`, and `regex`, will also *override* the current widget's default behaviour. As per before, if you set, say, `--case_sensitive`and `case_sensitive=true`, the flag always overrides. Documentation updates will be done in #248.
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-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-09-01bug: fix broken check from last commit, add testsClementTsang
2020-09-01other: Add config error if default_widget_count is not used with ↵ClementTsang
default_widget_type
2020-08-31refactor: Update error messages w/ anyhow and thiserror (#216)Clement Tsang
Refactoring and updating of error messages + tests to be more useful.
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-19refactor: Refactor code, add new testsClement Tsang
Refactor code so we use a lib, allowing for easier testing. Adds additional tests for layouts.
2020-08-16bug: fix missing default battery layout during refactorClementTsang
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-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-16change: remove slash, change scroll behaviour on cpuClement Tsang
- 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-04-27feature: add battery flagClementTsang
2020-04-27refactor: separate state to different fileClementTsang
2020-04-25refactor: changed how we set help text on resize and initClement Tsang
2020-04-23refactor: update error messages to be more uniformClementTsang
2020-04-19Made table gap optional rather than enforcedClementTsang
2020-04-18Update highlight to light blue; new network legendClementTsang
2020-04-16feature: Add battery widget (#120)Clement Tsang
2020-04-04(perf) Avoid harvesting if widget is not being displayedClement 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-10Updated documentation, made error in args clearerClementTsang
2020-03-10Redid how we auto-set time if we have autohide on.ClementTsang
2020-03-09Add hiding time and autohiding time.ClementTsang
2020-03-08Fixes bug with too large inputs causing a panicClementTsang
We would prefer a more graceful error message stating what went wrong. Caught by the Travis test.