aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/AirplaneMode.sh
blob: 428a09bdbab1ea556acaf4c3e52289f8066f20c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

dunst_notif="$HOME/.config/dunst/images/bell.png"

wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')"
if [ "$wifi" == "enabled" ]; then
    rfkill block all &
    dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: active'
else
    rfkill unblock all &
    dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: inactive'
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage