inouifi

Display speed and realtime stops of the TGV inoui you are in

Stars
11

inouifi

Display information about your train (only inoui TGV): speed and stops (possibily with delay).

This tool can be combined with other tools (in my case with waybar).

It requires to be connected to the train’s wifi.

Install

You need a rust toolchain. I suggest using rustup.

Compile with:

cargo build --release

The executable will be in target/release/inouifi.

Copy it somewhere in your path (personnaly, I use ~/Apps):

cp target/release/inouifi ~/Apps

Usage

The executable has four commands

inouifi connected: display whether you are connected to the train wifi. Returns 0 if connected, 1 otherwise. Use --quiet to only have the return code.

inouifi speed: display your current speed. Use --no-unit if you just want the value in km/h.

inouifi stops: all the stops and expected time. It should display real time if your train is delayed, and also added/removed stops (hasn’t been tested — I was lucky on my journey).

inouifi waybar: a format suited for waybar. It displays the speed and shows the stops as a tooltip.

Here is way waybar configuration:

"custom/train": {
      "exec-if": "$HOME/Apps/inouifi connected --quiet",
      "exec": "$HOME/Apps/inouifi waybar",
      "interval": 2,
      "format": "{} km/h",
      "return-type": "json"
  }

Thanks

Disclaimer

It was coded on one trip and hasn’t be really tested in the wild. Feedback welcome!