forked from Shinonome/dots-hyprland
network: implement toggling in service
This commit is contained in:
@@ -26,6 +26,17 @@ Singleton {
|
||||
"signal_wifi_0_bar"
|
||||
) : "signal_wifi_off"
|
||||
|
||||
// Control
|
||||
function toggleWifi(): void {
|
||||
const cmd = wifiEnabled ? "off" : "on";
|
||||
enableWifiProc.exec(["nmcli", "radio", "wifi", cmd]);
|
||||
}
|
||||
|
||||
Process {
|
||||
id: enableWifiProc
|
||||
}
|
||||
|
||||
// Status update
|
||||
function update() {
|
||||
updateConnectionType.startCheck();
|
||||
wifiStatusProcess.running = true
|
||||
|
||||
Reference in New Issue
Block a user