mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 03:09:22 +01:00
bashrc & zshrc: convert osx-functions to aliases.
defaults has sanity checks, I belive.
This commit is contained in:
parent
2077958ac1
commit
bc966efe0b
25
bashrc
25
bashrc
@ -530,8 +530,11 @@ fi
|
||||
# Homebrew
|
||||
alias homebrew-install="mkdir -p ~/.local/bin;cd ~/.local;git clone https://github.com/Homebrew/homebrew.git;mkdir -p $HOME/.local/share/man/man1;ln -sf $HOME/.local/homebrew/bin/brew $HOME/.local/bin/brew;ln -sf $HOME/.local/homebrew/share/man/man1/brew.1 $HOME/.local/share/man/man1/brew.1;cd"
|
||||
|
||||
# OS X Server
|
||||
# OS X
|
||||
alias osx-server-caching-interface="serveradmin settings caching:Interface ="
|
||||
alias osx-show-hidden-files="defaults write com.apple.finder AppleShowAllFiles"
|
||||
alias osx-airdrop-listenallif="defaults write com.apple.NetworkBrowser BrowseAllInterfaces"
|
||||
alias osx-set-updatecheck="defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency"
|
||||
|
||||
# Simple HTTPd with Python.
|
||||
alias python2-httpd="python -m SimpleHTTPServer"
|
||||
@ -743,26 +746,6 @@ fi
|
||||
|
||||
}
|
||||
|
||||
# Show hidden files in OS X.
|
||||
|
||||
function osx-show-hidden-files {
|
||||
defaults write com.apple.finder AppleShowAllFiles $USERCHOICE
|
||||
echo "defaults write com.apple.finder AppleShowAllFiles $USERCHOICE"
|
||||
}
|
||||
|
||||
# Enable AirDrop on unsupported Macs + Ethernet.
|
||||
|
||||
function osx-airdrop-listenall {
|
||||
defaults write com.apple.NetworkBrowser BrowseAllInterfaces $USERCHOICE
|
||||
echo "defaults write com.apple.NetworkBrowser BrowseAllInterfaces $USERCHOICE"
|
||||
}
|
||||
|
||||
# Check the time how often updates are checked on OS X.
|
||||
function osx-set-updatecheck {
|
||||
defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency $1
|
||||
echo "defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency $1"
|
||||
}
|
||||
|
||||
# .custom
|
||||
if [ -f ~/.custom ]; then
|
||||
source ~/.custom
|
||||
|
27
zshrc
27
zshrc
@ -503,8 +503,11 @@ fi
|
||||
# Homebrew
|
||||
alias homebrew-install="mkdir -p ~/.local/bin;cd ~/.local;git clone https://github.com/Homebrew/homebrew.git;mkdir -p $HOME/.local/share/man/man1;ln -sf $HOME/.local/homebrew/bin/brew $HOME/.local/bin/brew;ln -sf $HOME/.local/homebrew/share/man/man1/brew.1 $HOME/.local/share/man/man1/brew.1;cd"
|
||||
|
||||
# OS X Server
|
||||
# OS X
|
||||
alias osx-server-caching-interface="serveradmin settings caching:Interface ="
|
||||
lias osx-show-hidden-files="defaults write com.apple.finder AppleShowAllFiles"
|
||||
alias osx-airdrop-listenallif="defaults write com.apple.NetworkBrowser BrowseAllInterfaces"
|
||||
alias osx-set-updatecheck="defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency"
|
||||
|
||||
# Simple HTTPd with Python.
|
||||
alias python2-httpd="python -m SimpleHTTPServer"
|
||||
@ -714,28 +717,6 @@ fi
|
||||
|
||||
}
|
||||
|
||||
# Show hidden files in OS X.
|
||||
|
||||
function osx-show-hidden-files {
|
||||
defaults write com.apple.finder AppleShowAllFiles $USERCHOICE
|
||||
echo "defaults write com.apple.finder AppleShowAllFiles $USERCHOICE"
|
||||
}
|
||||
|
||||
# Enable AirDrop on unsupported Macs + Ethernet.
|
||||
|
||||
function osx-airdrop-listenall {
|
||||
|
||||
defaults write com.apple.NetworkBrowser BrowseAllInterfaces $USERCHOICE
|
||||
echo "defaults write com.apple.NetworkBrowser BrowseAllInterfaces $USERCHOICE"
|
||||
}
|
||||
|
||||
# Check the time how often updates are checked on OS X.
|
||||
function osx-set-updatecheck {
|
||||
defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency $1
|
||||
echo "defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency $1"
|
||||
}
|
||||
|
||||
|
||||
# Source files for miscannellious modifications.
|
||||
|
||||
# .custom
|
||||
|
Loading…
Reference in New Issue
Block a user