From 68ff168b2a14f96964e382fe16d20ecdf1caf33d Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Wed, 11 Sep 2019 09:11:58 -0500 Subject: better bash command to get df --- dwmstatus/custom.diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dwmstatus/custom.diff') diff --git a/dwmstatus/custom.diff b/dwmstatus/custom.diff index b2c8798..c0e06e6 100644 --- a/dwmstatus/custom.diff +++ b/dwmstatus/custom.diff @@ -35,7 +35,7 @@ index d2a4b03..5ab33db 100644 +char * +getpartition(char *partition) { -+ char *co = smprintf("df -h | grep %s | cut -d ' ' -f 12 | tr -cd '[:print:]'", partition); ++ char *co = smprintf("df -lh | grep %s | tr -s ' ' | cut -d ' ' -f 4 | tr -d '\n'", partition); + FILE *fd = popen(co, "r"); + if (fd == NULL) + return smprintf("invalid"); -- cgit v1.2.3