commit 43ead5d844f7190134bd7fe2171a505b42e637fc parent 6cd1b1d3460229e6dda3aa2721bd89ff18bfbb4e Author: Remy Noulin (Spartatek) <remy.noulin@spartatek.se> Date: Tue, 17 Apr 2018 20:33:46 +0200 partial setup for Arch Linux Diffstat:
| A | arch/1-system.sh | | | 81 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | arch/2-desktopSystem.sh | | | 50 | ++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | arch/3-home.sh | | | 41 | +++++++++++++++++++++++++++++++++++++++++ |
| A | arch/4-easydoneit.sh | | | 10 | ++++++++++ |
| A | arch/diffHome.sh | | | 41 | +++++++++++++++++++++++++++++++++++++++++ |
| A | arch/systemSetupCommit.sh | | | 4 | ++++ |
| A | arch/updateHome.sh | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
| A | arch/vimrc.local | | | 21 | +++++++++++++++++++++ |
8 files changed, 288 insertions(+), 0 deletions(-)
diff --git a/arch/1-system.sh b/arch/1-system.sh @@ -0,0 +1,81 @@ +## setup apt sources for non-free pacakges +#sed -i 's/stretch main/stretch main contrib non-free/g' /etc/apt/sources.list +#sed -i 's/stretch\/updates main/stretch\/updates main contrib non-free/g' /etc/apt/sources.list +## easydoneit repo +#echo 'deb http://spartatek.se/packages/ unstable/' >> /etc/apt/sources.list +# +#apt-get update -y +#apt-get upgrade -y +#apt-get remove -y vim-tiny +#apt-get install -y fail2ban net-tools curl wget tmux build-essential ruby tree apt-transport-https screen ranger mc vim ncftp p7zip-full rtorrent pbzip2 atop htop glances tcc sshuttle finger cmatrix jigdo-file openssh-server ntp kpcli iftop iotop unison qrencode python-nose python-nose2-cov python-nosexcover apt-file libpcre3-dev graphviz pandoc elinks w3m links nmap figlet zip lynx apt-src cowsay sl tig rdiff-backup imagemagick graphicsmagick emacs24-nox llgal moreutils pwgen unattended-upgrades rsync ca-certificates pigz pixz astyle uncrustify unifdef valgrind doxygen fish gdb lcov python-pip slurm tpp cloc python3-dev python3-pip silversearcher-ag ncdu mutt bmon lm-sensors cppcheck check clang-3.9 toilet erlang elixir mini-dinstall pinentry-curses exuberant-ctags mkdocs source-highlight highlight massif-visualizer valkyrie locate etckeeper autojump +# +## vim +#sed -i 's/"syntax on/syntax on/g' /etc/vim/vimrc +#cp vimrc.local /etc/vim/vimrc.local +# +## doitlive +#pip install doitlive +# +## lolcat +#gem install lolcat + +cp ../dotfiles/webs.sh /usr/local/bin/ + +## optional +#apt-get install p7zip-rar rar +#apt-get install -y --allow-unauthenticated easydoneit +# +## git (root account) +#cp ../dotfiles/.gitconfig ~/ +#mkdir ~/.gittemplates +#cp -R ../dotfiles/.gittemplates/* ~/.gittemplates/ +#git config --global user.email "you@example.com" +#git config --global user.name "Your Name" +# +## timg image viewer in terminal +#git clone https://github.com/hzeller/timg.git +#cd timg/src +#apt-get install -y libwebp-dev libgraphicsmagick++-dev +#make && make install +#cd ../.. +# +## the fuck +#pip3 install thefuck +##.bashrc: eval $(thefuck --alias) +# +## ripgrep (similar to ag) +#wget https://github.com/BurntSushi/ripgrep/releases/download/0.5.2/ripgrep-0.5.2-x86_64-unknown-linux-musl.tar.gz +#/bin/tar xvf ripgrep-0.5.2-x86_64-unknown-linux-musl.tar.gz +#cd ripgrep-0.5.2-x86_64-unknown-linux-musl/ +#mkdir -p /usr/local/share/man/man1/ +#install rg.1 /usr/local/share/man/man1/ +#install rg /usr/local/bin/ +#cd .. +# +## docker +## --allow-unauthenticated because sometimes the key doesnt get installed +#export DEBIAN_FRONTEND=noninteractive ; \ +# apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D ;\ +# echo "deb https://apt.dockerproject.org/repo debian-stretch main" > /etc/apt/sources.list.d/docker.list ;\ +# apt-get update -y -q;\ +# apt-get install --allow-unauthenticated -y -q docker-engine + +# diff-so-fancy +git clone https://github.com/so-fancy/diff-so-fancy.git +cp diff-so-fancy/diff-so-fancy /usr/local/bin/ +mkdir /usr/local/bin/lib +cp diff-so-fancy/lib/DiffHighlight.pm /usr/local/bin/lib/ + +## sheepy +#git clone https://github.com/RemyNoulin/sheepy.git +#cd sheepy +#./install.sh +#spm install sheepyExamples -g +# +## etckeeper +## error in debian stretch +#mkdir /etc/.git/hooks +#etckeeper init +# +## end +#apt-get autoremove -y diff --git a/arch/2-desktopSystem.sh b/arch/2-desktopSystem.sh @@ -0,0 +1,50 @@ +#apt-get install -y i3-wm dmenu feh fluxbox eog baobab gsetroot sweep aumix geeqie audacious mplayer xine-ui meld cifs-utils keepassx gnucash texlive texi2html tigervnc-viewer xtightvncviewer gvncviewer vnc4server tightvncserver x11vnc gitk terminator xemacs21 vim-gtk wifi-radar xsane gedit universalindentgui mlterm libsixel-bin w3m-img arandr xbacklight chromium thunar midori eclipse-cdt +# +# +## suckless st +#git clone git://git.suckless.org/st +#apt-get install -y libfontconfig1-dev libxft-dev +#export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ +#cd st +#git checkout -b local 66556d9 +#cp ../dotfiles/config.def.h st/ +#git add . +#git commit -m "my config" +#make clean install +#cd .. +# +# +## palemoon +#echo 'deb http://download.opensuse.org/repositories/home:/stevenpusser/Debian_9.0/ /' > /etc/apt/sources.list.d/palemoon.list +#wget -nv http://download.opensuse.org/repositories/home:stevenpusser/Debian_9.0/Release.key -O Release.key +#apt-key add - < Release.key +#apt-get update -y +#apt-get install -y palemoon +##apt-get install -y --allow-unauthenticated palemoon +# +# +## virtualbox +#echo 'deb http://download.virtualbox.org/virtualbox/debian stretch contrib' > /etc/apt/sources.list.d/virtualbox.list +#curl -O https://www.virtualbox.org/download/oracle_vbox_2016.asc +#apt-key add oracle_vbox_2016.asc +#apt-get update -y +#apt-get install -y virtualbox-5.1 +# +## lsix ls photos pictures in terminal +#git clone https://github.com/hackerb9/lsix.git +#cp lsix/lsix /usr/local/bin/ +# +## sc-im sc improved - vim-like spreadsheet calculator +## some libraries are missing when compiling sc-in in 1-system.sh +## here, it compiles +#apt-get install -y bison libncurses5-dev libncursesw5-dev +#git clone https://github.com/andmarti1424/sc-im.git +#cd sc-im/src +#make && make install +#cd ../.. +# +## optional +##apt-get install tilda conky celestia avidemux gnomebaker mhwaveedit kdebase kdebase-workspace gltron gtetrinet netris dillo +# +## end +#apt-get autoremove -y diff --git a/arch/3-home.sh b/arch/3-home.sh @@ -0,0 +1,41 @@ +./updateHome.sh + +#install vim vundle +git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + +# in vim run :PluginInstall +echo 'in vim run :PluginInstall' + +# fzf +git clone https://github.com/junegunn/fzf.git +cd fzf +./install --all +cd .. + +# docker for non-root users +#echo 'Setting up docker for non-root users' +#sudo gpasswd -a $USER docker +# reinitialize environment to load the new group +# starts a new shell - not good +# newgrp - + +# setup diff-so-fancy in gitconfig +# commented because it is in .gitconfig + git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" + git config --global color.ui true + + git config --global color.diff-highlight.oldNormal "red bold" + git config --global color.diff-highlight.oldHighlight "red bold 52" + git config --global color.diff-highlight.newNormal "green bold" + git config --global color.diff-highlight.newHighlight "green bold 22" + + git config --global color.diff.meta "227" + git config --global color.diff.frag "magenta bold" + git config --global color.diff.commit "227 bold" + git config --global color.diff.old "red bold" + git config --global color.diff.new "green bold" + git config --global color.diff.whitespace "red reverse" +git config --bool --global diff-so-fancy.markEmptyLines false +git config --bool --global diff-so-fancy.changeHunkIndicators false +git config --bool --global diff-so-fancy.stripLeadingSymbols false +git config --bool --global diff-so-fancy.useUnicodeRuler false diff --git a/arch/4-easydoneit.sh b/arch/4-easydoneit.sh @@ -0,0 +1,10 @@ +# easydoneit +# create default database +edi version +docker run --name xapian -p 8000:80 -v ~/easydoneit_data/tasks:/data -d --restart=always remynoulin/xapian-omega-alp + +# add xapian index update to crontab +crontab -l > tmpCron +echo '0 5 * * * /home/'$USER'/bin/updateXapianIndex.sh' >> tmpCron +crontab tmpCron +rm tmpCron diff --git a/arch/diffHome.sh b/arch/diffHome.sh @@ -0,0 +1,41 @@ +echo diff ../dotfiles/.bash_aliases ~/.bash_aliases +diff ../dotfiles/.bash_aliases ~/.bash_aliases +echo diff ../dotfiles/.bashrc ~/.bashrc +diff ../dotfiles/.bashrc ~/.bashrc +echo diff ../dotfiles/.gdbinit ~/.gdbinit +diff ../dotfiles/.gdbinit ~/.gdbinit +echo diff ../dotfiles/.gitconfig ~/.gitconfig +diff ../dotfiles/.gitconfig ~/.gitconfig +echo diff ../dotfiles/.gittemplates/hooks/prepare-commit-msg ~/.gittemplates/hooks/prepare-commit-msg +diff ../dotfiles/.gittemplates/hooks/prepare-commit-msg ~/.gittemplates/hooks/prepare-commit-msg +echo diff ../dotfiles/.tmux.conf ~/.tmux.conf +diff ../dotfiles/.tmux.conf ~/.tmux.conf +#diff -R ../dotfiles/.vim/* ~/.vim/ +echo diff ../dotfiles/.vimrc ~/.vimrc +diff ../dotfiles/.vimrc ~/.vimrc +#diff ../dotfiles/new.sh ~/bin/ +#diff ../dotfiles/updateXapianIndex.sh ~/bin/ +#diff ../dotfiles/xapianOmegaSearch.sh ~/bin/ +echo diff ../dotfiles/gpg-agent.conf ~/.gnupg/gpg-agent.conf +diff ../dotfiles/gpg-agent.conf ~/.gnupg/gpg-agent.conf +echo diff ../dotfiles/.ssh/config ~/.ssh/config +diff ../dotfiles/.ssh/config ~/.ssh/config + +# i3 +#diff -R ../dotfiles/.i3/* ~/.i3/ + +# fluxbox +#diff -R ../dotfiles/.fluxbox/* ~/.fluxbox/ + +# mc +#diff -R ../dotfiles/mc/* ~/.config/mc/ + +# ranger sixel/mlterm configuration +echo diff ../dotfiles/rc.conf ~/.config/ranger/rc.conf +diff ../dotfiles/rc.conf ~/.config/ranger/rc.conf +echo diff ../dotfiles/default.py ~/.config/ranger/colorschemes/default.py +diff ../dotfiles/default.py ~/.config/ranger/colorschemes/default.py + +echo +echo ---- +echo run ./systemSetupCommit.sh when the config is synchronized with latest commit diff --git a/arch/systemSetupCommit.sh b/arch/systemSetupCommit.sh @@ -0,0 +1,4 @@ +echo "last setup from commit:" > ~/.systemSetupCommit.txt +git show --oneline -s >> ~/.systemSetupCommit.txt +echo "Updated ~/.systemSetupCommit.txt" +cat ~/.systemSetupCommit.txt diff --git a/arch/updateHome.sh b/arch/updateHome.sh @@ -0,0 +1,40 @@ +cp ../dotfiles/.bash_aliases ~/ +cp ../dotfiles/.bashrc ~/ +cp ../dotfiles/.gdbinit ~/ +cp ../dotfiles/.gitconfig ~/ +mkdir ~/.gittemplates +cp -R ../dotfiles/.gittemplates/* ~/.gittemplates/ +cp ../dotfiles/.tmux.conf ~/ +mkdir ~/.vim +cp -R ../dotfiles/.vim/* ~/.vim/ +cp ../dotfiles/.vimrc ~/ +mkdir ~/bin +cp ../dotfiles/new.sh ~/bin/ +cp ../dotfiles/mk.sh ~/bin/ +cp ../dotfiles/updateXapianIndex.sh ~/bin/ +cp ../dotfiles/xapianOmegaSearch.sh ~/bin/ +mkdir ~/.gnupg +cp ../dotfiles/gpg-agent.conf ~/.gnupg/ +mkdir ~/.ssh +chown 700 ~/.ssh +cp ../dotfiles/.ssh/config ~/.ssh/ + +# i3 +mkdir ~/.i3 +cp -R ../dotfiles/.i3/* ~/.i3/ + +# fluxbox +mkdir ~/.fluxbox +cp -R ../dotfiles/.fluxbox/* ~/.fluxbox/ + +# mc +mkdir -p ~/.config/mc +cp -R ../dotfiles/mc/* ~/.config/mc/ + +# ranger sixel/mlterm configuration +mkdir -p ~/.config/ranger/colorschemes +cp ../dotfiles/rc.conf ~/.config/ranger/ +cp ../dotfiles/default.py ~/.config/ranger/colorschemes/ + +# save current commit in home +./systemSetupCommit.sh diff --git a/arch/vimrc.local b/arch/vimrc.local @@ -0,0 +1,21 @@ +set nocompatible +set history=10000 +set cul +set so=20 +set ic +set foldmethod=syntax +set hls +set sidescroll=1 +set autowrite +set autoread +set incsearch +set autoindent +set background=dark +set list +set listchars=tab:\|\ +set mouse= + +set undofile " Save undo's after file closes +set undodir=$HOME/.vim/undo " where to save undo histories +set undolevels=1000 " How many undos +set undoreload=10000 " number of lines to save for undo