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"
|
export PATH="/usr/local/sbin:$PATH"
|
||||||
# add nvim
|
# add nvim
|
||||||
export PATH=$PATH:/usr/local/nvim/bin:/usr/local/osx-64/nvim/bin
|
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
@@ -17,12 +17,11 @@
|
|||||||
pt = push origin --tags
|
pt = push origin --tags
|
||||||
merge2 = "!f() { git checkout $1 && git merge $2 && git checkout -; }; f"
|
merge2 = "!f() { git checkout $1 && git merge $2 && git checkout -; }; f"
|
||||||
bg = "!f() { git branch | grep $1; }; 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
|
can = commit --amend --no-edit
|
||||||
[push]
|
[push]
|
||||||
default = current
|
default = current
|
||||||
[merge]
|
[merge]
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
|
[include]
|
||||||
|
path = ~/.subgitconfig
|
||||||
|
|
||||||
|
|||||||
@@ -36,10 +36,12 @@ class Installer(Base):
|
|||||||
exit()
|
exit()
|
||||||
|
|
||||||
install_map = {
|
install_map = {
|
||||||
|
"brew": self.install_brew,
|
||||||
"neovim": self.install_neovim,
|
"neovim": self.install_neovim,
|
||||||
"z": self.install_z,
|
"z": self.install_z,
|
||||||
"git": self.install_git,
|
"git": self.install_git,
|
||||||
"go": self.install_go,
|
"go": self.install_go,
|
||||||
|
"tmux": self.init_tmux,
|
||||||
}
|
}
|
||||||
if val in install_map:
|
if val in install_map:
|
||||||
install_map.get(val)()
|
install_map.get(val)()
|
||||||
@@ -75,6 +77,15 @@ class Installer(Base):
|
|||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
run("go install golang.org/x/tools/gopls@latest")
|
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):
|
class Base(object):
|
||||||
def cmd_exist(self, name):
|
def cmd_exist(self, name):
|
||||||
|
|||||||
Reference in New Issue
Block a user