Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markusressel/polybar-addons
A selection of utility programs for displaying stuff in polybar
https://github.com/markusressel/polybar-addons
addon polybar polybar-scripts template
Last synced: about 1 month ago
JSON representation
A selection of utility programs for displaying stuff in polybar
- Host: GitHub
- URL: https://github.com/markusressel/polybar-addons
- Owner: markusressel
- Created: 2021-06-08T19:19:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-15T10:55:49.000Z (about 2 months ago)
- Last Synced: 2024-09-15T13:03:47.647Z (about 2 months ago)
- Topics: addon, polybar, polybar-scripts, template
- Language: Go
- Homepage:
- Size: 1.42 MB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# polybar-addons
This repo contains a number of utility programs I use in my [polybar] setup.
## Programs
| Name | Example | Description |
|-----------|--------------------------|----------------------------------------------------------------------|
| `battery` | `00:45` | Prints the ETR of usage on battery/charging to full/∞ |
| `disk` | `↑ 0.0 B/s ↓ 16.3 B/s` | Prints the average disk read/write activity since the last call |
| `zfs` | `5% (3.54G), 21% (725G)` | Prints ZFS pool statistics |
| `network` | `↓ 12.6MB/s ↑ 45.2 B/s` | Prints the average network send/receive activity since the last call |### Templating
Although all programs have a default output, they also accept an optional "template" string. You can use this template
to modify how the data gathered by the programs is printed. A description of available template placeholders can be
found below.Example:
```shell
> disk "Read: %reads% Write: %writes%"
Read: 27.2KB/s Write: 2.7MB/s
```Since the output of these programs is passed to polybar, you can also include color codes within the template:
```shell
> disk "%{F00C853}Read: %reads% Write: %writes%%{FDFDFDF}"
%{F00C853}Read: 27.2KB/s Write: 2.7MB/s{FDFDFDF}
```Color codes are simply passed on to polybar, which will parse and use them to color the output accordingly.
### battery
| Name | Example | Description |
|-------------|---------|-----------------------------------|
| `%hours%` | `01` | 2 digit padded remaining hours. |
| `%minutes%` | `01` | 2 digit padded remaining minutes. |### network
| Name | Example | Description |
|-----------------|-------------|----------------------------------------------------|
| `%received%` | ` 12.6MB/s` | Monospaced data rate for incoming network traffic. |
| `%transmitted%` | ` 16.3 B/s` | Monospaced data rate for outgoing network traffic. |### disk
| Name | Example | Description |
|------------|-------------|-------------------------------------------------|
| `%reads%` | ` 12.6MB/s` | Monospaced data rate for reading disk activity. |
| `%writes%` | ` 16.3 B/s` | Monospaced data rate for writing disk activity. |### zfs
Placeholders must be prefixed with the name of the target pool.
| Name | Example | Description |
|-----------------|---------|--------------------------------|
| `%rpool.free%` | `750GB` | Free pool space. |
| `%rpool.used%` | `250GB` | Used pool space. |
| `%rpool.cap%` | `25%` | Used pool capacity in percent. |
| `%rpool.total%` | `1TB` | Total pool size. |## How to use
### Build and "Install" (copy to home)
To build and copy all executables to `~/.config/polybar/scripts`
```shell
git clone https://github.com/markusressel/polybar-addons.git
cd polybar-addons
make deploy
```### Polybar Config
Then in your polybar config you can use them like this:
```
modules-right = your_name_of_choice
[...]
[module/your_name_of_choice]
type = custom/script
exec = ~/.config/polybar/scripts/battery "%{F00C853}%hours%:%minutes%%{FDFDFDF}"
interval = 2[...]
```
[polybar]: https://github.com/polybar/polybar