(Bash) One liner to create a QR-Code to connect your phone to the Wifi your PC is connected to using nmcli, qrencode and bash...
sudo bash -c 'CON=$(nmcli -t c s | grep -m 1 '802-11-wireless' | cut -d ":" -f 1) && SSID=$(nmcli -t c s $CON | grep '\.ssid:' | cut -d ":" -f 2) && PSK=$(nmcli -t -s c s $CON | grep '\.psk:' | cut -d ":" -f 2) && echo "SSID=>$SSID< PSK=>$PSK<" && qrencode -t ansiutf8 -s 10 "WIFI:T:WPA2;S:$SSID;H:false;P:$PSK;;"'
(edit: slightly improved)
