Files
dotfiles/.functions/qr-wifi.sh
2025-08-03 13:13:02 +02:00

16 lines
301 B
Bash

#!/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};;"
}