Add IP module
This commit is contained in:
parent
2b07abaa42
commit
1b59e123c0
@ -16,4 +16,5 @@
|
|||||||
#module_loadavg "Load Avg.: " " | "
|
#module_loadavg "Load Avg.: " " | "
|
||||||
#module_weather "Weather: " " | "
|
#module_weather "Weather: " " | "
|
||||||
#module_du "Disk Usage: " " | "
|
#module_du "Disk Usage: " " | "
|
||||||
|
#module_ip "IP: " " | "
|
||||||
module_date "Date: " ""
|
module_date "Date: " ""
|
||||||
|
@ -41,3 +41,7 @@ module_weather() {
|
|||||||
module_du() {
|
module_du() {
|
||||||
export bar="${bar}${1}$(df -T / | awk '{if (NR!=1) {print $6}}')${2}"
|
export bar="${bar}${1}$(df -T / | awk '{if (NR!=1) {print $6}}')${2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module_ip() {
|
||||||
|
export bar="${bar}${1}$(ip -f inet a | awk '/inet / { print $2 }' | tail -n 1 | sed 's/\/.*//')${2}"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user