commit d53d91cb5dbafc311228c244b66ef2edbdd61fd0
parent 0c8cd9bc5e0632c719044ef8c5112663a4ce008c
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 5 Mar 2019 09:36:49 +0100
Fix shellcheck warnings
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/links/.config/i3/i3scripts/i3battery b/links/.config/i3/i3scripts/i3battery
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
# Give a battery name (e.g. BAT0) as an argument.
case $BLOCK_BUTTON in
@@ -15,7 +15,7 @@ BAT=${1:-BAT0}
capacity=$(cat /sys/class/power_supply/"$BAT"/capacity) || exit
status=$(cat /sys/class/power_supply/"$BAT"/status)
-time=" ($(acpi -b | egrep -o '[0-9][0-9]:[0-9][0-9]'))"
+time=" ($(acpi -b | grep -E -o '[0-9][0-9]:[0-9][0-9]'))"
[ "$time" = " ()" ] && time=""
powerdraw=" $(( $(cat /sys/class/power_supply/"$BAT"/power_now)/1000000 ))W"
[[ "$powerdraw" = " 0W" ]] && powerdraw=""