forked from alrra/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterminal.sh
executable file
·32 lines (22 loc) · 1012 Bytes
/
terminal.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")" \
&& . "../../utils.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_in_purple "\n Terminal\n\n"
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 ShowLineMarks -int 0" \
"Hide line marks"
execute "defaults write com.apple.terminal StringEncodings -array 4" \
"Only use UTF-8"
execute "./set_terminal_theme.applescript" \
"Set custom terminal theme"
# If there is a Touch Bar, ensure the Touch ID is used when
# `sudo` is required.
if ioreg | grep -q "AppleEmbeddedOSSupportHost" \
&& ! grep -q "pam_tid.so" "/etc/pam.d/sudo"; then
execute "sudo sh -c 'echo \"auth sufficient pam_tid.so\" >> /etc/pam.d/sudo'" \
"Use Touch ID to authenticate sudo"
fi