dotfiles/dot_local/bin/executable_toggle-wifi

8 lines
144 B
Bash

#!/bin/sh
if [ $(connmanctl state | awk '/State/ {print $NF}') == 'online' ]; then
connmanctl disable wifi
else
connmanctl enable wifi
fi