Zen
3 years ago
commit
d2ed2b130e
5 changed files with 1337 additions and 0 deletions
@ -0,0 +1,60 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
# This is a script to be run on a fresh installation of Raspbian in order to make it suitable (to me) for CLI development |
||||||
|
# ~ Zen, 2022 |
||||||
|
|
||||||
|
if [ -f "/etc/debian_version" ]; then |
||||||
|
DISTRO="debian" |
||||||
|
echo "Debian, Ubuntu, or Raspbian OS detected, proceeding with Debian-compatible AO installation." |
||||||
|
elif [ -f "/etc/arch-release" ]; then |
||||||
|
DISTRO="arch" |
||||||
|
echo Arch- or Manjaro-based OS detected, proceeding with Arch-compatible AO installation. |
||||||
|
elif [ $(uname | grep -c "Darwin") -eq 1 ]; then |
||||||
|
DISTRO="mac" |
||||||
|
echo MacOS detected, proceeding with Mac-compatible AO installation. |
||||||
|
else |
||||||
|
echo Could not detect your OS distribution. Running this script could make a mess, so installing manually is recommended. |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
echo "" |
||||||
|
|
||||||
|
install_if_needed() { |
||||||
|
if [ "$DISTRO" = "debian" ]; then |
||||||
|
for package in "$@" |
||||||
|
do |
||||||
|
if [ -z $(which $package) ]; then |
||||||
|
echo "installing" $package |
||||||
|
sudo apt install -y $package |
||||||
|
else |
||||||
|
echo $package 'already installed!' |
||||||
|
fi |
||||||
|
done |
||||||
|
|
||||||
|
else |
||||||
|
echo "Only working on Debian right now!" |
||||||
|
fi |
||||||
|
} |
||||||
|
|
||||||
|
echo "Making sure we've got the basics..." |
||||||
|
install_if_needed vim tmux zsh git silversearcher-ag |
||||||
|
echo "" |
||||||
|
|
||||||
|
echo "Getting tmux-powerline" |
||||||
|
mkdir $HOME/.tmux |
||||||
|
git clone https://github.com/erikw/tmux-powerline.git $HOME/.tmux/ |
||||||
|
echo "" |
||||||
|
|
||||||
|
echo "Copying configuration files" |
||||||
|
mkdir -p $HOME/.vim/colors |
||||||
|
cp resources/solarized.vim $HOME/.vim/colors/ |
||||||
|
cp resouces/vimrc $HOME/.vimrc |
||||||
|
cp resouces/tmux.conf $HOME/.tmux.conf |
||||||
|
cp resouces/tmux-powerline-theme.sh $HOME/.tmux/tmux-powerline/themes/default.sh |
||||||
|
echo "" |
||||||
|
|
||||||
|
echo "Installing Oh My Zsh for theming - this could take a moment" |
||||||
|
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
||||||
|
echo "Adding p10k for optimal dev experience" |
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k |
||||||
|
sed -i 's/^ZSH_THEME.*/ZSH_THEME="powerlevel10k\/powerlevel10k"/' $HOME/.zshrc |
@ -0,0 +1,34 @@ |
|||||||
|
" Zen's .vimrc file, 2022 |
||||||
|
|
||||||
|
" the basics |
||||||
|
set nocompatible " vi is for nerds, unlike vim |
||||||
|
filetype on " gotta know what we're working with |
||||||
|
filetype plugin on |
||||||
|
filetype indent on |
||||||
|
syntax enable " syntax highlighting, always and forever |
||||||
|
|
||||||
|
" a e s t h e t i c s |
||||||
|
set number " I like knowing where I am |
||||||
|
set scrolloff=10 " don't scroll right to the edge |
||||||
|
set nowrap " not a fan of wrapping lines |
||||||
|
set showmode " In case you forget when you're in normal mode |
||||||
|
let g:solarized_termcolors=256 |
||||||
|
colorscheme solarized |
||||||
|
set background=dark |
||||||
|
|
||||||
|
" Tabs |
||||||
|
set shiftwidth=4 |
||||||
|
set tabstop=4 |
||||||
|
set expandtab |
||||||
|
|
||||||
|
" Searching -- press '/' to search in vim (or '?' to search backwards) |
||||||
|
set incsearch " Highlights as you type |
||||||
|
set ignorecase |
||||||
|
set smartcase " ignore case, unless you capitalise |
||||||
|
set hlsearch |
||||||
|
set showmatch |
||||||
|
|
||||||
|
|
||||||
|
" I like to remap my escape key to jj when I'm coding |
||||||
|
inoremap jj <Esc> |
||||||
|
|
Loading…
Reference in new issue