2022-08-29 10:57:28 +02:00
|
|
|
# I3 Blocks
|
|
|
|
|
|
|
|
Blocks compatible with [i3blocks](https://github.com/vivien/i3blocks).
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
* go for compilation
|
|
|
|
* `sudo` for `wireguard` block
|
|
|
|
* `tmux` for `app` and `date` blocks
|
|
|
|
* `df` for `du` block
|
|
|
|
* `xdg-open` for `du` block
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
### From binaries
|
|
|
|
|
|
|
|
Get binaries for [releases](https://gitnet.fr/deblan/i3-blocks-go/releases)
|
|
|
|
|
|
|
|
### From sources
|
|
|
|
|
|
|
|
```
|
|
|
|
git clone https://gitnet.fr/deblan/i3-blocks-go.git
|
|
|
|
cd i3-blocks-go
|
|
|
|
make
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Add the shortcut `<name>` and run `<command>` when clicked.
|
|
|
|
|
|
|
|
```
|
|
|
|
app <block_name> <name> <command> <background_color> <foreground_color>
|
|
|
|
```
|
|
|
|
|
|
|
|
Show the time using given format and run `gnome-calendar` when clicked.
|
|
|
|
|
|
|
|
```
|
|
|
|
date "%H:%M:%S %d/%m/%Y"
|
|
|
|
```
|
|
|
|
|
|
|
|
Show mount point usage and warns with limits and colors.
|
|
|
|
|
|
|
|
```
|
|
|
|
du <block_name> <name> <mount_point> <limit_warning> <limit_danger>
|
|
|
|
```
|
|
|
|
|
|
|
|
Show the IP of the given iface.
|
|
|
|
|
|
|
|
```
|
|
|
|
ip <iface> <ip4|ip6> <name>
|
|
|
|
```
|
|
|
|
|
|
|
|
Show the public IP.
|
|
|
|
|
|
|
|
```
|
|
|
|
ip_wan
|
|
|
|
```
|
|
|
|
|
|
|
|
Show the telemetry using Prusa Printer API.
|
|
|
|
|
|
|
|
```
|
|
|
|
prusa_telemetry <block_name> http://<prusa_printer_ip>/api/telemetry
|
|
|
|
```
|
|
|
|
|
|
|
|
Show indicator of RSS.
|
|
|
|
|
|
|
|
```
|
|
|
|
rss <block_name> <feed_url> <feed_reader_url> <foreground_color_when_no_item> <foreground_color_when_items>
|
|
|
|
```
|
|
|
|
|
2022-08-29 13:44:34 +02:00
|
|
|
Show volume.
|
|
|
|
|
|
|
|
```
|
|
|
|
volume <channel>
|
|
|
|
```
|
|
|
|
|
2022-08-29 10:57:28 +02:00
|
|
|
Toggler for wireguard.
|
|
|
|
|
|
|
|
```
|
|
|
|
wireguard <iface> <name>
|
|
|
|
```
|
2022-08-29 16:06:13 +02:00
|
|
|
|
|
|
|
Add a blocks that represent opened apps to create a task bar.
|
|
|
|
|
|
|
|
```
|
|
|
|
workspace_apps 0 $BLOCK_BUTTON
|
|
|
|
workspace_apps 1 $BLOCK_BUTTON
|
|
|
|
workspace_apps 2 $BLOCK_BUTTON
|
|
|
|
workspace_apps 3 $BLOCK_BUTTON
|
|
|
|
workspace_apps 4 $BLOCK_BUTTON
|
|
|
|
workspace_apps 5 $BLOCK_BUTTON
|
|
|
|
workspace_apps 6 $BLOCK_BUTTON
|
|
|
|
workspace_apps 7 $BLOCK_BUTTON
|
|
|
|
```
|