码迷,mamicode.com
首页 > 系统相关 > 详细

Macbook 设置

时间:2015-09-28 18:56:04      阅读:368      评论:0      收藏:0      [点我收藏+]

标签:

  本文所有命令都需要在终端(应用程序Applications——实用工具Utilities——终端Terminal)中运行,复制代码后敲击回车以运行,每种设置后边都有还原方式,运行方法相同。
  修改设置存在一定风险,请注意备份重要数据。
  关于DOCK
  加亮鼠标悬停的图标,在终端中输入
  
  1. defaults write com.apple.dock mouse-over-hilite-stack -boolean yes;killall Dock
  还原
  
  1. defaults delete com.apple.dock mouse-over-hilite-stack;killall Dock


  将Dock改为2D样式
  
  1. defaults write com.apple.dock no-glass -bool TRUE;killall Dock
  还原
  
  1. defaults delete com.apple.dock no-glass;killall Dock


  让隐藏窗口半透明,在终端中输入
  
  1. defaults write com.apple.Dock showhidden -bool YES;killall Dock
  还原
  
  1. defaults delete com.apple.Dock showhidden;killall Dock


  在左边dock中添加空格,在终端中输入
  
  1. defaults write com.apple.dock persistent-apps -array-add '{tile-data={};tile-type="spacer-tile";}';killall Dock
  在右边dock中添加空格,在终端中输入
  
  1. defaults write com.apple.dock persistent-others -array-add '{tile-data={};tile-type="spacer-tile";}';killall Dock


  在dock上添加一个最近打开程序的目录,在终端中输入
  
  1. defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }';killall Dock


  锁定Dock项目,在终端中输入
  
  1. defaults write com.apple.dock contents-immutable -boolean YES;killall Dock


  在Dock中只显示正在运行的程序,在终端中输入
  
  1. defaults write com.apple.dock static-only -bool TRUE;killall Dock


  在Dock图标上滚动滚轮(触摸板双指向上),显示该程序Expose
  
  1. defaults write com.apple.dock scroll-to-open -bool TRUE;killall Dock
  还原
  
  1. defaults delete com.apple.dock scroll-to-open;killall Dock


  缩小Dock,非常小
  
  1. defaults write com.apple.dock tilesize -int 8;killall Dock
  还原
  
  1. defaults delete com.apple.dock tilesize;killall Dock


  改变List Stack效果
修改前<ignore_js_op>
技术分享
后<ignore_js_op>
技术分享
  
  
  1. defaults write com.apple.dock use-new-list-stack -bool TRUE;killall Dock
  还原
  
  1. defaults delete com.apple.dock use-new-list-stack;killall Dock

  关于Finder
  在Quick Look中添加选取文字的功能
  <ignore_js_op>
技术分享

  
  1. defaults write com.apple.finder QLEnableTextSelection -bool TRUE;killall Finder
  还原
  
  1. defaults delete com.apple.finder QLEnableTextSelection;killall Finder


  在Finder菜单中添加退出选项
  
  1. defaults write com.apple.finder QuitMenuItem -bool TRUE;killall Finder
  还原
  
  1. defaults delete com.apple.finder QuitMenuItem;killall Finder


  显示隐藏文件
  
  1. defaults write com.apple.finder AppleShowAllFiles -bool TRUE;killall Finder
  还原
  
  1. defaults delete com.apple.finder AppleShowAllFiles;killall Finder


  Lion中想要改变窗口大小,可以将鼠标移到窗口的四周,当鼠标变成箭头时候就可以拖拽以改变窗口大小,不过这个窗口边框的范围太小,有的时候鼠标很难准确定位变成箭头,执行以下命令来增加这个范围(需要注销)
  
  1. defaults write -g AppleEdgeResizeExteriorSize 10
  还原
  
  1. defaults delete -g AppleEdgeResizeExteriorSize


  在Finder标题栏显示路径
  
  1. defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE; killall Finder
  还原
  
  1. defaults delete com.apple.finder _FXShowPosixPathInTitle;killall Finder


  在Finder中简短个人文件夹显示路径(需要开启Finder路径栏)
  修改前<ignore_js_op>
技术分享

  修改后<ignore_js_op>
