mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-02-16 22:31:03 +01:00
Update macos.plugin.zsh
This commit is contained in:
@@ -18,11 +18,18 @@ alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true &&
|
|||||||
alias hidefiles="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
|
alias hidefiles="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
|
||||||
|
|
||||||
# Reset Launchpad layout (defaults method does not work in MacOS Sequoia and onward)
|
# Reset Launchpad layout (defaults method does not work in MacOS Sequoia and onward)
|
||||||
|
function resetlaunchpad() {
|
||||||
if [[ "$(sw_vers --productVersion)" -ge 15.0 ]]; then
|
if [[ "$(sw_vers --productVersion)" -ge 15.0 ]]; then
|
||||||
alias resetlaunchpad='rm -rf /private/$(getconf DARWIN_USER_DIR)/com.apple.dock.launchpad && killall Dock'
|
local user_dir="$(getconf DARWIN_USER_DIR)"
|
||||||
else
|
if [[ -n "$user_dir" && -d "$user_dir/com.apple.dock.launchpad" ]]; then
|
||||||
alias resetlaunchpad='defaults write com.apple.dock ResetLaunchPad -bool true && killall Dock'
|
rm -rf "$user_dir/com.apple.dock.launchpad" &&
|
||||||
|
killall Dock
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
defaults write com.apple.dock ResetLaunchPad -bool true
|
||||||
|
&& killall Dock
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Bluetooth restart
|
# Bluetooth restart
|
||||||
function btrestart() {
|
function btrestart() {
|
||||||
|
|||||||
Reference in New Issue
Block a user