mabox-colorizer/bin/conkymountpoints.sh

25 lines
584 B
Bash
Raw Normal View History

2022-10-15 12:19:57 +02:00
#!/bin/bash
getdata () {
df -h | grep -v "boot" | grep '^/dev' | while read DEVICE SIZE USED FREE PERCENT MOUNT
do
[[ "${#MOUNT}" -gt "12" ]] && MOUNTLBL=${MOUNT##*/} || MOUNTLBL=${MOUNT}
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"
SIZE="rozmir"
;;
*)
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