技术分享

  
  1. defaults write com.apple.finder PathBarRootAtHome -bool TRUE;killall Finder
  还原
  
  1. defaults delete com.apple.finder PathBarRootAtHome;killall Finde


  改变Finder主体字体(string后边是字体的名字,)
  
  1. defaults write com.apple.finder NSSystemFont -string AmericanTypewriter;killall Finder
  改变Finder标题字体
  
  1. defaults write com.apple.finder NSTitleBarFont -string ArialBlack;killall Finder
  改变字号
  
  1. defaults write com.apple.finder NSTitleBarFontSize 16;killall Finder
  还原
  
  1. defaults delete com.apple.finder NSSystemFont
  2.   defaults delete com.apple.finder NSTitleBarFont
  3.   defaults delete com.apple.finder NSTitleBarFontSize
  4.   killall Finder

  关于iTunes
  歌曲或者表演者旁边有个箭头,点击就可以在iTunes Store中进行相关搜索,将箭头改为在资料库中显示该歌曲或表演者。在终端中输入
  
  1. defaults write com.apple.iTunes invertStoreLinks -bool YES


  在iTunes上显示音乐信息,在终端中输入
  
  1. defaults write com.apple.dock itunes-notifications -boolean YES;killall Dock
  如果想要在气泡中始终显示iTunes图标,在终端中输入
  
  1. defaults write com.apple.dock notification-always-show-image -bool YES;killall Dock

  关于Dashboard
  可以将dashboard中的widget拖放到桌面上
  
  1. defaults write com.apple.dashboard devmode YES;killall Dock
  还原
  
  1. defaults delete com.apple.dashboard devmode;killall Dock


  禁用Dashboard
  
  1. defaults write com.apple.dashboard mcx-disabled -bool TRUE;killall Dock
  还原
  
  1. defaults delete com.apple.dashboard mcx-disabled;killall Dock

  关于Launchpad
  改变Launchpad背景模糊程度(这个int整形数值可以设置从0-255的整数)
  
  1. defaults write com.apple.dock springboard-blur-radius -int 150;killall Dock
  还原
  
  1. defaults delete com.apple.dock springboard-blur-radius;killall Dock


  重置Launchpad
  
  1. defaults write com.apple.dock ResetLaunchPad -bool TRUE;killall Dock

  Mission Control
  当你使用多个桌面时,可以通过将窗口拖到屏幕两端来改变该窗口所在桌面,有经验的FY肯定知道将窗口拖到两边之后需要停顿1、2秒才能切换桌面,执行以下命令缩短时间
  
  1. defaults write com.apple.dock workspaces-edge-delay -float 0.15;killall Dock
  改成立即切换桌面
  
  1. defaults write com.apple.dock workspaces-edge-delay -float 0;killall Dock
  还原
  
  1. defaults delete com.apple.dock workspaces-edge-delay;killall Dock


  禁用Mission Control
  
  1. defaults write com.apple.dock mcx-expose-disabled -bool TRUE;killall Dock
  还原
  
  1. defaults delete com.apple.dock mcx-expose-disabled;killall Dock

  关于Mail
  在Mail中强制显示无格式邮件
  
  1. defaults write com.apple.mail PreferPlainText -bool YES

  关于Desktop
  临时关闭桌面,隐藏桌面的所有图标,在进行演讲的时候经常会用到
  
  1. defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder
  还原
  
  1. defaults delete com.apple.finder CreateDesktop;killall Finder


  在桌面显示壁纸路径
  
  1. defaults write com.apple.dock desktop-picture-show-debug-text -bool TRUE;killall Dock
  还原
  
  1. defaults delete com.apple.dock desktop-picture-show-debug-text;killall Dock

  系统动画
  改变最小化窗口动画
  
  1. defaults write com.apple.dock mineffect -string suck;killall Dock
  还原
  
  1. defaults delete com.apple.dock mineffect;killall Dock


  改变Dock Stack动画
  
  1. defaults write com.apple.dock use-old-grid-animation -bool TRUE;killall Dock
  还原
  
  1. defaults delete com.apple.dock use-old-grid-animation;killall Dock


  关闭QuickLook动画
  
  1. defaults write com.apple.finder QLPanelAnimationDuration -int 0;killall Finder
  还原
  
  1. defaults delete com.apple.finder QLPanelAnimationDuration;killall Finder


  关闭Mission Control动画
  
  1. defaults write com.apple.dock expose-animation-duration -int 0;killall Dock
  加速Mission Control动画
  
  1. defaults write com.apple.dock expose-animation-duration -float 0.15
  减慢Mission Control动画
  
  1. defaults write com.apple.dock expose-animation-duration -float 1
  还原
  
  1. [code]defaults delete com.apple.dock expose-animation-duration;killall Dock
