diff options
author | Tom Barrett <spalf0@gmail.com> | 2019-09-11 09:11:58 -0500 |
---|---|---|
committer | Tom Barrett <spalf0@gmail.com> | 2019-09-11 09:11:58 -0500 |
commit | 68ff168b2a14f96964e382fe16d20ecdf1caf33d (patch) | |
tree | beed4cb943b0c9d425180cef88677826109014ba /dwmstatus | |
parent | 3f8e503ec4278546fffd6a39b6b1e592ecac7d30 (diff) |
better bash command to get df
Diffstat (limited to 'dwmstatus')
-rw-r--r-- | dwmstatus/custom.diff | 2 |
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"); |