Go to file
Simon Vieille 84fd3269cc
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
update readme
2022-08-30 16:29:53 +02:00
blocks use flag instead os os.Args 2022-08-30 15:42:28 +02:00
rendering update colors 2022-08-29 19:43:10 +02:00
.gitignore remove build directory from git 2022-08-28 21:06:57 +02:00
.woodpecker.yml add ci 2022-08-28 16:56:31 +02:00
go.mod init 2022-08-28 14:59:15 +02:00
go.sum init 2022-08-28 14:59:15 +02:00
Makefile remove task form makefile 2022-08-30 16:03:29 +02:00
README.md update readme 2022-08-30 16:29:53 +02:00

I3 Blocks

Blocks compatible with i3blocks.

Requirements

  • go for compilation
  • sudo and wg-quick 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.

From sources

git clone https://gitnet.fr/deblan/i3-blocks-go.git
cd i3-blocks-go
make

Usage

Each binary has a help, eg ./app -h.

App

Add the shortcut <name> and run <command> when clicked.

command=/path/to/app -block=<block_name> -name=<name> -cmd=<command> -bg-color=<background_color> -fg-color<foreground_color>

Date

Show the time using given format and run gnome-calendar when clicked.

command=/path/to/date -format="%H:%M:%S %d/%m/%Y"

Disk usage

Show mount point usage and warns with limits and colors.

command=/path/to/du -block=<block_name> -name=<name> -mount-point=<mount_point> -limit-warning=<limit_warning> -limit-danger=<limit_danger>

IP

Show the IP of the given iface.

command=/path/to/ip -iface=<iface> -version=<ip4|ip6> -name=<name>

IP (wan)

Show the public IP.

command=/path/to/ip_wan

Prusa telemetry

Show the telemetry using Prusa Printer API.

command=/path/to/prusa_telemetry -api=http://1.2.3.4/api/telemetry

Process

Show a message when the given process is running (use preg -f).

command=/path/to/ps -process=<process> -message=<message>

Feed indicator

Show indicator of RSS.

command=/path/to/rss -block=<block_name> -feed=<feed_url> -website=<feed_reader_url> -empty-color=<color> -non-empty-color=<color>

Spotify status

Show current song played (spotify).

command=/path/to/spotify

Volume

Show volume.

command=/path/to/volume -channel=<channel>

Wireguard toggler

Toggler for wireguard.

command=/path/to/wireguard -iface=<iface> -name=<name>

Task bar

Add blocks that represent opened apps and create a task bar.

[workspace_apps_0]
command=/path/to/workspace_apps 0 $BLOCK_BUTTON
format=json
markup=pango
interval=1

[workspace_apps_1]
command=/path/to/workspace_apps 1 $BLOCK_BUTTON
format=json
markup=pango
interval=1

...