Add comprehensive documentation for Lenovo ThinkPad Gentoo Linux setup including: - Complete system configuration guides (power, Bluetooth, WiFi, audio) - Hardware setup documentation (touchpad, touchscreen, DisplayLink) - Management scripts with ZSH completions - Kernel configuration (6.12.41-gentoo-x86_64) - Lid automation and monitor management - Battery conservation system - User guides and troubleshooting Repository includes .gitignore to exclude logs, temporary files, and secrets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
#compdef wifi-setup
|
|
|
|
# ZSH completion for wifi-setup
|
|
# Place this file in /usr/local/share/zsh/site-functions/_wifi-setup
|
|
|
|
_wifi-setup() {
|
|
local curcontext="$curcontext" state line
|
|
typeset -A opt_args
|
|
|
|
_arguments -C \
|
|
'1: :->command' \
|
|
'2: :->arg' \
|
|
&& return 0
|
|
|
|
case $state in
|
|
command)
|
|
local -a commands
|
|
commands=(
|
|
'connect:Connect to a WiFi network'
|
|
'disconnect:Disconnect from WiFi'
|
|
'status:Show current connection status'
|
|
'scan:Rescan for available networks'
|
|
'list:List available networks'
|
|
'list-saved:List saved connections'
|
|
'forget:Forget a saved network'
|
|
'help:Show help information'
|
|
)
|
|
_describe -t commands 'wifi-setup command' commands
|
|
;;
|
|
arg)
|
|
case $line[1] in
|
|
connect)
|
|
# Complete with available SSIDs
|
|
local -a ssids
|
|
ssids=(${(f)"$(nmcli -t -f SSID device wifi list 2>/dev/null | grep -v '^$' | sort -u)"})
|
|
_describe -t ssids 'available networks' ssids
|
|
;;
|
|
forget)
|
|
# Complete with saved connections
|
|
local -a saved
|
|
saved=(${(f)"$(nmcli -t -f NAME connection show 2>/dev/null | grep -v '^lo$')"})
|
|
_describe -t saved 'saved connections' saved
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
|
|
return 0
|
|
}
|
|
|
|
_wifi-setup "$@"
|