more and fixes
This commit is contained in:
19
modules/home/wayland/apps/eww/bar/scripts/airplane-mode
Normal file
19
modules/home/wayland/apps/eww/bar/scripts/airplane-mode
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
is_active() {
|
||||
rfkill list wifi 2>/dev/null | grep -q "Soft blocked: yes"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
status)
|
||||
is_active && echo true || echo false
|
||||
;;
|
||||
*)
|
||||
if is_active; then
|
||||
rfkill unblock all
|
||||
echo false
|
||||
else
|
||||
rfkill block all
|
||||
echo true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user