mirror of
https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git
synced 2025-09-15 09:45:58 +03:00
airplane-mode bugfix
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
function bluetooth_toggle
|
function bluetooth_toggle
|
||||||
set bluetooth_status (rfkill list bluetooth | grep -i -o "Soft blocked: yes")
|
set bluetooth_status (rfkill list bluetooth | grep -i -o "Soft blocked: yes")
|
||||||
|
set backup_file ~/.cache/airplane_backup
|
||||||
|
|
||||||
if [ -z "$bluetooth_status" ]
|
if [ -z "$bluetooth_status" ]
|
||||||
rfkill block bluetooth
|
rfkill block bluetooth
|
||||||
else
|
else
|
||||||
rfkill unblock bluetooth
|
rfkill unblock bluetooth
|
||||||
|
if test -e $backup_file
|
||||||
|
rm $backup_file
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,9 +1,13 @@
|
|||||||
function wifi_toggle
|
function wifi_toggle
|
||||||
set wifi_status (nmcli radio wifi)
|
set wifi_status (nmcli radio wifi)
|
||||||
|
set backup_file ~/.cache/airplane_backup
|
||||||
|
|
||||||
if [ "$wifi_status" = "enabled" ]
|
if [ "$wifi_status" = enabled ]
|
||||||
nmcli radio wifi off
|
nmcli radio wifi off
|
||||||
else
|
else
|
||||||
nmcli radio wifi on
|
nmcli radio wifi on
|
||||||
|
if test -e $backup_file
|
||||||
|
rm $backup_file
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user