1
0
Fork 0
forked from ahurac/dotfiles

iwqr : plus de skill issue

This commit is contained in:
Ahurac 2023-12-10 12:20:55 +01:00
parent cfeb1d35cf
commit 7a0cbd2d7e

View file

@ -7,8 +7,8 @@ fi
cd /var/lib/iwd
field='Connected network'
ssid=$(iwctl station wlan show | grep '^\s*'"${field}"'\s' | xargs | sed "s/^${field} //")
ssid=$(iwctl station wlan0 show | grep '^\s*'"${field}"'\s' | xargs | sed "s/^${field} //")
unset field
passphrase=$(awk -F = '($1 == "'"${1}"'") { print $2 }' "${ssid}.psk")
passphrase=$(awk -F = '($1 == "Passphrase") { print $2 }' "${ssid}.psk")
qrencode -s 1 -l H -o - "WIFI:T:WPA;S:${ssid};P:${passphrase};;" | catimg -H 0 -