mirror of
https://gitlab.com/mattia.basaglia/ASCII-Pony.git
synced 2024-11-22 04:07:59 +01:00
Add Containers
This commit is contained in:
parent
62ac481c37
commit
c7977cd03f
2 changed files with 17 additions and 1 deletions
4
README
4
README
|
@ -37,6 +37,10 @@ Config Variables:
|
||||||
* FSTYPE : file system type used to calculate disk usage (Uses df),
|
* FSTYPE : file system type used to calculate disk usage (Uses df),
|
||||||
if empty it will show the total.
|
if empty it will show the total.
|
||||||
|
|
||||||
|
Requirements:
|
||||||
|
* lsb-release for Dirstro
|
||||||
|
* lxc for Containers
|
||||||
|
|
||||||
Generating Images
|
Generating Images
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
12
systempony
12
systempony
|
@ -103,6 +103,18 @@ function ponyget_Disk()
|
||||||
echo -e "$(pccolor $percent)$used\x1b[0m / $total"
|
echo -e "$(pccolor $percent)$used\x1b[0m / $total"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ponyget_Containers()
|
||||||
|
{
|
||||||
|
local active="$(lxc-ls --active | wc -l)"
|
||||||
|
local total="$(lxc-ls | wc -l)"
|
||||||
|
local color=32
|
||||||
|
if [ "$active" -lt "$total" ]
|
||||||
|
then
|
||||||
|
color=31
|
||||||
|
fi
|
||||||
|
echo -e "\x1b[$color;1m$active\x1b[0m / $total active"
|
||||||
|
}
|
||||||
|
|
||||||
function bold()
|
function bold()
|
||||||
{
|
{
|
||||||
echo -en "\x1b[1m${*}\x1b[22m"
|
echo -en "\x1b[1m${*}\x1b[22m"
|
||||||
|
|
Loading…
Reference in a new issue