fix freeze eww
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Connect or disconnect the bluetooth device with MAC $1.
|
||||
mac=$1
|
||||
[[ -n $mac ]] || exit 64
|
||||
detach_self "$@"
|
||||
if bluetoothctl info "$mac" 2>/dev/null | grep -q "Connected: yes"; then
|
||||
bluetoothctl disconnect "$mac"
|
||||
else
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Needs the polkit rule from modules/nixos/system/network/wireguard.
|
||||
name=$1
|
||||
[[ -n $name ]] || exit 64
|
||||
detach_self "$@"
|
||||
if [[ -d /sys/class/net/$name ]]; then
|
||||
systemctl stop "wireguard-$name.service"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user