i3-blocks-go/README.md
Simon Vieille 79fe14e059
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
use flag instead os os.Args
2022-08-30 15:42:28 +02:00

108 lines
1.9 KiB
Markdown

# 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
* `playerctl` for `spotify` block
## Installation
### From binaries
Get binaries from [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 -format="%H:%M:%S %d/%m/%Y"
```
Show mount point usage and warns with limits and colors.
```
du -block=<block_name> -name=<name> -mount-point=<mount_point> -limit-warning=<limit_warning> -limit-danger=<limit_danger>
```
Show the IP of the given iface.
```
ip -iface=<iface> -version=<ip4|ip6> -name=<name>
```
Show the public IP.
```
ip_wan
```
Show the telemetry using Prusa Printer API.
```
prusa_telemetry -api=http://1.2.3.4/api/telemetry
```
Show a message when the given process is running (use `preg -f`).
```
ps -process=<process> -message=<message>
```
Show indicator of RSS.
```
rss -block=<block_name> -feed=<feed_url> -website=<feed_reader_url> -empty-color=<color> -non-empty-color=<color>
```
Show current song played (spotify).
```
spotify
```
Show volume.
```
volume -channel=<channel>
```
Toggler for wireguard.
```
wireguard -iface=<iface> -name=<name>
```
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
```