aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/AirplaneMode.sh
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2023-10-22 15:55:57 +0900
committerJaKooLit <jimmielovejay@gmail.com>2023-10-22 15:55:57 +0900
commitc222e1bad2ba5e779c3af5b956906c82ead43271 (patch)
treea5253e0861c200ff90354169e1f67ef42ebf0ef9 /config/hypr/scripts/AirplaneMode.sh
parentbb0be21dba7980fc1c047eaba24eda1712bd7f31 (diff)
Initial upload
Diffstat (limited to 'config/hypr/scripts/AirplaneMode.sh')
-rwxr-xr-xconfig/hypr/scripts/AirplaneMode.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh
new file mode 100755
index 00000000..823dce72
--- /dev/null
+++ b/config/hypr/scripts/AirplaneMode.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')"
+if [ "$wifi" == "enabled" ]; then
+ rfkill block all &
+ notify-send -t 1000 'airplane mode: active'
+else
+ rfkill unblock all &
+ notify-send -t 1000 'airplane mode: inactive'
+fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage