#!/bin/bash

qr-wifi(){
    #create a qr-code for wifi access
    # $1 SSID
    # $2 Preshared key
    # #3 (optional) png output file, default wifi.png

    local outputfile="${3:-wifi.png}"
    local ssid="$1"
    local pass="$2"

    qrencode -o "$outputfile" "WIFI:T:WPA;S:${ssid};P:${pass};;"

}
