feat: add iwd notifier (#2871)
Co-authored-by: renner <renner0@posteo.de>
This commit is contained in:
parent
6f5aa60aa5
commit
ff51441ef9
4 changed files with 55 additions and 0 deletions
30
system_files/shared/usr/bin/aurora-iwd-deprecation-notifier
Executable file
30
system_files/shared/usr/bin/aurora-iwd-deprecation-notifier
Executable file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Reference in a new issue