Initial commit

This commit is contained in:
Martin Bauer 2022-06-06 13:13:15 +02:00
commit a929bde64b
8 changed files with 140 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/.mbenv
/mbenv.tar.xz

88
buildenv.sh Executable file
View File

@ -0,0 +1,88 @@
#/bin/bash
# Folder definitions
BASE=$(pwd)
export CONFIG_IN=$(pwd)/config_in
export MB_ENV_BASE=$(pwd)/.mbenv
export INSTALL_TMP_DIR=$(pwd)/tmp_install
export XDG_CONFIG_HOME=${MB_ENV_BASE}/config
export XDG_DATA_HOME=${MB_ENV_BASE}/local/share
# create folders
mkdir $MB_ENV_BASE
mkdir $INSTALL_TMP_DIR
mkdir $XDG_CONFIG_HOME
mkdir -p $XDG_DATA_HOME
# ------------------------------------------- fish shell -----------------------------------------------------------
# portable fish: https://github.com/xxh/fish-portable
cd $MB_ENV_BASE
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
cp -r ${CONFIG_IN}/fish ${XDG_CONFIG_HOME}
# ------------------------------------------- oh my fish -----------------------------------------------------------
export OMF_CHANNEL=stable
export OMF_PATH=$XDG_DATA_HOME/omf
export OMF_CONFIG=$XDG_CONFIG_HOME/omf
FISH_EXE=${MB_ENV_BASE}/bin/fish
cp -r ${CONFIG_IN}/omf ${XDG_CONFIG_HOME}
cd $INSTALL_TMP_DIR
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install_omf
${FISH_EXE} install_omf --noninteractive
${FISH_EXE} -c "omf install"
# ------------------------------------------- bat -----------------------------------------------------------
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
cd bat*
cp bat ${MB_ENV_BASE}/bin
mkdir $XDG_CONFIG_HOME/fish/completions
cp autocomplete/bat.fish $XDG_CONFIG_HOME/fish/completions/bat.fish
# -------------------------------------------- vim ---------------------------------------------------------------
#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
cd ${INSTALL_TMP_DIR}
curl -L https://github.com/neovim/neovim/releases/download/v0.7.0/nvim.appimage > nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage --appimage-extract
cd squashfs-root/usr
cp ./bin/* ${MB_ENV_BASE}/bin/
cp -r ./lib/* ${MB_ENV_BASE}/lib/
cp -r ./share/nvim ${MB_ENV_BASE}/share/
cp -r ${CONFIG_IN}/nvim ${XDG_CONFIG_HOME}
curl -fLo "${XDG_DATA_HOME}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
cd ${MB_ENV_BASE}
ln -s nvim vi
ln -s nvim vim
# ------------------------------------------- configs -----------------------------------------------------------
cp ${CONFIG_IN}/activate.sh $MB_ENV_BASE # activation script
# ------------------------------------------- pack and cleanup ----------------------------------------------------
cd $BASE
tar -cJf mbenv.tar.xz .mbenv
rm -rf ${MB_ENV_BASE}
rm -rf ${INSTALL_TMP_DIR}

13
config_in/activate.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
export MB_ENV_BASE=$(pwd)
export XDG_CONFIG_HOME=${MB_ENV_BASE}/config
export XDG_DATA_HOME=${MB_ENV_BASE}/local/share
export PATH=${MB_ENV_BASE}/bin:${PATH}
export TERM=xterm-256color
${MB_ENV_BASE}/bin/fish.sh

View File

@ -0,0 +1,19 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end
function fish_user_key_bindings
for mode in insert default visual
bind -M $mode \cf forward-char
end
bind -M insert jk "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char force-repaint; end"
end
set -x VIRTUAL_ENV_DISABLE_PROMPT 1
set -x theme_color_scheme nord
set -x theme_nerd_fonts yes
set -x fish_prompt_pwd_dir_length 0
fish_vi_key_bindings
fish_user_key_bindings

14
config_in/nvim/init.vim Normal file
View File

@ -0,0 +1,14 @@
" goto normal mode with jk
inoremap jk <ESC>
" remove search highlighting when pressing esc
map <esc> :noh <CR>
" --------- Plugins ----------
call plug#begin()
Plug 'justinmk/vim-sneak'
call plug#end()

2
config_in/omf/bundle Normal file
View File

@ -0,0 +1,2 @@
theme bobthefish
theme default

1
config_in/omf/channel Normal file
View File

@ -0,0 +1 @@
stable

1
config_in/omf/theme Normal file
View File

@ -0,0 +1 @@
bobthefish