From ff51441ef9171cbf8645951c9cb3fda0d6f49fdf Mon Sep 17 00:00:00 2001 From: inffy <10782843+inffy@users.noreply.github.com> Date: Mon, 28 Sep 2026 11:57:14 +0300 Subject: [PATCH] feat: add iwd notifier (#2871) Co-authored-by: renner --- .../usr/bin/aurora-iwd-deprecation-notifier | 30 +++++++++++++++++++ .../systemd/system-preset/89-aurora.preset | 1 + .../aurora-iwd-deprecation-notifier.service | 12 ++++++++ .../aurora-iwd-deprecation-notifier.timer | 12 ++++++++ 4 files changed, 55 insertions(+) create mode 100755 system_files/shared/usr/bin/aurora-iwd-deprecation-notifier create mode 100644 system_files/shared/usr/lib/systemd/system/aurora-iwd-deprecation-notifier.service create mode 100644 system_files/shared/usr/lib/systemd/system/aurora-iwd-deprecation-notifier.timer diff --git a/system_files/shared/usr/bin/aurora-iwd-deprecation-notifier b/system_files/shared/usr/bin/aurora-iwd-deprecation-notifier new file mode 100755 index 00000000..3e847acf --- /dev/null +++ b/system_files/shared/usr/bin/aurora-iwd-deprecation-notifier @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -euo pipefail + +TITLE="IWD Wi-Fi backend is deprecated" +MESSAGE="Intel has discontinued IWD development. Please move back to wpa_supplicant. + +Note: Reverting will require reconnecting to your Wi-Fi networks (saved passwords must be re-entered). + +To switch now, run: 'ujust toggle-iwd'" + +URL="https://docs.getaurora.dev/blog/deprecating-iwd" + +USERS="$(loginctl list-users --no-legend | awk '$1 != 0 {print $2}')" + +for username in ${USERS}; do + machinectl shell "${username}@.host" /usr/bin/bash -c ' + ACTION=$(notify-send \ + --app-name=Aurora \ + --icon=network-wireless \ + --urgency=critical \ + "$1" \ + "$2" \ + --action="open=More Info") + + if [ "$ACTION" = "open" ]; then + systemd-run --user /usr/bin/xdg-open "$3" + fi + ' _ "$TITLE" "$MESSAGE" "$URL" +done diff --git a/system_files/shared/usr/lib/systemd/system-preset/89-aurora.preset b/system_files/shared/usr/lib/systemd/system-preset/89-aurora.preset index e84b6fb1..330fc962 100644 --- a/system_files/shared/usr/lib/systemd/system-preset/89-aurora.preset +++ b/system_files/shared/usr/lib/systemd/system-preset/89-aurora.preset @@ -3,6 +3,7 @@ enable brew-setup.service enable dconf-update.service enable flatpak-preinstall.service enable input-remapper.service +enable aurora-iwd-deprecation-notifier.timer # DO NOT REMOVE THIS # see /usr/bin/rechunker-group-fix enable rechunker-group-fix.service diff --git a/system_files/shared/usr/lib/systemd/system/aurora-iwd-deprecation-notifier.service b/system_files/shared/usr/lib/systemd/system/aurora-iwd-deprecation-notifier.service new file mode 100644 index 00000000..6824db80 --- /dev/null +++ b/system_files/shared/usr/lib/systemd/system/aurora-iwd-deprecation-notifier.service @@ -0,0 +1,12 @@ +[Unit] +Description=Aurora IWD Deprecation Notifier +Documentation=https://docs.getaurora.dev/blog/deprecating-iwd +After=network.target + +[Service] +Type=oneshot +ExecCondition=/usr/bin/bash -c "/usr/bin/NetworkManager --print-config | /usr/bin/grep -q '^wifi.backend=iwd'" +ExecStart=/usr/bin/aurora-iwd-deprecation-notifier + +[Install] +WantedBy=graphical.target diff --git a/system_files/shared/usr/lib/systemd/system/aurora-iwd-deprecation-notifier.timer b/system_files/shared/usr/lib/systemd/system/aurora-iwd-deprecation-notifier.timer new file mode 100644 index 00000000..77012215 --- /dev/null +++ b/system_files/shared/usr/lib/systemd/system/aurora-iwd-deprecation-notifier.timer @@ -0,0 +1,12 @@ +[Unit] +Description=Run aurora-iwd-deprecation-notifier 20 mins after boot +Documentation=https://docs.getaurora.dev/blog/deprecating-iwd + +[Timer] +OnBootSec=20min +Unit=aurora-iwd-deprecation-notifier.service +OnUnitActiveSec=1w +Persistent=true + +[Install] +WantedBy=timers.target