Skip to content

Instantly share code, notes, and snippets.

@emir
Created August 26, 2017 10:20
Show Gist options
  • Select an option

  • Save emir/2f55457557b226db8e849269de619adc to your computer and use it in GitHub Desktop.

Select an option

Save emir/2f55457557b226db8e849269de619adc to your computer and use it in GitHub Desktop.
adding active language to right side of zsh prompt
function active_lang {
osascript -e 'tell application "System Events" to tell process "SystemUIServer" to get the value of the first menu bar item of menu bar 1 whose description is "text input"'
}
RPROMPT='$(active_lang)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment