i3status: add time, present disk more nicely

This commit is contained in:
2014-04-30 00:44:58 -07:00
parent 6b09125c08
commit a762c53b9f

View File

@@ -63,24 +63,42 @@ done
cat <<CONFIG
order += "load"
order += "tztime local"
CONFIG
current_zone_path=$(readlink /etc/localtime)
current_zone=$(basename $(dirname $current_zone_path))/$(basename $current_zone_path)
tztime_config='
tztime local {
format = "%a %Y-%m-%d %H:%M:%S"
}'
for zone in Europe/Minsk US/Pacific US/Eastern; do
if [ "$zone" != "$current_zone" ]; then
echo "order += \"tztime $zone\""
tztime_config="$tztime_config
tztime \"$zone\" {
format = \"$(basename $zone) %H:%M\"
timezone= \"$zone\"
}"
fi
done
cat <<CONFIG
$cpu_temperature_config
$wireless_interface_config
$ethernet_interface_config
$battery_config
tztime local {
format = "%Y-%m-%d %H:%M:%S"
}
$tztime_config
load {
format = "%1min"
}
disk "/" {
format = "/ %free"
format = "/ %avail"
}
disk "/home" {
format = "/home %free"
format = "/home %avail"
}
CONFIG