#! /bin/bash
# -*- mode: sh -*-
#
# Graphicat frontend for df(1) command
# Author: Victor Ananjevsky <ananasik@gmail.com> 2012
#
# Remastered for SparkyLinux by Paweł "pavroo" Pijanowski <pavroo@onet.eu> 2013/06/07
# Copyright Paweł Pijanowski 2013-2025 under the GNU GPL3 License
# Last update 2025/05/28

# get default's locale file
DEFLOCDIR="/usr/share/sparky/sparky-xdf"
if [ "`cat /etc/default/locale | grep LANG= | grep de`" != "" ]; then
. $DEFLOCDIR/de
elif [ "`cat /etc/default/locale | grep LANG= | grep el`" != "" ]; then
. $DEFLOCDIR/el
elif [ "`cat /etc/default/locale | grep LANG= | grep es`" != "" ]; then
	if [ "`cat /etc/default/locale | grep LANG= | grep es_AR`" != "" ]; then
. $DEFLOCDIR/es_AR
	else
. $DEFLOCDIR/es_ES
	fi
elif [ "`cat /etc/default/locale | grep LANG= | grep fi`" != "" ]; then
. $DEFLOCDIR/fi
elif [ "`cat /etc/default/locale | grep LANG= | grep fr`" != "" ]; then
. $DEFLOCDIR/fr
elif [ "`cat /etc/default/locale | grep LANG= | grep hu`" != "" ]; then
. $DEFLOCDIR/hu
elif [ "`cat /etc/default/locale | grep LANG= | grep id_ID`" != "" ]; then
. $DEFLOCDIR/id_ID
elif [ "`cat /etc/default/locale | grep LANG= | grep it`" != "" ]; then
. $DEFLOCDIR/it
elif [ "`cat /etc/default/locale | grep LANG= | grep ja_JP`" != "" ]; then
. $DEFLOCDIR/ja
elif [ "`cat /etc/default/locale | grep LANG= | grep pl`" != "" ]; then
. $DEFLOCDIR/pl
elif [ "`cat /etc/default/locale | grep LANG= | grep pt_BR`" != "" ]; then
. $DEFLOCDIR/pt_BR
elif [ "`cat /etc/default/locale | grep LANG= | grep pt_PT`" != "" ]; then
. $DEFLOCDIR/pt_PT
elif [ "`cat /etc/default/locale | grep LANG= | grep ru`" != "" ]; then
. $DEFLOCDIR/ru
elif [ "`cat /etc/default/locale | grep LANG= | grep uk`" != "" ]; then
. $DEFLOCDIR/uk
else
. $DEFLOCDIR/en
fi
#
lsblk -o NAME,SIZE,FSAVAIL,MOUNTPOINT | tail -n +2 | awk '{printf "%s\n%s\n%s\n%s\n", $1, $2, $3, $4}' |\
    yad --window-icon=drive-harddisk --width=700 --height=450 --center --image=drive-harddisk --text="$LOCAL3" --title="$LOCAL1" --button=$LOCAL2:0 --list --no-selection --column="$LOCAL4" --column="$LOCAL5" --column="$LOCAL6" --column="$LOCAL7"

exit 0
