mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Update macos.plugin.zsh
This commit is contained in:
parent
c86610aa41
commit
018011629b
1 changed files with 12 additions and 5 deletions
|
|
@ -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)
|
||||||
if [[ "$(sw_vers --productVersion)" -ge 15.0 ]]; then
|
function resetlaunchpad() {
|
||||||
alias resetlaunchpad='rm -rf /private/$(getconf DARWIN_USER_DIR)/com.apple.dock.launchpad && killall Dock'
|
if [[ "$(sw_vers --productVersion)" -ge 15.0 ]]; then
|
||||||
else
|
local user_dir="$(getconf DARWIN_USER_DIR)"
|
||||||
alias resetlaunchpad='defaults write com.apple.dock ResetLaunchPad -bool true && killall Dock'
|
if [[ -n "$user_dir" && -d "$user_dir/com.apple.dock.launchpad" ]]; then
|
||||||
fi
|
rm -rf "$user_dir/com.apple.dock.launchpad" &&
|
||||||
|
killall Dock
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
defaults write com.apple.dock ResetLaunchPad -bool true
|
||||||
|
&& killall Dock
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Bluetooth restart
|
# Bluetooth restart
|
||||||
function btrestart() {
|
function btrestart() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue