From 682115b3bf139937f769baf2aa09ee384d106caa Mon Sep 17 00:00:00 2001 From: Owen LeJeune Date: Sun, 1 Mar 2020 18:31:58 -0500 Subject: [PATCH 1/6] update plugins --- .gitignore | 1 + macos/macos.plugin.zsh | 36 +++++++++++++++++++++++++++++++++++- shell/shell.plugin.zsh | 3 +++ zsh-autosuggestions | 1 + 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 shell/shell.plugin.zsh create mode 160000 zsh-autosuggestions 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 From 66b99f857f7f7a961f1ce22a972c73274fbf8f13 Mon Sep 17 00:00:00 2001 From: Owen LeJeune Date: Sun, 1 Mar 2020 18:39:35 -0500 Subject: [PATCH 2/6] update zshrc --- zshrc | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/zshrc b/zshrc index 9a6940d..6006ac3 100644 --- a/zshrc +++ b/zshrc @@ -14,7 +14,7 @@ export ZSH="/Users/owenlejeune/.oh-my-zsh" # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes -#ZSH_THEME="robbyrussell" +# ZSH_THEME="robbyrussell" ZSH_THEME="pygmalion" # Set list of themes to pick from when loading at random @@ -33,9 +33,15 @@ ZSH_THEME="pygmalion" # Uncomment the following line to disable bi-weekly auto-update checks. # DISABLE_AUTO_UPDATE="true" +# Uncomment the following line to automatically update without prompting. +# DISABLE_UPDATE_PROMPT="true" + # Uncomment the following line to change how often to auto-update (in days). # export UPDATE_ZSH_DAYS=13 +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS=true + # Uncomment the following line to disable colors in ls. # DISABLE_LS_COLORS="true" @@ -70,21 +76,20 @@ ZSH_THEME="pygmalion" # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. plugins=(autoenv - colored-man-pages - colorize - git - homebrew - macos - oneplus - osx - subliminal - telnet - thefuck - wd - xcode) + colored-man-pages + colorize + git + homebrew + macos + oneplus + shell + subliminal + telnet + thefuck + wd + xcode) source $ZSH/oh-my-zsh.sh -source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh # User configuration @@ -103,20 +108,14 @@ source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh # Compilation flags # export ARCHFLAGS="-arch x86_64" -# ssh -# export SSH_KEY_PATH="~/.ssh/rsa_id" - # Set personal aliases, overriding those provided by oh-my-zsh libs, # plugins, and themes. Aliases can be placed here, though oh-my-zsh # users are encouraged to define aliases within the ZSH_CUSTOM folder. # For a full list of active aliases, run `alias`. # # Example aliases -# alias zshconfig="mate ~/.zshrc" +alias zshconfig="vim ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" - -# ZSH -alias zshconfig="atom ~/.zshrc" alias ohmyzsh="atom ~/.oh-my-zsh" alias zshsource="source ~/.zshrc" alias reset="cd && clear" From 051b1efdfd889c3eeefb3e994d4626c5f481a65c Mon Sep 17 00:00:00 2001 From: Owen LeJeune Date: Sun, 1 Mar 2020 23:54:25 -0500 Subject: [PATCH 3/6] add dotfiles plugin --- dotfiles/dotfiles.plugin.sh | 2 ++ macos/macos.plugin.zsh | 13 +------------ 2 files changed, 3 insertions(+), 12 deletions(-) create mode 100644 dotfiles/dotfiles.plugin.sh diff --git a/dotfiles/dotfiles.plugin.sh b/dotfiles/dotfiles.plugin.sh new file mode 100644 index 0000000..16efead --- /dev/null +++ b/dotfiles/dotfiles.plugin.sh @@ -0,0 +1,2 @@ +alias dotfile-make="sh ~/.dotfiles/dotfile-make.sh" +alias df-make="dotfile-make" diff --git a/macos/macos.plugin.zsh b/macos/macos.plugin.zsh index a3ac6bc..1f694c4 100644 --- a/macos/macos.plugin.zsh +++ b/macos/macos.plugin.zsh @@ -1,5 +1,5 @@ alias allowanywhere="sudo spctl --master-disable" -alias resetaudio="sudo killall coreadiod" +alias resetaudio="sudo killall coreaudiod" function screensaver() { open -a ScreenSaverEngine.app @@ -18,17 +18,6 @@ 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" From 12c37f7b876a76a09c477ae16d2565f691f56812 Mon Sep 17 00:00:00 2001 From: Owen LeJeune Date: Mon, 2 Mar 2020 00:21:28 -0500 Subject: [PATCH 4/6] update dotfiles plugin --- dotfiles/{dotfiles.plugin.sh => dotfiles.plugin.zsh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dotfiles/{dotfiles.plugin.sh => dotfiles.plugin.zsh} (100%) diff --git a/dotfiles/dotfiles.plugin.sh b/dotfiles/dotfiles.plugin.zsh similarity index 100% rename from dotfiles/dotfiles.plugin.sh rename to dotfiles/dotfiles.plugin.zsh From 9195a3ee8c7a28f944a9deae26488b03ed970cfc Mon Sep 17 00:00:00 2001 From: Owen LeJeune Date: Mon, 2 Mar 2020 00:26:57 -0500 Subject: [PATCH 5/6] update dotfiles plugin --- dotfiles/dotfiles.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/dotfiles.plugin.zsh b/dotfiles/dotfiles.plugin.zsh index 16efead..81844d9 100644 --- a/dotfiles/dotfiles.plugin.zsh +++ b/dotfiles/dotfiles.plugin.zsh @@ -1,2 +1,2 @@ -alias dotfile-make="sh ~/.dotfiles/dotfile-make.sh" +alias dotfile-make="sh ~/.dotfiles/tools/dotfile-make.sh" alias df-make="dotfile-make" From e65b975b876b7a1af6cdeeef6693bf1f06ccfc34 Mon Sep 17 00:00:00 2001 From: Owen LeJeune Date: Mon, 2 Mar 2020 11:44:29 -0500 Subject: [PATCH 6/6] Update git.plugin.zsh --- git/git.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git/git.plugin.zsh b/git/git.plugin.zsh index 41e0170..a962d6d 100644 --- a/git/git.plugin.zsh +++ b/git/git.plugin.zsh @@ -3,6 +3,7 @@ alias gadda="gadd -A" alias gstatus="git status" alias gdiff="git diff" alias glog="git log" +alias glogg="git log --graph" alias glast="glog -p -1" alias gcheckout="git checkout" alias gcheckoutb="gcheckout -b" @@ -14,8 +15,11 @@ alias gcommit="git commit" alias gcommitm="git commit -m" alias gamend="gcommit --amend" alias gbranch="git branch" -alias rnmbranch="gbranch -m" +alias gbranchd="git branch -D" +alias grnmbranch="gbranch -m" alias gpushb="git push origin" +alias gundoc="git reset HEAD~" +alias greset="git checkout --" function gpush() { BRANCH=""