Update and rename wifi.sh to wifi-bt.sh

This commit is contained in:
FURK4NGG
2026-01-06 23:36:33 +03:00
committed by GitHub
parent f4f065f5e4
commit 4050659f10
2 changed files with 32 additions and 13 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
case "$1" in
wifi)
WIFI_STATUS=$(nmcli radio wifi)
if [ "$WIFI_STATUS" = "enabled" ]; then
# Wi-Fi KAPAT
nmcli radio wifi off
pkill nm-applet
else
# Wi-Fi AÇ
nmcli radio wifi on
sleep 0.3
nm-applet &
fi
;;
bluetooth|bt)
BT_STATUS=$(bluetoothctl show | grep "Powered:" | awk '{pr>
if [ "$BT_STATUS" = "yes" ]; then
# Bluetooth KAPAT
bluetoothctl power off
pkill blueman-applet
else
# Bluetooth AÇ
bluetoothctl power on
blueman-manager &
fi
;;
esac
-13
View File
@@ -1,13 +0,0 @@
#!/bin/bash
STATUS=$(nmcli radio wifi)
if [ "$STATUS" = "enabled" ]; then
# Wi-Fi KAPAT
nmcli radio wifi off
pkill nm-applet
else
# Wi-Fi AÇ
nmcli radio wifi on
nm-applet &
fi