Switch to systemd-networkd for AP name
This commit is contained in:
parent
f91ced3130
commit
0206ddaf1c
1 changed files with 2 additions and 2 deletions
|
@ -11,12 +11,12 @@ ip=$(ip a show ${interface} | awk '/inet .* scope global/{ print $2 }' | cut -d
|
|||
# We found no ip: Get out here
|
||||
[ -z "${ip}" ] && exit
|
||||
|
||||
network=$(iwgetid -r)
|
||||
network=$(networkctl status -a | awk -F ': ' '/Wi-Fi access point/{ print $2 }' | cut -d ' ' -f 1)
|
||||
|
||||
# We found no network: Get out here
|
||||
[ -z "${network}" ] && exit
|
||||
|
||||
printf "\uf9a1 <span color=\"#8FAAFC\">%s</span> <span color=\"#50fa7b\">(%s)</span>\n" ${network} ${ip}
|
||||
printf "\uf1eb <span color=\"#8FAAFC\">%s</span> <span color=\"#50fa7b\">(%s)</span>\n" ${network} ${ip}
|
||||
|
||||
# On click copy IP
|
||||
[ -n "${BLOCK_BUTTON:-}" ] && echo -n "${ip}" | tr -d '\n' | xclip -selection c || true
|
||||
|
|
Loading…
Reference in a new issue