blob: 9f09c0510491174c1a7a4e56ff8fb7217eea6cb2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
''
set -euo pipefail
rfkill_soft=$(rfkill -ro soft | tail -n +2 | sort -u)
rfkill toggle all
if [[ $rfkill_soft == "unblocked" ]]; then
notify-send --urgency=critical "Aeroplane mode ACTIVATED"
elif [[ $rfkill_soft == "blocked" ]]; then
notify-send --urgency=critical "Aeroplane mode DEACTIVATED"
else
notify-send --urgency=critical "WARN: RFKill was in inconsistent state. Aeroplane mode ACTIVATED"
fi
''
|