generated from andy/linux-nixos-hyprland-config-dotfiles
Initial commit
This commit is contained in:
13
home/.config/fish/functions/bluetooth_toggle.fish
Normal file
13
home/.config/fish/functions/bluetooth_toggle.fish
Normal file
@@ -0,0 +1,13 @@
|
||||
function bluetooth_toggle
|
||||
set bluetooth_status (rfkill list bluetooth | grep -i -o "Soft blocked: yes")
|
||||
set backup_file ~/.cache/airplane_backup
|
||||
|
||||
if [ -z "$bluetooth_status" ]
|
||||
rfkill block bluetooth
|
||||
else
|
||||
rfkill unblock bluetooth
|
||||
if test -e $backup_file
|
||||
rm $backup_file
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user