blob: cd061c762ad9e9de9f9d249ded87adc8257270b0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Airplane Mode. Turning on or off all wifi using rfkill.
notif="$HOME/.config/swaync/images/bell.png"
# Check if any wireless device is blocked
wifi_blocked=$(rfkill list wifi | grep -o "Soft blocked: yes")
if [ -n "$wifi_blocked" ]; then
rfkill unblock wifi
notify-send -u low -i "$notif" "$(printf "\n Airplane mode: OFF")"
else
rfkill block wifi
notify-send -u low -i "$notif" "$(printf "\n Airplane mode: ON")"
fi
|