本文全部命令都須要在終端(應用程序Applications——實用工具Utilities——終端Terminal)中運行,複製代碼後敲擊回車以運行,每種設置後邊都有還原方式,運行方法相同。 修改設置存在必定風險,請注意備份重要數據。
關於DOCK
加亮鼠標懸停的圖標,在終端中輸入
- defaults write com.apple.dock mouse-over-hilite-stack -boolean yes;killall Dock
還原
- defaults delete com.apple.dock mouse-over-hilite-stack;killall Dock
將Dock改成2D樣式
- defaults write com.apple.dock no-glass -bool TRUE;killall Dock
還原
- defaults delete com.apple.dock no-glass;killall Dock
讓隱藏窗口半透明,在終端中輸入
- defaults write com.apple.Dock showhidden -bool YES;killall Dock
還原
- defaults delete com.apple.Dock showhidden;killall Dock
在左邊dock中添加空格,在終端中輸入
- defaults write com.apple.dock persistent-apps -array-add '{tile-data={};tile-type="spacer-tile";}';killall Dock
在右邊dock中添加空格,在終端中輸入
- defaults write com.apple.dock persistent-others -array-add '{tile-data={};tile-type="spacer-tile";}';killall Dock
在dock上添加一個最近打開程序的目錄,在終端中輸入
- defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }';killall Dock
鎖定Dock項目,在終端中輸入
- defaults write com.apple.dock contents-immutable -boolean YES;killall Dock
在Dock中只顯示正在運行的程序,在終端中輸入
- defaults write com.apple.dock static-only -bool TRUE;killall Dock
在Dock圖標上滾動滾輪(觸摸板雙指向上),顯示該程序Expose
- defaults write com.apple.dock scroll-to-open -bool TRUE;killall Dock
還原
- defaults delete com.apple.dock scroll-to-open;killall Dock
縮小Dock,很是小
- defaults write com.apple.dock tilesize -int 8;killall Dock
還原
- defaults delete com.apple.dock tilesize;killall Dock
改變List Stack效果
修改前<ignore_js_op>
後<ignore_js_op>
- defaults write com.apple.dock use-new-list-stack -bool TRUE;killall Dock
還原
- defaults delete com.apple.dock use-new-list-stack;killall Dock
關於Finder
在Quick Look中添加選取文字的功能
<ignore_js_op>
- defaults write com.apple.finder QLEnableTextSelection -bool TRUE;killall Finder
還原
- defaults delete com.apple.finder QLEnableTextSelection;killall Finder
在Finder菜單中添加退出選項
- defaults write com.apple.finder QuitMenuItem -bool TRUE;killall Finder
還原
- defaults delete com.apple.finder QuitMenuItem;killall Finder
顯示隱藏文件
- defaults write com.apple.finder AppleShowAllFiles -bool TRUE;killall Finder
還原
- defaults delete com.apple.finder AppleShowAllFiles;killall Finder
Lion中想要改變窗口大小,能夠將鼠標移到窗口的四周,當鼠標變成箭頭時候就能夠拖拽以改變窗口大小,不過這個窗口邊框的範圍過小,有的時候鼠標很難準肯定位變成箭頭,執行如下命令來增長這個範圍(須要註銷)
- defaults write -g AppleEdgeResizeExteriorSize 10
還原
- defaults delete -g AppleEdgeResizeExteriorSize
在Finder標題欄顯示路徑
- defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE; killall Finder
還原
- defaults delete com.apple.finder _FXShowPosixPathInTitle;killall Finder
在Finder中簡短我的文件夾顯示路徑(須要開啓Finder路徑欄)
修改前<ignore_js_op>
修改後<ignore_js_op>
- defaults write com.apple.finder PathBarRootAtHome -bool TRUE;killall Finder
還原
- defaults delete com.apple.finder PathBarRootAtHome;killall Finde
改變Finder主體字體(string後邊是字體的名字,)
- defaults write com.apple.finder NSSystemFont -string AmericanTypewriter;killall Finder
改變Finder標題字體
- defaults write com.apple.finder NSTitleBarFont -string ArialBlack;killall Finder
改變字號
- defaults write com.apple.finder NSTitleBarFontSize 16;killall Finder
還原
- defaults delete com.apple.finder NSSystemFont
- defaults delete com.apple.finder NSTitleBarFont
- defaults delete com.apple.finder NSTitleBarFontSize
- killall Finder
關於iTunes
歌曲或者表演者旁邊有個箭頭,點擊就能夠在iTunes Store中進行相關搜索,將箭頭改成在資料庫中顯示該歌曲或表演者。在終端中輸入
- defaults write com.apple.iTunes invertStoreLinks -bool YES
在iTunes上顯示音樂信息,在終端中輸入
- defaults write com.apple.dock itunes-notifications -boolean YES;killall Dock
若是想要在氣泡中始終顯示iTunes圖標,在終端中輸入
- defaults write com.apple.dock notification-always-show-image -bool YES;killall Dock
關於Dashboard
能夠將dashboard中的widget拖放到桌面上
- defaults write com.apple.dashboard devmode YES;killall Dock
還原
- defaults delete com.apple.dashboard devmode;killall Dock
禁用Dashboard
- defaults write com.apple.dashboard mcx-disabled -bool TRUE;killall Dock
還原
- defaults delete com.apple.dashboard mcx-disabled;killall Dock
關於Launchpad
改變Launchpad背景模糊程度(這個int整形數值能夠設置從0-255的整數)
- defaults write com.apple.dock springboard-blur-radius -int 150;killall Dock
還原
- defaults delete com.apple.dock springboard-blur-radius;killall Dock
重置Launchpad
- defaults write com.apple.dock ResetLaunchPad -bool TRUE;killall Dock
Mission Control
當你使用多個桌面時,能夠經過將窗口拖到屏幕兩端來改變該窗口所在桌面,有經驗的FY確定知道將窗口拖到兩邊以後須要停頓一、2秒才能切換桌面,執行如下命令縮短期
- defaults write com.apple.dock workspaces-edge-delay -float 0.15;killall Dock
改爲當即切換桌面
- defaults write com.apple.dock workspaces-edge-delay -float 0;killall Dock
還原
- defaults delete com.apple.dock workspaces-edge-delay;killall Dock
禁用Mission Control
- defaults write com.apple.dock mcx-expose-disabled -bool TRUE;killall Dock
還原
- defaults delete com.apple.dock mcx-expose-disabled;killall Dock
關於Mail
在Mail中強制顯示無格式郵件
- defaults write com.apple.mail PreferPlainText -bool YES
關於Desktop
臨時關閉桌面,隱藏桌面的全部圖標,在進行演講的時候常常會用到
- defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder
還原
- defaults delete com.apple.finder CreateDesktop;killall Finder
在桌面顯示壁紙路徑
- defaults write com.apple.dock desktop-picture-show-debug-text -bool TRUE;killall Dock
還原
- defaults delete com.apple.dock desktop-picture-show-debug-text;killall Dock
系統動畫
改變最小化窗口動畫
- defaults write com.apple.dock mineffect -string suck;killall Dock
還原
- defaults delete com.apple.dock mineffect;killall Dock
改變Dock Stack動畫
- defaults write com.apple.dock use-old-grid-animation -bool TRUE;killall Dock
還原
- defaults delete com.apple.dock use-old-grid-animation;killall Dock
關閉QuickLook動畫
- defaults write com.apple.finder QLPanelAnimationDuration -int 0;killall Finder
還原
- defaults delete com.apple.finder QLPanelAnimationDuration;killall Finder
關閉Mission Control動畫
- defaults write com.apple.dock expose-animation-duration -int 0;killall Dock
加速Mission Control動畫
- defaults write com.apple.dock expose-animation-duration -float 0.15
減慢Mission Control動畫
- defaults write com.apple.dock expose-animation-duration -float 1
還原
- [code]defaults delete com.apple.dock expose-animation-duration;killall Dock
[/code]
關閉文件和打印彈窗動畫(須要註銷系統)
- defaults write -g NSWindowResizeTime -float 0.01
還原
- defaults delete -g NSWindowResizeTime
取消Launchpad動畫
- defaults write com.apple.dock springboard-show-duration -int 0
- defaults write com.apple.dock springboard-hide-duration -int 0;killall Dock
還原
- defaults delete com.apple.dock springboard-show-duration
- defaults delete com.apple.dock springboard-hide-duration;killall Dock
加速Launchpad翻頁速度
- defaults write com.apple.dock springboard-page-duration -int 0;killall Dock
還原
- defaults delete com.apple.dock springboard-page-duration;killall Dock
關閉窗口和對話框彈出動畫(一個從屏幕中間放大的動畫)
- defaults write -g NSAutomaticWindowAnimationsEnabled -bool FALSE
還原
- defaults delete -g NSAutomaticWindowAnimationsEnabled
加快Dock自動隱藏彈出速度
- defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
還原
- defaults delete com.apple.dock autohide-time-modifier;killall Dock
關於截屏
改變截屏文件格式(須要註銷)
- defaults write com.apple.screencapture type -string BMP[/code;]
- string後邊能夠改成BMP GIF JPEG PDF PNG TIFF
- 還原
- [code]defaults delete com.apple.screencapture type
改變截屏文件名(將XXX改成你想要的文件名)
- defaults write com.apple.screencapture name "XXX";killall SystemUIServer
還原
- defaults write com.apple.screencapture name "Screen Shot";killall SystemUIServer
改變截屏保存路徑(location後邊就是你想要修改的路徑,能夠用你的用戶名替換USERNAME)
- defaults write com.apple.screencapture location /Users/USERNAME/Documents/
還原
- defaults delete com.apple.screencapture location
取消窗口截屏陰影
- defaults write com.apple.screencapture disable-shadow -bool TRUE
還原
- defaults delete com.apple.screencapture disable-shadow
其餘
關閉慣性滾輪
- defaults write -g AppleMomentumScrollSupported -bool FALSE
還原
- defaults delete -g AppleMomentumScrollSupported
修復外接顯示器字體問題
- defaults -currentHost write -g AppleFontSmoothing -int 2
還原
- defaults -currentHost delete -g AppleFontSmoothing
各位有興趣能夠試一下,在MAC apps中好比Mail、Safari、TextEdit,保持按下鍵盤按鍵只能輸入一個字,而不會重複輸入,執行如下命令來實現連續重複輸入字母(此項修改須要重啓相關軟件)
- defaults write -g ApplePressAndHoldEnabled -bool FALSE
還原
- defaults delete -g ApplePressAndHoldEnabled
在登陸頁面顯示更多信息(須要註銷)
- sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo 1
還原
- sudo defaults delete /Library/Preferences/com.apple.loginwindow AdminHostInfo
關閉文件下載警告。當你第一次打開網上下載的文件時,系統都會彈出一個警告,執行如下命令能夠關閉警告。(須要註銷)
- defaults write com.apple.LaunchServices LSQuarantine -bool FALSE
還原
- defaults delete com.apple.LaunchServices LSQuarantine
Debug菜單
Safari、Disk Utility等都有Debug菜單,裏邊有很多實用功能
Safari
- defaults write com.apple.Safari IncludeInternalDebugMenu -boolean YES
Disk Utility
- defaults write com.apple.DiskUtility DUDebugMenuEnabled -boolean YES
iCal
- defaults write com.apple.iCal IncludeDebugMenu -boolean YES
AppStore
- defaults write com.apple.appstore ShowDebugMenu -boolean YES
AddressBook
- defaults write com.apple.AddressBook ABShowDebugMenu -boolean YES
改變Time Machine備份週期(int後邊整形以秒計算。執行此命令須要輸入密碼,若是沒有設置過root密碼,在終端中輸入passwd root,而後設置密碼,輸入密碼過程當中沒有任何提示。)
- sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 7200
還原
- sudo defaults delete /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval
關閉空硬盤Time Machine提醒。若是你沒有設置Time Machine,每次你插入空磁盤就會提示你設置Time Machine(須要註銷)
- defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool TRUE
還原
- defaults delete com.apple.TimeMachine DoNotOfferNewDisksForBackup
改變iCal事件默認時間長度(int後邊輸入整形數字,以分鐘計算)
- defaults write com.apple.iCal "Default duration in minutes for new event" -int 30
還原
- defaults delete com.apple.iCal "Default duration in minutes for new event"
在保存文件對話框中始終使用展開模式。如圖
修改前<ignore_js_op>
修改後<ignore_js_op>
- defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE
還原
- defaults delete -g NSNavPanelExpandedStateForSaveMode
禁止在網絡共享時添加.DS_store文件。當你遠程訪問某個pc以後,就會在這臺pc上看到不少.DS_store文件,這個在winodws中是徹底沒用並且不會隱藏的。
- defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
還原
- defaults delete com.apple.desktopservices DSDontWriteNetworkStores
只在桌面顯示一個正在運行的窗口,將其餘程序窗口隱藏
- defaults write com.apple.dock single-app -bool TRUE;killall Dock
還原
- defaults delete com.apple.dock single-app;killall Dock
|