feat: support termux
This commit is contained in:
parent
3c3aacb2c9
commit
94c5e66105
|
@ -5,7 +5,8 @@ DIR=$(dirname "$(readlink -f "$0")")
|
|||
. "$DIR/../env.sh"
|
||||
|
||||
log 'Setting up shell'
|
||||
case "$PM" in
|
||||
if ! has_cmd fish; then
|
||||
case "$PM" in
|
||||
apt)
|
||||
sudo add-apt-repository ppa:fish-shell/release-3 -y -n
|
||||
pm_update
|
||||
|
@ -38,7 +39,8 @@ case "$PM" in
|
|||
Depends = dash
|
||||
" | sed 's/^ *//' | sudo tee /etc/pacman.d/sh-is-dash.hook >/dev/null
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
# only for local machine with gui
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if status is-interactive
|
||||
# === default programs
|
||||
set -gx EDITOR v
|
||||
set -gx EDITOR vim
|
||||
|
||||
# === fzf configuration
|
||||
set -gx FZF_DEFAULT_COMMAND 'ag -g ""'
|
||||
|
|
|
@ -6,7 +6,8 @@ DIR=$(dirname "$(readlink -f "$0")")
|
|||
|
||||
log 'Setting up tmux'
|
||||
|
||||
case "$PM" in
|
||||
if ! has_cmd tmux; then
|
||||
case "$PM" in
|
||||
apt)
|
||||
TMUX_VER=3.2
|
||||
if ! has_cmd tmux || [ "$(tmux -V)" != "tmux $TMUX_VER" ]; then
|
||||
|
@ -34,7 +35,8 @@ case "$PM" in
|
|||
pacman)
|
||||
sudo pacman -S --noconfirm --needed tmux bc
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
fi
|
||||
|
||||
# symlink configuration
|
||||
lnsf "$DIR/tmux/tmux.conf" "$HOME/.tmux.conf"
|
||||
|
|
|
@ -18,7 +18,7 @@ set-option -g set-titles-string "#S / #W"
|
|||
############################
|
||||
setw -g mode-keys vi
|
||||
set -g status-keys vi
|
||||
set -g default-shell /usr/bin/fish
|
||||
set -g default-shell $SHELL
|
||||
# set -g prefix C-h
|
||||
bind c new-window -c '#{pane_current_path}'
|
||||
bind '"' split-window -c '#{pane_current_path}'
|
||||
|
|
|
@ -16,7 +16,8 @@ if [ "$VIM_MODE" = "enhanced" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# install nvim
|
||||
# install vim
|
||||
export VIM=vim
|
||||
if ! has_cmd "$VIM"; then
|
||||
case "$PM" in
|
||||
apt)
|
||||
|
@ -51,7 +52,7 @@ if ! has_cmd "$VIM"; then
|
|||
fi
|
||||
|
||||
# symlink configuration
|
||||
sudo ln -sf "$(command -v vim)" /usr/bin/v
|
||||
#sudo ln -sf "$(command -v vim)" /usr/bin/v
|
||||
lnsf "$DIR/vim/init.vim" "$XDG_CONFIG_HOME/nvim/init.vim"
|
||||
lnsf "$DIR/vim/coc-settings.json" "$XDG_CONFIG_HOME/nvim/coc-settings.json"
|
||||
lnsf "$DIR/vim/coc-settings.json" "$HOME/.vim/coc-settings.json"
|
||||
|
|
Loading…
Reference in New Issue
Block a user