Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- input_name=$(defaults read ~/Library/Preferences/com.apple.HIToolbox.plist AppleSelectedInputSources | egrep -w 'KeyboardLayout Name' | sed -E 's/^.+ = \"?([^\"]+)\"?;$/\1/')
- if [[ -z "$input_name" ]]; then
- echo "V.N"
- elif [[ -n "$input_name" ]]; then
- echo "U.S"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement