# I3 Blocks Blocks compatible with [i3blocks](https://github.com/vivien/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](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 Each binary has a help, eg `./app -h`. ### App Add the shortcut `` and run `` when clicked. ``` [app_otp] command=/path/to/app -block=app_otp -name=🔐 -bg-color='#363636' -fg-color='#ffc337' -cmd=otpclient format=json markup=pango interval=1000 [app_flameshot] command=/path/to/app -block=app_flameshot -name=F -bg-color='#bf007e' -fg-color='#fff' -cmd="flameshot gui --delay 500" format=json markup=pango interval=1000 [app_ksnip] command=/path/to/app -block=app_youtube -name=Y -bg-color='#c74a42' -fg-color='#fff' -cmd="xdg-open https://www.youtube.com/" format=json markup=pango interval=1000 ``` ### Date Show the time using the given format. ``` [time] command=/home/simon/www/repo/i3-blocks-go/build/date -format="%H:%M:%S %d/%m/%Y" format=json markup=pango interval=persist ``` ### Disk usage Show mount point usage and warns with limits and colors. ``` [du_root] command=/path/to/du -block=du_root -mount-point=/ -name=root -limit-warning=70 -limit-danger=90 format=json markup=pango interval=30 [du_home] command=/path/to/du -block=du_home -mount-point=/home -name=home -limit-warning=90 -limit-danger=95 format=json markup=pango interval=30 ``` ### IP Show the IP of the given iface. ``` [ip_wg0_ip4] command=/path/to/ip -iface=wg0 -version=ip4 -name=VPN format=json markup=pango interval=3 [ip_eth0_ip4] command=/path/to/ip -iface=eth0 -version=ip4 -name=Foo format=json markup=pango interval=3 [ip_eth0_ip6] command=/path/to/ip -iface=eth0 -version=ip4 -name=Bar format=json markup=pango interval=3 ``` ### IP (wan) Show the public IP. ``` [ip_wan] command=/path/to/ip_wan format=json markup=pango interval=100 ``` ### Prusa telemetry Show the telemetry using Prusa Printer API. ``` [prusa] command=/path/to/prusa_telemetry -api=http://1.2.3.4/api/telemetry format=json markup=pango interval=60 ``` ### Process Show a message when the given process is running (use `preg -f`). ``` [ps] command=/path/to/ps -process=foo -message="Foo is running" format=json markup=pango interval=3 ``` ### Feed indicator Show indicator of RSS. ``` [rss_foo] command=/path/to/rss -block=rss_foo -feed="https://foo.example.com/feed.xml" -website="https://foo.example.com/" -empty-color="#CCCCCC" -non-empty-color="#B3FF6C" align=left interval=30 format=json markup=pango [rss_bar] command=/path/to/rss -block=rss_bar -feed="https://bar.example.com/atom.xml" -website="https://bar.example.com/" -empty-color="#aabfc1" -non-empty-color="#00d8f0" align=left interval=30 format=json markup=pango ``` ### Spotify status Show current song played (spotify). ``` [spotify] command=/path/to/spotify format=json markup=pango interval=3 ``` ### Volume Show volume. ``` [volume] command=/path/to/volume -channel=Master format=json markup=pango interval=1 ``` ### Weather Show the weather of the given location ([https://fr.wttr.in/](https://fr.wttr.in/)). ``` [weather] command=/path/to/weather -loc=Paris -lang=fr format=json markup=pango interval=1800 ``` ### Wireguard toggler Toggler for wireguard. ``` [wireguard_wg0] command=/path/to/wireguard -iface=wg0 -name=Foo format=json markup=pango interval=2 [wireguard_wg1] command=/path/to/wireguard -iface=wg1 -name=Bar format=json markup=pango interval=2 ``` ### Workspace Apps (task bar) Add blocks that represent opened apps and create a task bar. ``` [workspace_apps] command=/path/to/workspace_apps -x=$relative_x format=json markup=pango interval=1 ```