02-26-2015, 12:31 AM
Hi Misko,
I've modified your du script to:
Do you think you could integrate this into the latest github of Lite Tweaks? Thank you.
I've modified your du script to:
Code:
#!/bin/bash
# Script to display file system disk space usage
# Author: Misko_2083
DU_TEXT="Double click on any <b>Partition</b> to open in the file manager.
Click on any Column to sort the information."
DU_TITLE="Disk Usage"
df -h -T| tail -n+2 | while read fs type size used rest target; do
if [[ $rest ]] ; then
echo "$fs" "$type" "$size"B "$used"B "$rest"B "${target[@]}" |grep /dev/sd |
awk '{print $1,"\n",$2,"\n",$3,"\n",$4,"\n",$5,"\n",$6}BEGIN{ s = 7; e = 35; }{for (i=s; i<=e; i++) printf("%s%s", $(i), i<e ? OFS : "\n"); }' #Workaround for disk labels that contain whitespaces(number of characters that can be divided by whitespace =e-s)
fi
done | sed -e 's/[ \t]*$//' $1|zenity --list --width=600 --height=350 --title="${DU_TITLE}" --text="${DU_TEXT}" --column="Device" --column="Filesystem" --column="Size" --column="Used" --column="Free" --column="%Used" --column="Partition" --print-column="7"| cut -d '|' -f2| tee /tmp/tempdf
if [ -z "$(cat /tmp/tempdf)" ]; then
exit 0
fi
thunar "$(cat /tmp/tempdf)"
rm -f /tmp/tempdfDo you think you could integrate this into the latest github of Lite Tweaks? Thank you.
Download your free copy of Linux Lite today.
Jerry Bezencon
Linux Lite Creator
"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."
![[Image: X5qGkCg.png]](https://imgur.com/X5qGkCg.png)


![[Image: TNadfcG.png]](http://i.imgur.com/TNadfcG.png)