Hi, I have hopefully a quick question. I have written a small BTT script to change my network location from 'Home' to 'Automatic' and vice versa with a key combo. I'd like the new location to be displayed on the screen. Is that possible?
This is the shell script:
if scselect 2>&1 | grep '*.*Automatic' >/dev/null 2>&1; then
scselect Home
else
scselect Automatic
fi
TIA!
The easiest is probably to use a macOS notification like this:
if scselect 2>&1 | grep '*.*Automatic' >/dev/null 2>&1; then
scselect Home
osascript -e 'display notification "Home" with title "New Location"'
else
scselect Automatic
osascript -e 'display notification "Automatic" with title "New Location"'
fi
It can also be done with BTT and variables, but you might not need that.
Brilliant, thanks - this worked perfectly.