diff --git a/PluginDirectories/1/wireless-toggles.bundle/plugin.py b/PluginDirectories/1/wireless-toggles.bundle/plugin.py index a4c2acf1..76b8cdfd 100644 --- a/PluginDirectories/1/wireless-toggles.bundle/plugin.py +++ b/PluginDirectories/1/wireless-toggles.bundle/plugin.py @@ -2,31 +2,32 @@ import i18n def run(cmd): - os.system(cmd) + os.system(cmd) def results(parsed, original_query): - #Wi-Fi - if ("wifi_on" in parsed): - return { - "title": i18n.localstr('Turn Wi-Fi On'), - "run_args": ["networksetup -setairportpower en0 on"] - } + #Wi-Fi + if ("wifi_on" in parsed): + return { + "title": i18n.localstr('Turn Wi-Fi On'), + "run_args": ["networksetup -setairportpower en0 on"] + } - if ("wifi_off" in parsed): - return { - "title": i18n.localstr('Turn Wi-Fi Off'), - "run_args": ["networksetup -setairportpower en0 off"] - } + if ("wifi_off" in parsed): + return { + "title": i18n.localstr('Turn Wi-Fi Off'), + "run_args": ["networksetup -setairportpower en0 off"] + } - #Bluetooth - if ("bluetooth_on" in parsed): - return { - "title": i18n.localstr('Turn Bluetooth On'), - "run_args": ["./blueutil on"] - } + #Bluetooth + if ("bluetooth_on" in parsed): + os.system("chmod +x blueutil") # it'll be un-executable after unzipping + return { + "title": i18n.localstr('Turn Bluetooth On'), + "run_args": ["./blueutil on"] + } - if ("bluetooth_off" in parsed): - return { - "title": i18n.localstr('Turn Bluetooth Off'), - "run_args": ["./blueutil off"] - } + if ("bluetooth_off" in parsed): + return { + "title": i18n.localstr('Turn Bluetooth Off'), + "run_args": ["./blueutil off"] + }