Move all scripts to 'src' directory

This commit is contained in:
2024-12-21 00:52:15 +00:00
parent b32ca11042
commit 1dc275d8a8
26 changed files with 0 additions and 0 deletions

8
src/wifi_dmenu.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
# Script to connect to an available WiFi network with a dmenu prompt.
script_name="$(basename "$0")"
notify-send "$script_name" "Scanning for available networks..."
# cutting the first 9 characters of the nmcli output as it will contain empty fields which will mess up awk parsing
notify-send "$script_name" "$( nmcli connection up $( nmcli device wifi list | cut --characters=9- | awk -F ' ' '(NR > 1){ print $2}' | sort | uniq | dmenu -i -p "Connect to network: ") 2>&1 )"