From 68c61172798a7885e095b43c6cdaa2837eb4f6e7 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Tue, 22 Jun 2021 21:23:22 -0400 Subject: [PATCH] Simplify overly complex awk command --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.h b/config.h index 1910781..0a2239a 100644 --- a/config.h +++ b/config.h @@ -1,7 +1,7 @@ static const Block blocks[] = { // {"[", "cat /sys/class/power_supply/BAT0/capacity", 15, 0}, - {"%, ", "awk '{print tolower(substr($0, 1, 1)) substr($0, 2)}' /sys/class/power_supply/BAT0/status", 15, 9}, + {"%, ", "awk '{print tolower($0)}' /sys/class/power_supply/BAT0/status", 15, 9}, {"] [", "amixer sget Master | awk -F'[][]' '/dB/ {print $2 \", \" $6}'", 15, 10}, {"] [", "date '+%A %Y-%m-%d %I:%M %p]'", 15, 0}, }; -- 2.39.2