diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/macos/macos.plugin.zsh b/macos/macos.plugin.zsh index 3442378..a3ac6bc 100644 --- a/macos/macos.plugin.zsh +++ b/macos/macos.plugin.zsh @@ -1,5 +1,39 @@ alias allowanywhere="sudo spctl --master-disable" +alias resetaudio="sudo killall coreadiod" function screensaver() { - open -a ScreenSaverEngine.app + open -a ScreenSaverEngine.app +} + +function finder() { + DIR="." + if [[ $# -gt 0 ]]; + then + DIR="$1" + fi + open $DIR +} + +function quick-look() { + (( $# > 0 )) && qlmanage -p $* &>/dev/null & +} + +function man-preview() { + man -t "$@" | open -f -a Preview +} + +function open-preview() { + "$@" | open -f -a Preview +} + +# Spotify control function +source ${ZSH}/plugins/osx/spotify + +# Show/hide hidden filed in the Finder +alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" +alias hidefiles="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" + +# Remove .DS_Store files recursively in a directory, default . +function rmdsstore() { + find "${@:-.}" -type f -name .DS_Store -delete } diff --git a/shell/shell.plugin.zsh b/shell/shell.plugin.zsh new file mode 100644 index 0000000..b57b9ab --- /dev/null +++ b/shell/shell.plugin.zsh @@ -0,0 +1,3 @@ +alias la="ls -a" +alias ll="ls -l" +alias lla="ls -l -a" diff --git a/zsh-autosuggestions b/zsh-autosuggestions new file mode 160000 index 0000000..43f3bc4 --- /dev/null +++ b/zsh-autosuggestions @@ -0,0 +1 @@ +Subproject commit 43f3bc4010b2c697d2252fdd8b36a577ea125881