added tmux, butter fish config
This commit is contained in:
parent
a929bde64b
commit
e91c2fd4a5
|
@ -1,2 +1,3 @@
|
||||||
/.mbenv
|
/.mbenv
|
||||||
/mbenv.tar.xz
|
/mbenv.tar.xz
|
||||||
|
/tmp_install
|
101
buildenv.sh
101
buildenv.sh
|
@ -9,6 +9,32 @@ export INSTALL_TMP_DIR=$(pwd)/tmp_install
|
||||||
export XDG_CONFIG_HOME=${MB_ENV_BASE}/config
|
export XDG_CONFIG_HOME=${MB_ENV_BASE}/config
|
||||||
export XDG_DATA_HOME=${MB_ENV_BASE}/local/share
|
export XDG_DATA_HOME=${MB_ENV_BASE}/local/share
|
||||||
|
|
||||||
|
|
||||||
|
# Reset
|
||||||
|
Color_Off='\033[0m' # Text Reset
|
||||||
|
|
||||||
|
# Regular Colors
|
||||||
|
Black='\033[0;30m' # Black
|
||||||
|
Red='\033[0;31m' # Red
|
||||||
|
Green='\033[0;32m' # Green
|
||||||
|
Yellow='\033[0;33m' # Yellow
|
||||||
|
Blue='\033[0;34m' # Blue
|
||||||
|
Purple='\033[0;35m' # Purple
|
||||||
|
Cyan='\033[0;36m' # Cyan
|
||||||
|
White='\033[0;37m' # White
|
||||||
|
|
||||||
|
# Bold
|
||||||
|
BBlack='\033[1;30m' # Black
|
||||||
|
BRed='\033[1;31m' # Red
|
||||||
|
BGreen='\033[1;32m' # Green
|
||||||
|
BYellow='\033[1;33m' # Yellow
|
||||||
|
BBlue='\033[1;34m' # Blue
|
||||||
|
BPurple='\033[1;35m' # Purple
|
||||||
|
BCyan='\033[1;36m' # Cyan
|
||||||
|
BWhite='\033[1;37m' # White
|
||||||
|
|
||||||
|
export PATH=${MB_ENV_BASE}/bin:$PATH
|
||||||
|
|
||||||
# create folders
|
# create folders
|
||||||
mkdir $MB_ENV_BASE
|
mkdir $MB_ENV_BASE
|
||||||
mkdir $INSTALL_TMP_DIR
|
mkdir $INSTALL_TMP_DIR
|
||||||
|
@ -16,14 +42,22 @@ mkdir $XDG_CONFIG_HOME
|
||||||
mkdir -p $XDG_DATA_HOME
|
mkdir -p $XDG_DATA_HOME
|
||||||
|
|
||||||
|
|
||||||
|
printf "${BBlue}Downloading and installing packages${Color_Off}\n"
|
||||||
# ------------------------------------------- fish shell -----------------------------------------------------------
|
# ------------------------------------------- fish shell -----------------------------------------------------------
|
||||||
|
|
||||||
# portable fish: https://github.com/xxh/fish-portable
|
# portable fish: https://github.com/xxh/fish-portable
|
||||||
|
|
||||||
|
printf "${Blue}--> fish shell${Color_Off}\n"
|
||||||
cd $MB_ENV_BASE
|
cd $MB_ENV_BASE
|
||||||
|
printf "${White} Downloading...${Color_Off}\n"
|
||||||
PORTABLE_FISH=https://github.com/xxh/fish-portable/releases/download/3.4.1/fish-portable-musl-alpine-Linux-x86_64.tar.gz
|
PORTABLE_FISH=https://github.com/xxh/fish-portable/releases/download/3.4.1/fish-portable-musl-alpine-Linux-x86_64.tar.gz
|
||||||
curl -L $PORTABLE_FISH | tar xz
|
curl -sL $PORTABLE_FISH | tar xz
|
||||||
|
printf "${White} Configuring...${Color_Off}\n"
|
||||||
cp -r ${CONFIG_IN}/fish ${XDG_CONFIG_HOME}
|
cp -r ${CONFIG_IN}/fish ${XDG_CONFIG_HOME}
|
||||||
|
|
||||||
|
curl -sfLo "${XDG_CONFIG_HOME}"/fish/completions/tmux.fish \
|
||||||
|
https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/tmux.fish
|
||||||
|
|
||||||
# ------------------------------------------- oh my fish -----------------------------------------------------------
|
# ------------------------------------------- oh my fish -----------------------------------------------------------
|
||||||
|
|
||||||
export OMF_CHANNEL=stable
|
export OMF_CHANNEL=stable
|
||||||
|
@ -33,47 +67,71 @@ FISH_EXE=${MB_ENV_BASE}/bin/fish
|
||||||
|
|
||||||
cp -r ${CONFIG_IN}/omf ${XDG_CONFIG_HOME}
|
cp -r ${CONFIG_IN}/omf ${XDG_CONFIG_HOME}
|
||||||
cd $INSTALL_TMP_DIR
|
cd $INSTALL_TMP_DIR
|
||||||
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install_omf
|
printf "${White} Installing Oh-My-Fish...${Color_Off}\n"
|
||||||
${FISH_EXE} install_omf --noninteractive
|
curl -sL https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install_omf
|
||||||
${FISH_EXE} -c "omf install"
|
${FISH_EXE} install_omf --noninteractive &> /dev/null
|
||||||
|
${FISH_EXE} -c "omf install" &> /dev/null
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------- bat -----------------------------------------------------------
|
# ------------------------------------------- bat -----------------------------------------------------------
|
||||||
|
|
||||||
|
printf "${Blue}--> bat${Color_Off}\n"
|
||||||
cd ${INSTALL_TMP_DIR}
|
cd ${INSTALL_TMP_DIR}
|
||||||
curl -L https://github.com/sharkdp/bat/releases/download/v0.21.0/bat-v0.21.0-x86_64-unknown-linux-musl.tar.gz | tar xz
|
curl -sL https://github.com/sharkdp/bat/releases/download/v0.21.0/bat-v0.21.0-x86_64-unknown-linux-musl.tar.gz | tar xz
|
||||||
cd bat*
|
cd bat*
|
||||||
cp bat ${MB_ENV_BASE}/bin
|
cp bat ${MB_ENV_BASE}/bin
|
||||||
mkdir $XDG_CONFIG_HOME/fish/completions
|
mkdir $XDG_CONFIG_HOME/fish/completions
|
||||||
cp autocomplete/bat.fish $XDG_CONFIG_HOME/fish/completions/bat.fish
|
cp autocomplete/bat.fish $XDG_CONFIG_HOME/fish/completions/bat.fish
|
||||||
|
|
||||||
# -------------------------------------------- vim ---------------------------------------------------------------
|
# -------------------------------------------- neovim ------------------------------------------------------------
|
||||||
|
|
||||||
#curl -L https://github.com/dtschan/vim-static/releases/download/v8.1.1045/vim > $MB_ENV_BASE/bin/vim
|
|
||||||
#chmod u+x $MB_ENV_BASE/bin/vim
|
|
||||||
#mkdir $XDG_CONFIG_HOME/vim
|
|
||||||
#cp ${CONFIG_IN}/.vimrc $XDG_CONFIG_HOME/vim/vimrc
|
|
||||||
#curl -fLo $XDG_CONFIG_HOME/vim/autoload/plug.vim --create-dirs \
|
|
||||||
# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
|
|
||||||
|
|
||||||
|
printf "${Blue}--> neovim${Color_Off}\n"
|
||||||
cd ${INSTALL_TMP_DIR}
|
cd ${INSTALL_TMP_DIR}
|
||||||
curl -L https://github.com/neovim/neovim/releases/download/v0.7.0/nvim.appimage > nvim.appimage
|
printf "${White} Downloading...${Color_Off}\n"
|
||||||
|
curl -sL https://github.com/neovim/neovim/releases/download/v0.7.0/nvim.appimage > nvim.appimage
|
||||||
chmod u+x nvim.appimage
|
chmod u+x nvim.appimage
|
||||||
./nvim.appimage --appimage-extract
|
printf "${White} Extracting AppImage...${Color_Off}\n"
|
||||||
|
./nvim.appimage --appimage-extract &> /dev/null
|
||||||
cd squashfs-root/usr
|
cd squashfs-root/usr
|
||||||
cp ./bin/* ${MB_ENV_BASE}/bin/
|
cp ./bin/* ${MB_ENV_BASE}/bin/
|
||||||
|
mkdir ${MB_ENV_BASE}/lib
|
||||||
cp -r ./lib/* ${MB_ENV_BASE}/lib/
|
cp -r ./lib/* ${MB_ENV_BASE}/lib/
|
||||||
cp -r ./share/nvim ${MB_ENV_BASE}/share/
|
cp -r ./share/nvim ${MB_ENV_BASE}/share/
|
||||||
cp -r ${CONFIG_IN}/nvim ${XDG_CONFIG_HOME}
|
cp -r ${CONFIG_IN}/nvim ${XDG_CONFIG_HOME}
|
||||||
|
|
||||||
curl -fLo "${XDG_DATA_HOME}"/nvim/site/autoload/plug.vim --create-dirs \
|
printf "${White} Downloading and installing vim-plug${Color_Off}\n"
|
||||||
|
curl -sfLo "${XDG_DATA_HOME}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
|
||||||
cd ${MB_ENV_BASE}
|
cd ${MB_ENV_BASE}/bin
|
||||||
ln -s nvim vi
|
ln -s nvim vi
|
||||||
ln -s nvim vim
|
ln -s nvim vim
|
||||||
|
${MB_ENV_BASE}/bin/nvim +PlugInstall +qall
|
||||||
|
|
||||||
|
# -------------------------------------------- tmux ------------------------------------------------------------
|
||||||
|
|
||||||
|
printf "${Blue}--> tmux${Color_Off}\n"
|
||||||
|
cd ${INSTALL_TMP_DIR}
|
||||||
|
rm -rf ${INSTALL_TMP_DIR}/*
|
||||||
|
curl -sL https://github.com/nelsonenzo/tmux-appimage/releases/download/3.2a/tmux.appimage > tmux.appimage
|
||||||
|
chmod u+x tmux.appimage
|
||||||
|
printf "${White} Extracting AppImage...${Color_Off}\n"
|
||||||
|
./tmux.appimage --appimage-extract &> /dev/null
|
||||||
|
|
||||||
|
cd squashfs-root/usr
|
||||||
|
cp ./bin/* ${MB_ENV_BASE}/bin/
|
||||||
|
cp -r ./lib/* ${MB_ENV_BASE}/lib/
|
||||||
|
cp -r ./share/terminfo ${MB_ENV_BASE}/share/
|
||||||
|
|
||||||
|
cp -r ${CONFIG_IN}/tmux ${XDG_CONFIG_HOME}
|
||||||
|
|
||||||
|
export TERMINFO=${MB_ENV_BASE}/share/terminfo
|
||||||
|
|
||||||
|
printf "${White} Installing tpm package manager...${Color_Off}\n"
|
||||||
|
cd $XDG_DATA_HOME
|
||||||
|
mkdir -p tmux/plugins
|
||||||
|
git clone https://github.com/tmux-plugins/tpm tmux/plugins/tpm &> /dev/null
|
||||||
|
./tmux/plugins/tpm/bin/install_plugins &> /dev/null
|
||||||
|
|
||||||
# ------------------------------------------- configs -----------------------------------------------------------
|
# ------------------------------------------- configs -----------------------------------------------------------
|
||||||
|
|
||||||
|
@ -82,7 +140,10 @@ cp ${CONFIG_IN}/activate.sh $MB_ENV_BASE # activation script
|
||||||
|
|
||||||
# ------------------------------------------- pack and cleanup ----------------------------------------------------
|
# ------------------------------------------- pack and cleanup ----------------------------------------------------
|
||||||
|
|
||||||
|
printf "${Blue}Packing archive${Color_Off}\n"
|
||||||
cd $BASE
|
cd $BASE
|
||||||
tar -cJf mbenv.tar.xz .mbenv
|
tar -cJf mbenv.tar.xz .mbenv
|
||||||
rm -rf ${MB_ENV_BASE}
|
#rm -rf ${MB_ENV_BASE}
|
||||||
rm -rf ${INSTALL_TMP_DIR}
|
rm -rf ${INSTALL_TMP_DIR}
|
||||||
|
|
||||||
|
printf "${Green}Done${Color_Off}\n"
|
|
@ -6,8 +6,8 @@ export XDG_CONFIG_HOME=${MB_ENV_BASE}/config
|
||||||
export XDG_DATA_HOME=${MB_ENV_BASE}/local/share
|
export XDG_DATA_HOME=${MB_ENV_BASE}/local/share
|
||||||
export PATH=${MB_ENV_BASE}/bin:${PATH}
|
export PATH=${MB_ENV_BASE}/bin:${PATH}
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
|
export TERMINFO=${MB_ENV_BASE}/share/terminfo
|
||||||
|
export SHELL=${MB_ENV_BASE}/bin/fish
|
||||||
|
|
||||||
|
|
||||||
${MB_ENV_BASE}/bin/fish.sh
|
${MB_ENV_BASE}/bin/fish.sh
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
# Display the current binding mode... if it's vi or vi-like.
|
||||||
|
#
|
||||||
|
# To always show the binding mode (regardless of current bindings):
|
||||||
|
# set -g theme_display_vi yes
|
||||||
|
#
|
||||||
|
# To never show:
|
||||||
|
# set -g theme_display_vi no
|
||||||
|
|
||||||
|
|
||||||
|
# invisible space is inserted into prompt to play nice with tmux jumping
|
||||||
|
# https://unix.stackexchange.com/questions/226731/jump-to-last-prompt-in-terminal-or-tmux
|
||||||
|
set -g invisible_space " "
|
||||||
|
|
||||||
|
function fish_mode_prompt -d 'bobthefish-optimized fish mode indicator'
|
||||||
|
[ "$theme_display_vi" != 'no' ]
|
||||||
|
or return
|
||||||
|
|
||||||
|
[ "$fish_key_bindings" = 'fish_vi_key_bindings' \
|
||||||
|
-o "$fish_key_bindings" = 'hybrid_bindings' \
|
||||||
|
-o "$fish_key_bindings" = 'fish_hybrid_key_bindings' \
|
||||||
|
-o "$theme_display_vi" = 'yes' ]
|
||||||
|
or return
|
||||||
|
|
||||||
|
__bobthefish_colors $theme_color_scheme
|
||||||
|
|
||||||
|
type -q bobthefish_colors
|
||||||
|
and bobthefish_colors
|
||||||
|
|
||||||
|
set_color normal # clear out anything bold or underline...
|
||||||
|
|
||||||
|
switch $fish_bind_mode
|
||||||
|
case default
|
||||||
|
set_color -b $color_vi_mode_default
|
||||||
|
echo -n " N$invisible_space"
|
||||||
|
case insert
|
||||||
|
set_color -b $color_vi_mode_insert
|
||||||
|
echo -n " I$invisible_space"
|
||||||
|
case replace_one replace-one
|
||||||
|
set_color -b $color_vi_mode_insert
|
||||||
|
echo -n " R$invisible_space"
|
||||||
|
case visual
|
||||||
|
set_color -b $color_vi_mode_visual
|
||||||
|
echo -n " V$invisible_space"
|
||||||
|
end
|
||||||
|
|
||||||
|
set_color normal
|
||||||
|
end
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
" goto normal mode with jk
|
|
||||||
inoremap jk <ESC>
|
|
||||||
|
|
||||||
" remove search highlighting when pressing esc
|
" ----------------------------- Own config ---------------------------
|
||||||
map <esc> :noh <CR>
|
|
||||||
|
inoremap jk <ESC> " goto normal mode with jk
|
||||||
|
map <esc> :noh <CR> " remove search highlighting when pressing esc
|
||||||
|
set number " turn on line numbers
|
||||||
|
|
||||||
|
|
||||||
|
" ----------------------------- Plugins ------------------------------
|
||||||
|
|
||||||
" --------- Plugins ----------
|
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
|
|
||||||
Plug 'justinmk/vim-sneak'
|
Plug 'justinmk/vim-sneak'
|
||||||
|
Plug 'easymotion/vim-easymotion'
|
||||||
|
Plug 'sheerun/vim-polyglot'
|
||||||
call plug#end()
|
call plug#end()
|
|
@ -0,0 +1,63 @@
|
||||||
|
|
||||||
|
# history
|
||||||
|
set -g history-limit 100000
|
||||||
|
|
||||||
|
# use vi mode
|
||||||
|
setw -g mode-keys vi
|
||||||
|
set -g status-keys vi
|
||||||
|
|
||||||
|
|
||||||
|
# easy-to-remember split pane commands
|
||||||
|
bind | split-window -h
|
||||||
|
bind - split-window -v
|
||||||
|
unbind '"'
|
||||||
|
unbind %
|
||||||
|
|
||||||
|
|
||||||
|
# moving between panes with vim movement keys
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
|
||||||
|
# resize the pane
|
||||||
|
bind-key -r J resize-pane -D 3
|
||||||
|
bind-key -r K resize-pane -U 3
|
||||||
|
bind-key -r H resize-pane -L 3
|
||||||
|
bind-key -r L resize-pane -R 3
|
||||||
|
|
||||||
|
|
||||||
|
set-option -g status-position top
|
||||||
|
|
||||||
|
|
||||||
|
# fast search - not necessary to go to copy first (will switch to copy mode automatically)
|
||||||
|
bind-key -T copy-mode-vi / command-prompt -i -p "(search down)" "send -X search-forward-incremental \"%%%\""
|
||||||
|
bind-key -T copy-mode-vi ? command-prompt -i -p "(search up)" "send -X search-backward-incremental \"%%%\""
|
||||||
|
|
||||||
|
bind / copy-mode \; command-prompt -i -p "(search up)" "send -X search-forward-incremental \"%%%\""
|
||||||
|
bind ? copy-mode \; command-prompt -i -p "(search down)" "send -X search-backward-incremental \"%%%\""
|
||||||
|
|
||||||
|
|
||||||
|
bind -T copy-mode-vi \} {
|
||||||
|
send-keys -X end-of-line
|
||||||
|
send-keys -X search-forward " "
|
||||||
|
send-keys -X end-of-line
|
||||||
|
send-keys -X search-backward " "
|
||||||
|
send-keys -X cursor-right
|
||||||
|
}
|
||||||
|
|
||||||
|
bind -T copy-mode-vi \{ {
|
||||||
|
send-keys -X start-of-line
|
||||||
|
send-keys -X search-backward " "
|
||||||
|
send-keys -X end-of-line
|
||||||
|
send-keys -X search-backward " "
|
||||||
|
send-keys -X cursor-right
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Package manager
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||||
|
set -g @plugin "arcticicestudio/nord-tmux"
|
||||||
|
|
||||||
|
run "$XDG_DATA_HOME/tmux/plugins/tpm/tpm'
|
Loading…
Reference in New Issue