Dotfiles/home/scripts/.local/scripts/wifiToggle

15 lines
190 B
Bash
Executable File

#!/bin/dash
path=/tmp/redshift-toggl
file=$(cat $path)
text="off"
if [ "$file" = "$text" ]
then
connmanctl enable wifi
echo "on" > $path
else
connmanctl disable wifi
echo "off" > $path
fi