Commit graph

930 commits

Author SHA1 Message Date
Clement Tsang
1a715206be
ci: try using GHA instead of Cirrus for FreeBSD in basic CI (#1577)
Ideally we minimize our usage of Cirrus CI, especially for typical PR CI workflows, since it's a bit cludgy to work with. This method is also more extendable to things like OpenBSD.

Fine for deploys I guess since that's not super frequent and at this point I have that working fairly well when automated + I don't usually have to wait for it.
2024-09-03 08:33:13 +00:00
Stephen Huan
7c35def686
fix: selected text bg in default-light theme (#1578) 2024-09-03 03:27:03 -04:00
Clement Tsang
a095e67179
change: default config location on macOS considers XDG config var (#1570)
Actually support $XDG_CONFIG_HOME on macOS. Apparently in our docs we also say we do, but we, uh, don't, because dirs doesn't.

Note this is backwards-compatible, in that if a config file exists in the old default locations, we will check those first.
2024-08-22 01:00:55 +00:00
Zeb Piasecki
cbe27997bd
fix: add extra row for basic cpu widget if using avg row on cores % 4 != 0 (#1565) 2024-08-19 10:51:03 -04:00
Clement Tsang
5a009987ac
docs: update docs around disable_gpu change. (#1562)
* docs: update changelog

* update docs
2024-08-14 20:27:32 -04:00
shurizzle
6b0a285541
refactor: rename flags.enable_gpu to flags.disable_gpu (false by default) (#1559)
Co-authored-by: shurizzle <me@shurizzle.dev>
2024-08-14 18:22:47 -04:00
Clement Tsang
d9d9e1df9f
other: show N/A for Nvidia GPUs if we detect one but can't get temps (#1557)
* other: show N/A for Nvidia GPUs if we detect one but can't get the temperature

* refactor: driveby refactor of filter system and code for temp

* missed one
2024-08-11 17:20:07 -04:00
Clement Tsang
c65121c43a
refactor: clean up some config and panic code (#1556)
* clean up some code

* refactor cancellation system to a separate cancellation token struct and clean up panic code
2024-08-11 02:04:44 -04:00
Clement Tsang
96ed26d87a
other: add another test to validate default config (#1553)
* update changelog

* add another lib test to make sure valid integration configs are actually valid

* only test these on default config

* clippy

* add extra CI fail check

* fix windows
2024-08-08 04:44:48 -04:00
Clement Tsang
cf47cb9fae
other: add test to make sure default config is valid (#1552) 2024-08-08 01:36:42 +00:00
Frederick Zhang
4c8367225a
fix: missing parent section names in TOML (#1551) 2024-08-07 12:59:44 -04:00
Clement Tsang
32f64f4d52
bug: fix occasionally wrong run time reported by sysinfo (#1542)
* bug: fix occasionally wrong runtime reported by sysinfo

Seems like on other platforms, sysinfo will sometimes report a run time
that starts from UNIX epoch - this gives a non-sensical value of 19000+
days, and it at least looks a little more reasonable to just return 0 in
this case. I guess we can also make it return N/A in the future but this
is a quick fix for now.

* update changelog
2024-08-05 20:15:22 -04:00
Clement Tsang
feb0c6912c
bug: fix default_cpu_entry arg not being used and missing from docs (#1543) 2024-08-05 18:55:05 -04:00
Clement Tsang
9f7e00497d
bug: fix not updating sysinfo processes correctly (#1541)
* bug: fix not updating sysinfo processes correctly

* also fix a potential panic spot on slow computers

* update changelog
2024-08-05 18:38:36 -04:00
Zeb Piasecki
d6c2ef3e22
feat: add option to move avg CPU to another row (#1487)
Adds an `average_cpu_row` option to move the average CPU usage to its own row
when using basic mode.
2024-08-03 01:10:36 -04:00
Clement Tsang
5b68b6ee81
other: add test to catch issues with incorrect long arg names (#1528) 2024-08-01 15:45:24 +00:00
Clement Tsang
03e69b3be0
bug: fix using clap macro incorrectly, causing broken long help name (#1526)
Basically, I did:

```
long = "blah blah blah"
```

but it should have been:

```
long,
long_help = "blah blah blah"
```

The former makes the _long help flag_ the description which... well,
isn't right.
2024-08-01 15:21:09 +00:00
Clement Tsang
8afae3fbe8
uptick: 0.10.0 (#1510)
* uptick: 0.10.0

* docs: fix changelog

* bump lockfile

* match clap

* add/update schema

* add note
2024-08-01 02:45:57 -04:00
Clement Tsang
a6e1ea3bd8
docs: update docs on filter (#1519)
Updates some outdated docs on filtering, and adds some tests as well. In particular, this also adds a cfg_attr on tests to try and catch unknown fields; we'll be more lenient in prod builds though and allow them.
2024-07-31 06:41:30 +00:00
Clement Tsang
2c0fb2a723
other: clarify config file creation logic/code (#1518) 2024-07-31 05:33:32 +00:00
CosmicHorror
8f995f80e4
other: Add the config path to the error message if unable to create config (#1515) 2024-07-31 00:36:12 -04:00
Clement Tsang
4b14ccb56b
feature: support italic text styling (#1514)
Support italics as a text styling option.
2024-07-31 01:54:26 +00:00
Clement Tsang
c77256eaaf
change: make table headers bold by default (#1513)
* change: make table headers bold by default

* changelog
2024-07-31 00:37:38 +00:00
Clement Tsang
08a7b8b860
feature: support bold text (#1512)
* feature: support bold text

* add changelog

* more testing
2024-07-30 07:43:57 +00:00
Clement Tsang
f091ebdc6a
feature: support simple colour settings for text fields too (#1511)
* feature: support simple colour settings for text fields too

* also add 'color' back to some options

* tests
2024-07-30 07:15:23 +00:00
Clement Tsang
28972a1e64
refactor: refactor styling options (#1499)
Introduce a new configuration system for styling.
2024-07-29 09:03:35 +00:00
Clement Tsang
e4eb69dbd5
deps: bump deps as of 2024-07-027 (#1507)
* deps: bump root deps as of 2024-07-027

* bump lockfile
2024-07-27 01:39:22 -04:00
Clement Tsang
1208c459e4
refactor: remove time as a dependency outside of logging (#1506)
I was mostly just using the time crate for local log debugging and just to avoid converting seconds to h/m/s.

This PR makes it so we are only using it for local log debugging.
2024-07-26 05:12:29 +00:00
Clement Tsang
a794cc5123
refactor: run clippy after updating to Rust 1.80 (#1502) 2024-07-26 00:44:38 +00:00
Clement Tsang
29029b86fb
refactor: remove BottomError (#1498)
* refactor: remove BottomError

* remove thiserror

* some cleanup

* forgot to remove this
2024-07-22 07:30:03 +00:00
Clement Tsang
0401f527e5
refactor: migrate data collection and some others away from BottomError (#1497) 2024-07-22 04:52:38 +00:00
Clement Tsang
c56e28328e
refactor: convert more errors over (#1496)
* refactor: remove From<String> for BottomError

* fix kill_process
2024-07-19 23:52:13 -04:00
Clement Tsang
1ec4ca3f06
refactor: out with arg/config error, and make user messages more consistent (#1494)
* refactor: out with arg/config error, and make user messages more consistent

* finish up

* fix all the tests
2024-07-19 06:51:50 +00:00
Clement Tsang
d97d75f797
refactor: clean up conversion and crossterm errors (#1493)
* refactor: clean up conversion errors

* refactor: remove crossterm error
2024-07-14 08:01:44 +00:00
Clement Tsang
571a801bf8
refactor: error refactoring, part 1 (#1492)
* refactor: use anyhow for logging

* refactor: clean up query errors

* also remove tryparseint
2024-07-13 05:35:09 +00:00
Clement Tsang
28416ddb57
deps: bump root + lock deps as of 2024-06-27 (#1488)
* deps: bump root deps as of 2024-06-27

* deps: bump lock as well

* also bump unicode_ellipsis
2024-06-27 23:40:05 -04:00
Clement Tsang
3602429529
other: add schema test for uncommented default config (#1484)
* other: add schema test for uncommented default time

* ahhh

* forgot to disable this
2024-06-17 00:59:36 -04:00
Clement Tsang
7666a09162
feat: add way to automatically generate new json schemas (#1482) 2024-06-16 19:28:24 -04:00
Clement Tsang
982b7181a6
change: change how disk, temp, and net filters in config are set (#1481)
* change: change how disk, temp, and net filters in config are set

* run rustfmt

* update default config
2024-06-16 02:15:36 -04:00
Clement Tsang
8885910442
refactor: remove lib and move some things around (#1477)
A loooooong time ago (wow, it's been 4 years apparently...), I made the brilliant (/s) decision to use both lib.rs and main.rs because I was trying to add tests in the tests folder that needed private access to some functions in the src - and at the time, the only way I could think of doing so was exposing bottom as a library and a binary.

This isn't necessarily bad, but for my use case, it's pretty unnecessary nowadays (since I've moved all my tests back into the source files) and adds complexity in looking for certain things, so it's high time we move things around and remove lib.rs. I also took the time to clean up some weird code I spotted along the way.
2024-06-05 06:00:21 +00:00
Clement Tsang
7aa379aabf
bug: fix -V not working and causing Cirrus CI to fail (#1478)
* bug: fix -V not working and causing Cirrus CI to fail

* add comment

* update workflows and fix tests
2024-06-05 01:12:00 -04:00
Clement Tsang
ee2e1fee1c
refactor: use struct for args instead of builder interface (#1472)
* start moving args

* tmp

* refactor config

* port over ags

* update changelog
2024-05-27 01:16:37 -04:00
Clement Tsang
073ca890f7
refactor: extract unicode-ellipsis into its own crate (#1465)
* refactor: extract unicode-ellipsis into its own crate

* 0.1.4
2024-05-07 22:53:51 -04:00
Clement Tsang
398bf5930f
refactor: some string-related code cleanup/refactor (#1463)
* other: organize some utility function files

* deps: remove kstring

* refactor: some naming changes

* refactor: some more small refactoring/naming changes

* simplify to_cell to return a Cow

* enable lints
2024-05-07 02:03:30 -04:00
Raphael Erik Hviding
3ded6a6529
bug: fix battery table when hiding gaps (#1458)
This changes the behavior of the battery widget when paired with the skip_table_gap.
2024-05-05 18:11:02 +00:00
Clement Tsang
2b819a3097
other: comment out some dead code (#1456) 2024-05-02 15:19:44 -04:00
Clement Tsang
6591b750f6
deps: bump deps as of 2024-04-28 (#1450)
* deps: bump deps as of 2024-04-28

* fix tests

* extra test
2024-04-28 15:27:33 -04:00
Clement Tsang
93d6718766
other: update a bunch of argument descriptions and some arg/config names (#1441)
* other: update a bunch of argument descriptions and some arg/config names

* update docs

* changelog
2024-04-10 20:46:35 -04:00
Lee Wonjoon
a083ec00dd
feature: Add option to set a position of legend (#1430)
* Add option to set a position of legend

* some small changes

---------

Co-authored-by: ClementTsang <34804052+ClementTsang@users.noreply.github.com>
2024-04-02 01:06:01 -04:00
Clement Tsang
2ee0df1502
change: use sysinfo's swap value for Windows (#1436)
* some consts

* change: use sysinfo's swap calculation for windows

I'll add an additional field for committed in a separate PR which shows
the previous value.
2024-03-27 22:24:14 -04:00