home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
418e4cd
)
Add Internet address to status
author
Siraaj Khandkar
<siraaj@khandkar.net>
Fri, 20 Nov 2020 12:47:43 +0000
(07:47 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Fri, 20 Nov 2020 12:47:43 +0000
(07:47 -0500)
home/lib/login_functions.sh
patch
|
blob
|
blame
|
history
diff --git
a/home/lib/login_functions.sh
b/home/lib/login_functions.sh
index
9af3af1
..
dbde373
100644
(file)
--- a/
home/lib/login_functions.sh
+++ b/
home/lib/login_functions.sh
@@
-427,6
+427,10
@@
flat_top_5() {
'
}
+internet_addr() {
+ curl --silent --show-error --max-time "${1:=1}" 'https://api.ipify.org' 2>&1
+}
+
status_batt() {
case "$(uname)" in
'Linux')
@@
-536,6
+540,8
@@
status() {
echo
echo 'net'
+ echo "${indent_unit}internet"
+ echo "${indent_unit}${indent_unit}$(internet_addr 0.5)"
echo "${indent_unit}if"
(ifconfig; iwconfig) 2> /dev/null \
| awk '
This page took
0.030388 seconds
and
4
git commands to generate.