mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-08-18 04:17:21 +02:00
Compare commits
No commits in common. "f81a0ca22187979a4cd97f032c935ea83a0effea" and "90f6c3ee379f89e88577ebf694d9ab927e87c5ea" have entirely different histories.
f81a0ca221
...
90f6c3ee37
2
bash/.gitignore
vendored
2
bash/.gitignore
vendored
@ -1,4 +1,2 @@
|
|||||||
# wifiqr.bash output
|
# wifiqr.bash output
|
||||||
*.png
|
*.png
|
||||||
*.jpg
|
|
||||||
*.jpeg
|
|
||||||
|
@ -17,22 +17,6 @@ iwctl station $WIFIDEVICE get-networks
|
|||||||
# The manpage says: iwctl --passphrase=PASSPHRASE station DEVICE connect SSID
|
# The manpage says: iwctl --passphrase=PASSPHRASE station DEVICE connect SSID
|
||||||
# but considering it says -P is shorthand for passphrase, I think this should
|
# but considering it says -P is shorthand for passphrase, I think this should
|
||||||
# work too while being more logical in my opinion.
|
# work too while being more logical in my opinion.
|
||||||
echo "To connect:
|
echo "% sudo iwctl station $WIFIDEVICE connect \$SSID -P \$KEY"
|
||||||
% iwctl station $WIFIDEVICE connect \$SSID -P \$KEY
|
|
||||||
"
|
|
||||||
# For permanent connections https://gitea.blesmrt.net/mikaela/shell-things/src/branch/master/var/lib/iwd
|
|
||||||
|
|
||||||
# Device Provisioning Protocol https://iwd.wiki.kernel.org/device_provisioning
|
# For permanent connections https://gitea.blesmrt.net/mikaela/shell-things/src/branch/master/var/lib/iwd
|
||||||
# requires qrencode, so let's check it exists
|
|
||||||
if hash qrencode needrestart 2>/dev/null; then
|
|
||||||
# Remind of command to share
|
|
||||||
echo "To share credentials:
|
|
||||||
% iwctl dpp $WIFIDEVICE start-configurator
|
|
||||||
"
|
|
||||||
# It needs to be stopped too
|
|
||||||
echo "To stop sharing credentials:
|
|
||||||
% iwctl dpp $WIFIDEVICE stop"
|
|
||||||
# Remind me that this part exists if qrencode is not found.
|
|
||||||
else
|
|
||||||
echo "WARNING! qrencode not found."
|
|
||||||
fi
|
|
||||||
|
@ -3,16 +3,14 @@
|
|||||||
# Arguments: Name & content
|
# Arguments: Name & content
|
||||||
|
|
||||||
# -l H uses the highest error correction in case 30 % gets damaged (or artistried upon)
|
# -l H uses the highest error correction in case 30 % gets damaged (or artistried upon)
|
||||||
# -s 6 doubles the dot/pixel size
|
|
||||||
|
|
||||||
# Outputs QR code to terminal
|
# Outputs QR code to terminal
|
||||||
|
|
||||||
# ${@:2} takes all arguments except not the first one
|
# ${@:2} takes all arguments except not the first one
|
||||||
qrencode -l H -t utf8 "${@:2}"
|
qrencode -l H -t utf8 "${@:2}"
|
||||||
# Stores QR code as $1.png (first argument)
|
# Stores QR code as $1.png (first argument)
|
||||||
qrencode -s 6 -l H -o "$1".png "${@:2}"
|
qrencode -l H -o "$1".png "${@:2}"
|
||||||
# My stepfather wants jpg
|
|
||||||
convert "$1".png "$1".jpg
|
|
||||||
# Prints details
|
# Prints details
|
||||||
echo "Name: $1.png"
|
echo "Name: $1.png"
|
||||||
echo "Content: ${@:2}"
|
echo "Content: ${@:2}"
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
qrencode -l H -t utf8 "WIFI:T:WPA;S:$1;P:$2;;"
|
qrencode -l H -t utf8 "WIFI:T:WPA;S:$1;P:$2;;"
|
||||||
# Stores QR code as SSID.png, -s doubles pixel size from default 3
|
# Stores QR code as SSID.png, -s doubles pixel size from default 3
|
||||||
qrencode -l H -s 6 -o $1.png "WIFI:T:WPA;S:$1;P:$2;;"
|
qrencode -l H -s 6 -o $1.png "WIFI:T:WPA;S:$1;P:$2;;"
|
||||||
# Might as well jpg this too
|
|
||||||
convert "$1".png "$1".jpg
|
|
||||||
|
|
||||||
|
|
||||||
# Prints details
|
# Prints details
|
||||||
echo "SSID: $1"
|
echo "SSID: $1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user