2022-08-29 10:57:28 +02:00
|
|
|
# I3 Blocks
|
|
|
|
|
|
|
|
Blocks compatible with [i3blocks](https://github.com/vivien/i3blocks).
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
2022-08-30 13:33:58 +02:00
|
|
|
* `go` for compilation
|
2022-08-29 10:57:28 +02:00
|
|
|
* `sudo` for `wireguard` block
|
|
|
|
* `tmux` for `app` and `date` blocks
|
|
|
|
* `df` for `du` block
|
|
|
|
* `xdg-open` for `du` block
|
2022-08-29 19:57:44 +02:00
|
|
|
* `playerctl` for `spotify` block
|
2022-08-29 10:57:28 +02:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
### From binaries
|
|
|
|
|
2022-08-29 20:13:00 +02:00
|
|
|
Get binaries from [releases](https://gitnet.fr/deblan/i3-blocks-go/releases).
|
2022-08-29 10:57:28 +02:00
|
|
|
|
|
|
|
### 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.
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:43:41 +02:00
|
|
|
app -block=<block_name> -name=<name> -cmd=<command> -bg-color=<background_color> -fg-color<foreground_color>
|
2022-08-29 10:57:28 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Show the time using given format and run `gnome-calendar` when clicked.
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:42:28 +02:00
|
|
|
date -format="%H:%M:%S %d/%m/%Y"
|
2022-08-29 10:57:28 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Show mount point usage and warns with limits and colors.
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:42:28 +02:00
|
|
|
du -block=<block_name> -name=<name> -mount-point=<mount_point> -limit-warning=<limit_warning> -limit-danger=<limit_danger>
|
2022-08-29 10:57:28 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Show the IP of the given iface.
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:42:28 +02:00
|
|
|
ip -iface=<iface> -version=<ip4|ip6> -name=<name>
|
2022-08-29 10:57:28 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Show the public IP.
|
|
|
|
|
|
|
|
```
|
|
|
|
ip_wan
|
|
|
|
```
|
|
|
|
|
|
|
|
Show the telemetry using Prusa Printer API.
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:42:28 +02:00
|
|
|
prusa_telemetry -api=http://1.2.3.4/api/telemetry
|
2022-08-29 10:57:28 +02:00
|
|
|
```
|
|
|
|
|
2022-08-30 13:33:58 +02:00
|
|
|
Show a message when the given process is running (use `preg -f`).
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:42:28 +02:00
|
|
|
ps -process=<process> -message=<message>
|
2022-08-30 13:33:58 +02:00
|
|
|
```
|
|
|
|
|
2022-08-29 10:57:28 +02:00
|
|
|
Show indicator of RSS.
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:42:28 +02:00
|
|
|
rss -block=<block_name> -feed=<feed_url> -website=<feed_reader_url> -empty-color=<color> -non-empty-color=<color>
|
2022-08-29 10:57:28 +02:00
|
|
|
```
|
|
|
|
|
2022-08-29 19:57:44 +02:00
|
|
|
Show current song played (spotify).
|
|
|
|
|
|
|
|
```
|
|
|
|
spotify
|
|
|
|
```
|
|
|
|
|
2022-08-29 13:44:34 +02:00
|
|
|
Show volume.
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:42:28 +02:00
|
|
|
volume -channel=<channel>
|
2022-08-29 13:44:34 +02:00
|
|
|
```
|
|
|
|
|
2022-08-29 10:57:28 +02:00
|
|
|
Toggler for wireguard.
|
|
|
|
|
|
|
|
```
|
2022-08-30 15:42:28 +02:00
|
|
|
wireguard -iface=<iface> -name=<name>
|
2022-08-29 10:57:28 +02:00
|
|
|
```
|
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
|
|
|
|
```
|