sxmo-utils/scripts/core/sxmo_hotspot.sh
Stacy Harper 8a27933c47 SWMO - SXMO over Wayland
This is a huge patch for Swmo, Sxmo over Sway.

It is Dwm backward compatible so dwm users should not expect regressions.

If you install all dependencies, you then can toggle between Sway and Dwm using a new config entry. It will reboot the phone.

This commit also contains:
    * Make the modemmonitor bullet proof
    * various other smaller fixes

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-08-22 13:23:22 +02:00

37 lines
722 B
Bash

#!/usr/bin/env sh
while [ -z "$SSID" ]; do
SSID="$(
echo "$ENTRIES" | sxmo_dmenu_with_kb.sh -p "SSID"
)"
done
while [ -z "$key" ]; do
key="$(
echo "$ENTRIES" | sxmo_dmenu_with_kb.sh -p "pass"
)"
done
while [ -z "$key1" ]; do
key1="$(
echo "$ENTRIES" | sxmo_dmenu_with_kb.sh -p "confirm"
)"
done
if [ "$key" != "$key1" ]; then
notify-send key mismatch
exit 2
fi
while [ -z "$channel" ]; do
channel="$(
echo "11" | sxmo_dmenu_with_kb.sh -p "channels"
)"
done
if [ -z "$SSID" ] || [ -z "$key" ]; then
notify-send either SSID: "$SSID" or key are empty
exit 3
fi
notify-send "$(nmcli device wifi hotspot ifname wlan0 con-name "Hotspot $SSID" ssid "$SSID" channel "$channel" band bg password "$key")"