[/code]


  关闭文件和打印弹窗动画(需要注销系统)
  
  1. defaults write -g NSWindowResizeTime -float 0.01
  还原
  
  1. defaults delete -g NSWindowResizeTime


  取消Launchpad动画
  
  1. defaults write com.apple.dock springboard-show-duration -int 0
  2.   defaults write com.apple.dock springboard-hide-duration -int 0;killall Dock
  还原
  
  1. defaults delete com.apple.dock springboard-show-duration
  2.   defaults delete com.apple.dock springboard-hide-duration;killall Dock


  加速Launchpad翻页速度
  
  1. defaults write com.apple.dock springboard-page-duration -int 0;killall Dock
  还原
  
  1. defaults delete com.apple.dock springboard-page-duration;killall Dock


  关闭窗口和对话框弹出动画(一个从屏幕中间放大的动画)
  
  1. defaults write -g NSAutomaticWindowAnimationsEnabled -bool FALSE
  还原
  
  1. defaults delete -g NSAutomaticWindowAnimationsEnabled


  加快Dock自动隐藏弹出速度
  
  1. defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
  还原
  
  1. defaults delete com.apple.dock autohide-time-modifier;killall Dock

  关于截屏
  改变截屏文件格式(需要注销)
  
  1. defaults write com.apple.screencapture type -string BMP[/code;]
  2.   string后边可以改为BMP GIF JPEG PDF PNG TIFF
  3.   还原
  4.   [code]defaults delete com.apple.screencapture type


  改变截屏文件名(将XXX改为你想要的文件名)
  
  1. defaults write com.apple.screencapture name &quot;XXX&quot;;killall SystemUIServer
  还原
  
  1. defaults write com.apple.screencapture name &quot;Screen Shot&quot;;killall SystemUIServer


  改变截屏保存路径(location后边就是你想要修改的路径,可以用你的用户名替换USERNAME)
  
  1. defaults write com.apple.screencapture location /Users/USERNAME/Documents/
  还原
  
  1. defaults delete com.apple.screencapture location


  取消窗口截屏阴影
  
  1. defaults write com.apple.screencapture disable-shadow -bool TRUE
  还原
  
  1. defaults delete com.apple.screencapture disable-shadow
  其他
  关闭惯性滚轮
  
  1. defaults write -g AppleMomentumScrollSupported -bool FALSE
  还原
  
  1. defaults delete -g AppleMomentumScrollSupported


  修复外接显示器字体问题
  
  1. defaults -currentHost write -g AppleFontSmoothing -int 2
  还原
  
  1. defaults -currentHost delete -g AppleFontSmoothing


  各位有兴趣可以试一下,在MAC apps中比如Mail、Safari、TextEdit,保持按下键盘按键只能输入一个字,而不会重复输入,执行以下命令来实现连续重复输入字母(此项修改需要重启相关软件)
  
  1. defaults write -g ApplePressAndHoldEnabled -bool FALSE
  还原
  
  1. defaults delete -g ApplePressAndHoldEnabled


  在登录页面显示更多信息(需要注销)
  
  1. sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo 1
  还原
  
  1. sudo defaults delete /Library/Preferences/com.apple.loginwindow AdminHostInfo


  关闭文件下载警告。当你第一次打开网上下载的文件时,系统都会弹出一个警告,执行以下命令可以关闭警告。(需要注销)
  
  1. defaults write com.apple.LaunchServices LSQuarantine -bool FALSE
  还原
  
  1. defaults delete com.apple.LaunchServices LSQuarantine


  Debug菜单
  Safari、Disk Utility等都有Debug菜单,里边有不少实用功能

  Safari
  
  1. defaults write com.apple.Safari IncludeInternalDebugMenu -boolean YES
  Disk Utility
  
  1. defaults write com.apple.DiskUtility DUDebugMenuEnabled -boolean YES
  iCal
  
  1. defaults write com.apple.iCal IncludeDebugMenu -boolean YES
  AppStore
  
  1. defaults write com.apple.appstore ShowDebugMenu -boolean YES
  AddressBook
  
  1. defaults write com.apple.AddressBook ABShowDebugMenu -boolean YES


  改变Time Machine备份周期(int后边整形以秒计算。执行此命令需要输入密码,如果没有设置过root密码,在终端中输入passwd root,然后设置密码,输入密码过程中没有任何提示。)
  
  1. sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 7200
  还原
  
  1. sudo defaults delete /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval


  关闭空硬盘Time Machine提醒。如果你没有设置Time Machine,每次你插入空磁盘就会提示你设置Time Machine(需要注销)
  
  1. defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool TRUE
  还原
  
  1. defaults delete com.apple.TimeMachine DoNotOfferNewDisksForBackup


  改变iCal事件默认时间长度(int后边输入整形数字,以分钟计算)
  
  1. defaults write com.apple.iCal &quot;Default duration in minutes for new event&quot; -int 30
  还原
  
  1. defaults delete com.apple.iCal &quot;Default duration in minutes for new event&quot;


  在保存文件对话框中始终使用展开模式。如图
  修改前<ignore_js_op>
技术分享

  修改后<ignore_js_op>
技术分享

  
  1. defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE
  还原
  
  1. defaults delete -g NSNavPanelExpandedStateForSaveMode


  禁止在网络共享时添加.DS_store文件。当你远程访问某个pc之后,就会在这台pc上看到很多.DS_store文件,这个在winodws中是完全没用而且不会隐藏的。
  
  1. defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
  还原
  
  1. defaults delete com.apple.desktopservices DSDontWriteNetworkStores


  只在桌面显示一个正在运行的窗口,将其他程序窗口隐藏
  
  1. defaults write com.apple.dock single-app -bool TRUE;killall Dock
  还原
  
  1. defaults delete com.apple.dock single-app;killall Dock
 
 

Macbook 设置

标签:

原文地址:http://www.cnblogs.com/pgboy/p/4844680.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!