commit abdf31f06733b3826d9f55a797e5e1f4348bb853 parent 7c94d1aea509617e7265f9afbebc73a2675d3c08 Author: NicholasFarrow <nicholas.w.farrow@gmail.com> Date: Wed, 15 Jan 2020 04:15:22 +1100 optimus status Diffstat:
M | .config/i3/statusbar.sh | | | 10 | ++++++++-- |
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/.config/i3/statusbar.sh b/.config/i3/statusbar.sh @@ -14,12 +14,18 @@ nordvpn_status () { echo "$CONNSTAT $COUNTRY$IP" } +optimus_status () { + echo "$(optimus-manager --print-mode | grep mode | tr " " \\n | tail -1)" +} + i3status | while : do # Save output of i3status (generic time date space info) to $line read line - + + OPTIMUS=$(optimus_status) + # Get NordVPN status if command -v nordvpn &> /dev/null; then NORD=$(nordvpn_status) @@ -31,5 +37,5 @@ do ETH=$(crypto_rate "ETH") RATIO=$(bc <<< "scale=4;$ETH/$BTC") - echo -e "$NORD | ${RED}BTC: $BTC ETH: $ETH ETH/BTC: 0$RATIO | $line" || exit 1 + echo -e "$OPTIMUS | $NORD | ${RED}BTC: $BTC ETH: $ETH ETH/BTC: 0$RATIO | $line" || exit 1 done