#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")" \
    && . "../../utils.sh"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

print_info " Terminal"

execute "defaults write com.apple.terminal FocusFollowsMouse -string true" \
    "Make the focus automatically follow the mouse"

execute "defaults write com.apple.terminal StringEncodings -array 4" \
    "Only use UTF-8"

execute "./set_terminal_theme.applescript" \
    "Set custom terminal theme"

#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")" \
    && . "../../utils.sh"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

print_info " Terminal"

execute "defaults write com.apple.terminal FocusFollowsMouse -string true" \
    "Make the focus automatically follow the mouse"

execute "defaults write com.apple.terminal SecureKeyboardEntry -bool true" \
    "Enable 'Secure Keyboard Entry'"

execute "defaults write com.apple.terminal StringEncodings -array 4" \
    "Only use UTF-8"

execute "./set_terminal_theme.applescript" \
    "Set custom terminal theme"

Enable `Secure Keyboard Entry` in Terminal
[macos] Enable `Secure Keyboard Entry` in Terminal

From https://help.apple.com/terminal/mac/10.11/index.html?localePath=en.lproj#/trml109:

 " Prevent unwanted detection of keystrokes

   Secure keyboard entry can prevent other apps on your computer or
   the network from detecting and recording what you type in Terminal. "

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

See also: https://security.stackexchange.com/q/47749

Thanks @kdeldycke!
