agsdotfilesdotshyprlandhyprland-configricerofirofi-configshell-scriptsswwwwallustwaybarwaybar-modulewaybar-themes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
481 B
16 lines
481 B
#!/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" 'Airplane mode: OFF' |
|
else |
|
rfkill block wifi |
|
notify-send -u low -i "$notif" 'Airplane mode: ON' |
|
fi
|
|
|