Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions just/aurora-system.just
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,54 @@ configure-boot-to-windows:
mkdir -p $HOME/.local/share/applications
cp -r /usr/share/applications/boot-to-windows.desktop $HOME/.local/share/applications
sed -i 's/Hidden=true/Hidden=false/' $HOME/.local/share/applications/boot-to-windows.desktop

# Toggle IWD
[group('System')]
toggle-iwd:
#!/usr/bin/bash
echo -e "This script manages enabling or disabling iwd as a replacement for wpa_supplicant for Wi-Fi networking."
echo -e "Enabling this can improve throughput, mesh networking, and reduce latency increases when scanning for networks"
echo -e "Disabling this can improve corporate or eduroam network compatibility"
echo -e ""
echo -e "WARNING: Changing this will remove all saved wifi networks"
get_current_status() {
if [[ -f "/etc/NetworkManager/conf.d/iwd.conf" ]]; then
echo "Enabled"
else
echo "Disabled"
fi
}
remove_saved_networks() {
nmcli -t -f NAME connection show | while read -r line; do sudo nmcli connection delete "$line"; done
}
enable_iwd() {
sudo mkdir -p "/etc/NetworkManager/conf.d/"
sudo rm -f "/etc/NetworkManager/conf.d/iwd.conf"
printf "[device]\nwifi.backend=iwd" | sudo tee /etc/NetworkManager/conf.d/iwd.conf > /dev/null
remove_saved_networks
echo -e "iwd enabled. Reboot required to apply changes."
}
disable_iwd() {
sudo rm -f "/etc/NetworkManager/conf.d/iwd.conf"
remove_saved_networks
echo -e "iwd disabled. Reboot required to apply changes."
}
# Display current status
current_status=$(get_current_status)
echo -e "\nCurrent iwd status: $current_status\n"
# Prompt user for action
CHOICE=$(ugum choose "Enable iwd" "Disable iwd" "Exit without changes")
case "$CHOICE" in
"Enable iwd")
enable_iwd
;;
"Disable iwd")
disable_iwd
;;
"Exit without changes")
echo "No changes made."
;;
*)
echo "Invalid choice. Exiting without changes."
;;
esac