feat: update tmux config
This commit is contained in:
@@ -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
|
||||
|
||||
+22
-23
@@ -1,28 +1,27 @@
|
||||
[user]
|
||||
name = Laily
|
||||
email = i@laily.net
|
||||
name = Laily
|
||||
email = i@laily.net
|
||||
[core]
|
||||
autocrlf = input
|
||||
quotepath = false
|
||||
editor = /usr/local/bin/nvim
|
||||
excludesfile = ~/.dotfile/git/.gitignore
|
||||
autocrlf = input
|
||||
quotepath = false
|
||||
editor = /usr/local/bin/nvim
|
||||
excludesfile = ~/.dotfile/git/.gitignore
|
||||
[alias]
|
||||
au = add -u
|
||||
co = checkout
|
||||
cm = commit -m
|
||||
st = status
|
||||
ap = add -p
|
||||
br = branch
|
||||
pl = pull
|
||||
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"
|
||||
can = commit --amend --no-edit
|
||||
au = add -u
|
||||
co = checkout
|
||||
cm = commit -m
|
||||
st = status
|
||||
ap = add -p
|
||||
br = branch
|
||||
pl = pull
|
||||
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"
|
||||
can = commit --amend --no-edit
|
||||
[push]
|
||||
default = current
|
||||
default = current
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
|
||||
|
||||
|
||||
tool = vimdiff
|
||||
[include]
|
||||
path = ~/.subgitconfig
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user