diff --git a/.tmux.conf2 b/.tmux.conf2 new file mode 100644 index 0000000..1c4e79b --- /dev/null +++ b/.tmux.conf2 @@ -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" diff --git a/install.sh b/install.sh index 2b3ec43..c64457d 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/tools/install.sh b/tools/install.sh index 25b36a5..8e43bb0 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -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 diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index 9b36071..4b7ea91 100755 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -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 }