Fix customize_user_settings.
This commit is contained in:
parent
fbce9d7949
commit
b5cae4497b
@ -4,26 +4,21 @@ sudo -v
|
|||||||
|
|
||||||
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
|
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
|
||||||
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
||||||
|
echo "Configuring osx."
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# General UI/UX #
|
# General UI/UX #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# Menu bar: disable transparency
|
# Menu bar: hide the Time Machine, Volume, User, and Bluetooth icons
|
||||||
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
|
for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do
|
||||||
|
defaults write "${domain}" dontAutoLoad -array \
|
||||||
|
"/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \
|
||||||
|
"/System/Library/CoreServices/Menu Extras/Volume.menu" \
|
||||||
|
"/System/Library/CoreServices/Menu Extras/User.menu"
|
||||||
|
|
||||||
# Menu bar: show remaining battery time (on pre-10.8); hide percentage
|
# Remove duplicates in the “Open With” menu (also see `lscleanup` alias)
|
||||||
defaults write com.apple.menuextra.battery ShowPercent -string "YES"
|
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
|
||||||
defaults write com.apple.menuextra.battery ShowTime -string "YES"
|
|
||||||
|
|
||||||
# Menu bar: hide the useless Time Machine and Volume icons
|
|
||||||
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"
|
|
||||||
|
|
||||||
# Always show scrollbars
|
|
||||||
defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic"
|
|
||||||
|
|
||||||
# Disable opening and closing window animations
|
|
||||||
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
|
|
||||||
|
|
||||||
# Increase window resize speed for Cocoa applications
|
# Increase window resize speed for Cocoa applications
|
||||||
defaults write NSGlobalDomain NSWindowResizeTime -float 0.08
|
defaults write NSGlobalDomain NSWindowResizeTime -float 0.08
|
||||||
@ -324,3 +319,4 @@ defaults write org.m0k.transmission DeleteOriginalTorrent -bool true
|
|||||||
defaults write org.m0k.transmission WarningDonate -bool false
|
defaults write org.m0k.transmission WarningDonate -bool false
|
||||||
# Hide the legal disclaimer
|
# Hide the legal disclaimer
|
||||||
defaults write org.m0k.transmission WarningLegal -bool false
|
defaults write org.m0k.transmission WarningLegal -bool false
|
||||||
|
echo "Finished successfully."
|
||||||
|
@ -37,11 +37,12 @@ def dotfiles(ctx, flags=''):
|
|||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
def powerline(ctx):
|
def powerline(ctx):
|
||||||
ctx.run('pip install --user git+git://github.com/Lokaltog/powerline')
|
ctx.run('sudo pip install git+git://github.com/Lokaltog/powerline')
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
def install_python_libraries(ctx):
|
def install_python_libraries(ctx):
|
||||||
|
ctx.run('sudo pip install setuptools --upgrade')
|
||||||
ctx.run('sudo pip install -r {0}'.format(
|
ctx.run('sudo pip install -r {0}'.format(
|
||||||
os.path.join(RESOURCES_DIRECTORY, 'requirements.txt')
|
os.path.join(RESOURCES_DIRECTORY, 'requirements.txt')
|
||||||
))
|
))
|
||||||
@ -67,9 +68,9 @@ def change_shell(ctx):
|
|||||||
@ctask
|
@ctask
|
||||||
def customize_user_settings(ctx):
|
def customize_user_settings(ctx):
|
||||||
input_function = input if sys.version_info.major == 3 else raw_input
|
input_function = input if sys.version_info.major == 3 else raw_input
|
||||||
username = input_function("Enter the user's full name")
|
username = input_function("Enter the user's full name: ")
|
||||||
email = input_function("Enter the user's Email.")
|
email = input_function("Enter the user's email address: ")
|
||||||
with os.path.expanduser('~/.gitconfig.custom', 'w') as custom_file:
|
with open(os.path.expanduser('~/.gitconfig.custom'), 'w') as custom_file:
|
||||||
custom_file.write("""[user]
|
custom_file.write("""[user]
|
||||||
name = {0}
|
name = {0}
|
||||||
email = {1}""".format(username, email))
|
email = {1}""".format(username, email))
|
||||||
|
Loading…
Reference in New Issue
Block a user