forked from alrra/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui_and_ux.sh
executable file
·102 lines (73 loc) · 4.39 KB
/
ui_and_ux.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")" \
&& . "../../utils.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_in_purple "\n UI & UX\n\n"
execute "defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true && \
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true" \
"Avoid creating '.DS_Store' files on network or USB volumes"
execute "defaults write com.apple.menuextra.battery ShowPercent -string 'NO'" \
"Hide battery percentage from the menu bar"
execute "sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true" \
"Show language menu in the top right corner of the boot screen"
execute "defaults write com.apple.CrashReporter UseUNC 1" \
"Make crash reports appear as notifications"
execute "defaults write com.apple.LaunchServices LSQuarantine -bool false" \
"Disable 'Are you sure you want to open this application?' dialog"
execute "defaults write com.apple.print.PrintingPrefs 'Quit When Finished' -bool true" \
"Automatically quit the printer app once the print jobs are completed"
execute "defaults write com.apple.screencapture disable-shadow -bool true" \
"Disable shadow in screenshots"
execute "defaults write com.apple.screencapture location -string '$HOME/Desktop'" \
"Save screenshots to the Desktop"
execute "defaults write com.apple.screencapture type -string 'png'" \
"Save screenshots as PNGs"
execute "defaults write com.apple.screensaver askForPassword -int 1 && \
defaults write com.apple.screensaver askForPasswordDelay -int 0"\
"Require password immediately after into sleep or screen saver mode"
execute "defaults write -g AppleFontSmoothing -int 2" \
"Enable subpixel font rendering on non-Apple LCDs"
execute "defaults write -g AppleShowScrollBars -string 'Always'" \
"Always show scrollbars"
execute "defaults write -g NSAutomaticWindowAnimationsEnabled -bool false" \
"Disable window opening and closing animations."
execute "defaults write -g NSDisableAutomaticTermination -bool true" \
"Disable automatic termination of inactive apps"
execute "defaults write -g NSNavPanelExpandedStateForSaveMode -bool true" \
"Expand save panel by default"
execute "defaults write -g NSTableViewDefaultSizeMode -int 2" \
"Set sidebar icon size to medium"
execute "defaults write -g NSUseAnimatedFocusRing -bool false" \
"Disable the over-the-top focus ring animation"
execute "defaults write -g NSWindowResizeTime -float 0.001" \
"Accelerated playback when adjusting the window size."
execute "defaults write -g PMPrintingExpandedStateForPrint -bool true" \
"Expand print panel by default"
execute "defaults write -g QLPanelAnimationDuration -float 0" \
"Disable opening a Quick Look window animations."
execute "defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false" \
"Disable resume system-wide"
execute "sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string 'Laptop' && \
sudo scutil --set ComputerName 'laptop' && \
sudo scutil --set HostName 'laptop' && \
sudo scutil --set LocalHostName 'laptop'" \
"Set computer name"
execute "sudo systemsetup -setrestartfreeze on" \
"Restart automatically if the computer freezes"
execute "sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0 && \
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist && \
sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist" \
"Turn Bluetooth off"
execute "for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do
sudo defaults write \"\${domain}\" dontAutoLoad -array \
'/System/Library/CoreServices/Menu Extras/TimeMachine.menu' \
'/System/Library/CoreServices/Menu Extras/Volume.menu'
done \
&& sudo defaults write com.apple.systemuiserver menuExtras -array \
'/System/Library/CoreServices/Menu Extras/Bluetooth.menu' \
'/System/Library/CoreServices/Menu Extras/AirPort.menu' \
'/System/Library/CoreServices/Menu Extras/Battery.menu' \
'/System/Library/CoreServices/Menu Extras/Clock.menu'
" \
"Hide Time Machine and Volume icons from the menu bar"
killall "SystemUIServer" &> /dev/null