mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-09-04 00:18:44 +00:00
Misc tweaks
This commit is contained in:
@@ -29,12 +29,13 @@ link_mac:
|
||||
mac_setup:
|
||||
xcode-select --install
|
||||
./macos/macos_setup.sh
|
||||
./macos/install_brew.sh
|
||||
brew install zsh
|
||||
sudo chsh -s $(brew --prefix)/bin/zsh
|
||||
|
||||
brew:
|
||||
./macos/install_brew.sh
|
||||
brew bundle --file ./macos/Brewfile
|
||||
brew bundle --file ./macos/Caskfile
|
||||
sudo chsh -s $(brew --prefix)/bin/zsh
|
||||
|
||||
cask_personal:
|
||||
brew bundle --file ./macos/Caskfile.personal
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
squash = rebase --autostash -i
|
||||
megasquash = "!f() { git rebase --autostash -i `git merge-base --fork-point HEAD master`; }; f"
|
||||
unstage = restore --staged
|
||||
# fzf commands
|
||||
cf="!checkout_fzf() { git branch | fzf-tmux -p -h 25% --header 'git checkout' | xargs git checkout; }; checkout_fzf"
|
||||
sf="!switch_fzf() { git branch | fzf-tmux -p -h 25% --header 'git switch' | xargs git switch; }; switch_fzf"
|
||||
af = "!add_files() { git status -s | awk '{print $2}' | fzf-tmux -m --header 'git add' | xargs git add; }; add_files"
|
||||
afc = "!add_files_and_commit() { git status -s | awk '{print $2}' | fzf-tmux -m --header 'git add and commit' | xargs git add && git commit --verbose; }; add_files_and_commit"
|
||||
mf = "!merge() { git branch | fzf-tmux -p -h 25% --header 'git merge' | xargs git merge; }; merge"
|
||||
|
||||
# various pretty loggers from various places
|
||||
l = log --pretty=oneline --abbrev-commit
|
||||
|
||||
@@ -7,6 +7,7 @@ brew 'coreutils'
|
||||
brew 'docker'
|
||||
brew 'eza'
|
||||
brew 'findutils'
|
||||
brew 'fzf'
|
||||
brew 'gh'
|
||||
brew 'git'
|
||||
brew 'gnupg'
|
||||
@@ -19,4 +20,5 @@ brew 'tree'
|
||||
brew 'wget'
|
||||
brew 'youtube-dl'
|
||||
brew 'zoxide'
|
||||
brew 'zsh'
|
||||
brew 'zsh-syntax-highlighting'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# Copied from https://mths.be/macos
|
||||
# Also look at https://macos-defaults.com
|
||||
|
||||
+9
-1
@@ -43,6 +43,7 @@ alias egrep='egrep --color=auto'
|
||||
|
||||
# CD-ing to some commonly used folders
|
||||
alias og="cd ~/Git"
|
||||
alias dotfiles="cd ~/Git/dotfiles"
|
||||
|
||||
# Git Aliases
|
||||
alias g="git"
|
||||
@@ -60,6 +61,9 @@ alias gbd="git branch -D"
|
||||
alias gm="git mergetool"
|
||||
alias gmc="git merge --continue"
|
||||
alias grc="git rebase --continue"
|
||||
alias gsf="git sf"
|
||||
alias gaf="git af"
|
||||
alias gmf="git mf"
|
||||
|
||||
# tmux
|
||||
alias tm="tmux -2 attach-session -t "default" || tmux -2 new-session -s \"default\""
|
||||
@@ -89,14 +93,18 @@ alias vimrc="vim ~/.vimrc"
|
||||
# NPM
|
||||
alias npr="npm run"
|
||||
|
||||
# IP addresses
|
||||
# IP addresses & networking
|
||||
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
|
||||
alias localip="ipconfig getifaddr en0"
|
||||
alias reloaddns="dscacheutil -flushcache && sudo killall -HUP mDNSResponder"
|
||||
|
||||
# Misc
|
||||
|
||||
alias c="clear"
|
||||
alias be="bundle exec"
|
||||
alias serve="python -m http.server 9000"
|
||||
alias yda="youtube-dl -x --audio-format mp3"
|
||||
alias copyssh="pbcopy < $HOME/.ssh/id_ed25519.pub"
|
||||
|
||||
##### Mac OS Specific #####
|
||||
alias fl="open -a ForkLift"
|
||||
|
||||
@@ -24,3 +24,5 @@ ZSH_THEME_GIT_PROMPT_BEHIND="%B%F{magenta}% %{↓%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD="%B%F{yellow}% %{↑%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%B%F{42}% %{…%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%B%F{cyan}% %{✔%G%}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_LOCAL=" %B%F{42}% L"
|
||||
|
||||
Reference in New Issue
Block a user