feat: update tmux config

This commit is contained in:
2022-02-07 18:28:02 +08:00
parent 60d01008b6
commit 4bc52a1432
3 changed files with 35 additions and 23 deletions
+2
View File
@@ -117,3 +117,5 @@ export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
# add nvim
export PATH=$PATH:/usr/local/nvim/bin:/usr/local/osx-64/nvim/bin
# https://github.com/julienXX/terminal-notifier
alias alert='terminal-notifier -title "Terminal" -message "Done with task! Exit status: $?"' -activate com.apple.Terminal
+3 -4
View File
@@ -17,12 +17,11 @@
pt = push origin --tags
merge2 = "!f() { git checkout $1 && git merge $2 && git checkout -; }; f"
bg = "!f() { git branch | grep $1; }; f"
delbr = "!f(){ git branch -D `git branch | grep \"\b$1\"`; };f"
delbr = "!f(){ git branch -D $(git branch | grep \"\b$1\"); };f"
can = commit --amend --no-edit
[push]
default = current
[merge]
tool = vimdiff
[include]
path = ~/.subgitconfig
+11
View File
@@ -36,10 +36,12 @@ class Installer(Base):
exit()
install_map = {
"brew": self.install_brew,
"neovim": self.install_neovim,
"z": self.install_z,
"git": self.install_git,
"go": self.install_go,
"tmux": self.init_tmux,
}
if val in install_map:
install_map.get(val)()
@@ -75,6 +77,15 @@ class Installer(Base):
os.chdir(cwd)
run("go install golang.org/x/tools/gopls@latest")
def install_brew(self):
run("/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"")
def init_tmux(self):
self.check_link(home_dir+"/.tmux.conf",
home_dir+"/.dotfile/.tmux.conf")
if not os.path.exists(home_dir+"/.tmux/plugins/tmux-resurrect"):
run("git clone --depth=1 https://github.com/tmux-plugins/tmux-resurrect %s/.tmux/plugins/tmux-resurrect" % (home_dir))
class Base(object):
def cmd_exist(self, name):