Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. input_name=$(defaults read ~/Library/Preferences/com.apple.HIToolbox.plist AppleSelectedInputSources | egrep -w 'KeyboardLayout Name' | sed -E 's/^.+ = \"?([^\"]+)\"?;$/\1/')
  4. if [[ -z "$input_name" ]]; then
  5. echo "V.N"
  6. elif [[ -n "$input_name" ]]; then
  7. echo "U.S"
  8. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement