#! /bin/bash . /usr/lib/netctl/globals . "$SUBR_DIR/interface" . "$SUBR_DIR/rfkill" . "$SUBR_DIR/wpa" usage() { cat << END Usage: wifi-menu [-h | --help] [-o | --obscure] [INTERFACE] Interactively connect to a wireless network on INTERFACE using netctl. If only one wireless interface is available, INTERFACE can be omitted. Arguments: -h, --help Show this help -o, --obscure Show asterisks for the characters of the password and store the password as a hexadecimal string END } # Undo printf escaping in $1 printf_decode() { printf -- "${1//%/%%}" } # Prepare $1 for use in a special quoting context quote_safe() { if [[ "$1" = \"* ]]; then printf '""%s"' "$1" else printf "%s" "$1" fi } # Fill PROFILES and ESSIDS with the profile names and essids and fill GENERATED # with the names of automatically generated profiles f
blog about linux tricks