mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-04-25 14:46:55 +08:00
more in tools/install.sh; .tmux.conf
This commit is contained in:
parent
5aa99aabdf
commit
7062696fad
13
.tmux.conf2
Normal file
13
.tmux.conf2
Normal file
|
@ -0,0 +1,13 @@
|
|||
set -g prefix ^a
|
||||
|
||||
# Use Alt-arrow keys to switch panes
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# Shift arrow to switch windows
|
||||
bind -n S-Left previous-window
|
||||
bind -n S-Right next-window
|
||||
|
||||
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"
|
|
@ -187,6 +187,7 @@ uninstall_crontab(){
|
|||
install(){
|
||||
install_crontab
|
||||
insert_if_not_exist "${HOME}/.zshrc" "source ${dotfile_home_path}/.zshrc2"
|
||||
insert_if_not_exist "${HOME}/.tmux.conf" "source-file ${dotfile_home_path}/.tmux.conf2"
|
||||
create_symlink "${dotfile_path}/.ssh/authorized_keys2" "${HOME}/.ssh/authorized_keys2"
|
||||
fmt_note "done installing!"
|
||||
}
|
||||
|
@ -196,6 +197,7 @@ uninstall(){
|
|||
if [[ $? == 1 ]]; then
|
||||
uninstall_crontab
|
||||
delete_if_exist "${HOME}/.zshrc" "source ${dotfile_home_path}/.zshrc2"
|
||||
delete_if_exist "${HOME}/.tmux.conf" "source-file ${dotfile_home_path}/.tmux.conf2"
|
||||
delete_link_if_match "${dotfile_path}/.ssh/authorized_keys2" "${HOME}/.ssh/authorized_keys2"
|
||||
fmt_note "done uninstalling!"
|
||||
fi
|
||||
|
|
|
@ -6,11 +6,15 @@ install_commands=(\
|
|||
[fzf]="git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install" \
|
||||
[acme.sh]="curl https://get.acme.sh | sh -s email=${EMAIL:-me@beardic.cn}" \
|
||||
[oh-my-zsh]='sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"' \
|
||||
[oh-my-tuna]='wget https://tuna.moe/oh-my-tuna/oh-my-tuna.py && sudo python oh-my-tuna.py --global' \
|
||||
[v2ray]="bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) #--remove" \
|
||||
[zerotier-one]='curl -s https://install.zerotier.com | sudo bash' \
|
||||
[docker-ce]='curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh #--mirror Aliyun #--dry-run' \
|
||||
)
|
||||
|
||||
install()
|
||||
{
|
||||
echo ${install_commands[$1]}
|
||||
echo -e ${install_commands[$1]}
|
||||
}
|
||||
|
||||
install $1
|
||||
|
|
|
@ -18,7 +18,7 @@ init()
|
|||
|
||||
# mass installation
|
||||
apt update
|
||||
apt install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping openssh-client openssh-server
|
||||
apt install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping openssh-client openssh-server top htop
|
||||
for i in {fzf,ripgrep}; do apt install $i -y; done
|
||||
|
||||
# custom dotfiles (usually not needed)
|
||||
|
@ -30,18 +30,11 @@ init()
|
|||
git config --global user.name "Dict Xiong"
|
||||
}
|
||||
|
||||
install()
|
||||
{
|
||||
echo to-do: install apt-less packages: $1
|
||||
|
||||
}
|
||||
|
||||
router()
|
||||
{
|
||||
case $1 in
|
||||
init ) init ;;
|
||||
install ) install $2 ;;
|
||||
* ) echo unknown command "$1". available: init, install ;;
|
||||
* ) echo unknown command "$1". available: init ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user