From cf7dabe5eef84890649bc87ecdb63570f770c259 Mon Sep 17 00:00:00 2001 From: jornmann Date: Sat, 9 Apr 2022 12:35:11 +0300 Subject: [PATCH] Add disk usage module --- config.sh | 1 + modules.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/config.sh b/config.sh index 461af4e..11e8a23 100755 --- a/config.sh +++ b/config.sh @@ -15,4 +15,5 @@ #module_kernel "Kernel: " " | " #module_loadavg "Load Avg.: " " | " #module_weather "Weather: " " | " +#module_du "Disk Usage: " " | " module_date "Date: " "" diff --git a/modules.sh b/modules.sh index c08608b..c3f47df 100755 --- a/modules.sh +++ b/modules.sh @@ -37,3 +37,7 @@ module_loadavg() { module_weather() { export bar="${bar}${1}$(curl -s 'wttr.in/?format=1' | sed 's/.* //')${2}" } + +module_du() { + export bar="${bar}${1}$(df -T / | awk '{if (NR!=1) {print $6}}')${2}" +}