summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Barrett <spalf0@gmail.com>2019-09-11 09:11:58 -0500
committerTom Barrett <spalf0@gmail.com>2019-09-11 09:11:58 -0500
commit68ff168b2a14f96964e382fe16d20ecdf1caf33d (patch)
treebeed4cb943b0c9d425180cef88677826109014ba
parent3f8e503ec4278546fffd6a39b6b1e592ecac7d30 (diff)
better bash command to get df
-rw-r--r--dwmstatus/custom.diff2
1 files changed, 1 insertions, 1 deletions
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");