Created
October 21, 2020 06:53
-
-
Save rene-d/21d21a9fc414021a067ce2eaa3cd2a0e to your computer and use it in GitHub Desktop.
Show TGV speed in the Bash prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _tgv_speed() | |
| { | |
| LANG=C printf "%.f km/h" $(curl -s "https://wifi.sncf/router/api/train/gps" | jq -cr ".speed * 3.6") | |
| } | |
| PS1='\[\033[01;32m\]\u@\h\[\033[0;93m $(_tgv_speed)\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment