more in tools/install.sh; .tmux.conf

This commit is contained in:
Dict Xiong 2022-05-18 21:46:31 +08:00
parent 5aa99aabdf
commit 7062696fad
4 changed files with 22 additions and 10 deletions

13
.tmux.conf2 Normal file
View 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"

View File

@ -187,6 +187,7 @@ uninstall_crontab(){
install(){ install(){
install_crontab install_crontab
insert_if_not_exist "${HOME}/.zshrc" "source ${dotfile_home_path}/.zshrc2" 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" create_symlink "${dotfile_path}/.ssh/authorized_keys2" "${HOME}/.ssh/authorized_keys2"
fmt_note "done installing!" fmt_note "done installing!"
} }
@ -196,6 +197,7 @@ uninstall(){
if [[ $? == 1 ]]; then if [[ $? == 1 ]]; then
uninstall_crontab uninstall_crontab
delete_if_exist "${HOME}/.zshrc" "source ${dotfile_home_path}/.zshrc2" 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" delete_link_if_match "${dotfile_path}/.ssh/authorized_keys2" "${HOME}/.ssh/authorized_keys2"
fmt_note "done uninstalling!" fmt_note "done uninstalling!"
fi fi

View File

@ -6,11 +6,15 @@ install_commands=(\
[fzf]="git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install" \ [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}" \ [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-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() install()
{ {
echo ${install_commands[$1]} echo -e ${install_commands[$1]}
} }
install $1 install $1

View File

@ -18,7 +18,7 @@ init()
# mass installation # mass installation
apt update 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 for i in {fzf,ripgrep}; do apt install $i -y; done
# custom dotfiles (usually not needed) # custom dotfiles (usually not needed)
@ -30,18 +30,11 @@ init()
git config --global user.name "Dict Xiong" git config --global user.name "Dict Xiong"
} }
install()
{
echo to-do: install apt-less packages: $1
}
router() router()
{ {
case $1 in case $1 in
init ) init ;; init ) init ;;
install ) install $2 ;; * ) echo unknown command "$1". available: init ;;
* ) echo unknown command "$1". available: init, install ;;
esac esac
} }