2022-10-15 12:19:57 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
getdata () {
|
2023-08-02 01:34:04 +02:00
|
|
|
df -h | grep -v "boot" | grep -v "/dev/loop" | grep '^/dev' | while read DEVICE SIZE USED FREE PERCENT MOUNT
|
2022-10-15 12:19:57 +02:00
|
|
|
do
|
2022-12-03 16:23:34 +01:00
|
|
|
[[ "${#MOUNT}" -gt "10" ]] && MOUNTLBL=${MOUNT##*/} || MOUNTLBL=${MOUNT}
|
|
|
|
[[ "${#MOUNTLBL}" -gt "10" ]] && MOUNTLBL=${MOUNTLBL:0:9}
|
2022-10-15 12:19:57 +02:00
|
|
|
echo "$MOUNTLBL\${goto 90}\${color2}\${fs_bar 6,64 $MOUNT}\${color}\${goto 160}$USED\${goto 200}$PERCENT\${alignr}$SIZE"
|
|
|
|
done
|
|
|
|
}
|
2022-10-17 14:48:35 +02:00
|
|
|
case "$LANG" in
|
|
|
|
pl*)
|
|
|
|
MOUNTPOINTS="Punkty montowania"
|
|
|
|
USED="użyte"
|
2022-10-27 01:10:17 +02:00
|
|
|
SIZE="rozmiar"
|
2022-10-17 14:48:35 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
MOUNTPOINTS="MOUNT POINTS"
|
|
|
|
USED="used"
|
|
|
|
SIZE="size"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
echo "$MOUNTPOINTS"
|
|
|
|
echo "\${goto 160}$USED\${goto 200}%\${alignr}$SIZE"
|
2022-10-15 12:19:57 +02:00
|
|
|
getdata
|