Commit graph

4 commits

Author SHA1 Message Date
Bryan Hoang
408c02ccf4
fix(uptime): filter out singular "user" string in sed expression (#255)
Previously, on machines where the logged-in user count is 1, the `sed`
expression to filter out "... X users, ..." doesn't filter out "... X
user, ...", leading to something like

```
1h 05,  1 user,  load average: 0.05, 0.72, 1.62m
```

being displayed in the module. When the user count is greater than 1
(e.g., after `ssh localhost`), the `uptime` module displays

```
1h 05m
```

as expected.

The Stack Overflow answer the `sed` expression is based on [^1][^2]
doesn't seem to consider the case when the user count is 1.

With this patch, the `uptime` module display correctly when the user
count is 1.

[^1]: https://stackoverflow.com/a/28353785
[^2]: https://github.com/catppuccin/tmux/pull/163
2024-07-19 09:50:21 +00:00
vdbe
61727758ac
Cleanup shellcheck warnings (#178)
* chore: shellcheck-warnings for catppuccin.tmux

Command used: `shellcheck catppuccin.tmux -ax -s bash`

* shellcheck: fix all warnings

Command used: `shellcheck -a catppuccin.tmux $(ls custom/*.sh pane/*.sh status/*.sh window/*.sh)`

* shellcheck: update workflow to check warnings

* shellcheck: include warnings from sourced files
2024-03-30 21:07:56 +01:00
vdbe
e80cb735bb
feat(uptime): replace plugin with sed (#163)
* module(uptime): replace plugin with custom sed

* module(uptime): update doc
2024-03-22 19:29:25 +01:00
Henri Sota
1882a27925 feat(uptime): add uptime module based on robhurring/tmux-uptime 2024-02-17 21:04:18 +01:00