commit 1ed6b99593f46d271c90f549f1c05c93fac8e58e
parent cf06429902560c230c9b7c6eaee0551327c5dc05
Author: Remy Noulin <loader2x@gmail.com>
Date: Fri, 8 May 2020 20:08:10 +0200
add freebsd setup
freebsd/.bash_aliases | 135 +++++++++++++++++++++++++++++++++++++++++++++
freebsd/.bashrc | 62 +++++++++++++++++++++
freebsd/1-system.sh | 105 +++++++++++++++++++++++++++++++++++
freebsd/3-home.sh | 34 ++++++++++++
freebsd/updateHome.sh | 13 +++++
freebsd/updateHomeNoGui.sh | 45 +++++++++++++++
6 files changed, 394 insertions(+)
Diffstat:
6 files changed, 394 insertions(+), 0 deletions(-)
diff --git a/freebsd/.bash_aliases b/freebsd/.bash_aliases
@@ -0,0 +1,135 @@
+if [ -f ~/.bash_aliases_local ]; then
+ . ~/.bash_aliases_local
+fi
+
+alias al="(cat ~/.bash_aliases|grep '^alias' && cat ~/.bash_aliases_local | grep '^alias')"
+alias whal='al|grep'
+alias pss='pwgen -s -y 20 6; echo ; pwgen -s 20 6'
+alias tar="tar --use-compress-program=pbzip2"
+alias l="ls -l -h -D '%Y-%m-%d %H:%M'"
+alias la="ls -ltr -D '%Y-%m-%d %H:%M'"
+alias ll="ls -al -D '%Y-%m-%d %H:%M'"
+alias rd="rm -rf"
+alias cd..='cd ..'
+alias ..='cd ..'
+alias ...='cd ../..'
+alias suspend='sudo pm-suspend'
+alias objdump='objdump -M intel'
+alias g='git'
+alias csv='scim --txtdelim=";"'
+alias cs='column -s , -t'
+alias new='~/bin/new.sh'
+alias mk='source ~/bin/mk.sh'
+alias r='ranger'
+alias h='history'
+alias vd='vimdiff'
+alias noc="sed 's/\x1b\[[0-9;]*[a-zA-Z]//g'"
+alias td='tree -d'
+alias d='gdb -tui'
+alias da='gdb -tui --args'
+alias vb='vim `find .|pick`'
+alias vn='vim `git ls-files|pick`'
+alias c='source ~/bin/c.sh'
+alias pl='~/bin/pl.sh'
+alias vi='vim'
+
+
+# Display colors in less :
+alias less="less -R"
+alias le=less
+
+
+# apt
+alias qs="apt-cache search"
+alias qd="apt-cache show"
+alias qw="apt-get install"
+
+alias duu="du -h --max-depth=1"
+alias dfh="df -h"
+
+# Screen attach detach
+alias scr="screen -T xterm"
+alias sr="screen -r"
+alias sd="screen -d"
+alias ta="tmux attach"
+alias tad="tmux attach -d"
+
+#alias webs="w3m -no-cookie -s -W www.google.com"
+alias webs='/usr/local/bin/webs.sh'
+alias ws=webs
+alias cm="cmatrix -b -u 6 -a -C blue"
+
+alias ifconfig='/sbin/ifconfig'
+alias xus="xmodmap /usr/share/xmodmap/xmodmap.us"
+alias xse="xmodmap /usr/share/xmodmap/xmodmap.se"
+
+# easydoneit
+alias ,='edi'
+alias ,l=', ls'
+alias ,c=', cat'
+alias s='~/bin/xapianOmegaSearch.sh'
+alias ,lc=',l -s|tac'
+alias ,lt=',l -t|tac'
+alias ,a=', add -t'
+alias ,s=', search'
+# Add task at bottom of list
+alias ,bt=', topbot bottom;, cr'
+# Add task on top of list
+alias ,tt=', topbot top;, cr'
+
+# sheepy
+alias z='sheepy'
+alias ref='~/bin/ref.sh'
+alias ug='~/bin/ug.sh'
+alias zh='z -h'
+alias zc='z -c'
+alias zl='z -l'
+alias zd='z -d'
+alias zn='z -n'
+alias zm='z -m'
+alias ze='z -e'
+alias sh='spm help'
+alias sn='spm new'
+alias sp='spm publish'
+alias si='spm install'
+alias sun='spm uninstall'
+alias ssw='spm show'
+alias sup='spm update'
+alias sf='spm find'
+alias st='spm top'
+alias sht='spm hot'
+alias slt='spm latest'
+alias sw='spm whoami'
+alias spf='spm profile'
+alias sif='spm info'
+alias sT='spmTui'
+
+# git
+alias go='git checkout'
+alias gi='git commit'
+alias gia='git commit --amend'
+alias ga='git commit -a'
+alias gd='git diff'
+alias gp='git push'
+alias gl='git pull'
+alias gu='git status'
+alias gg='git log --pretty=fuller'
+alias gh='git gg'
+alias gc='git clone'
+alias gb='git blame'
+alias gs='git show --pretty=fuller'
+alias gst='git stash'
+alias gsta='git stash apply'
+alias gr='git branch -D'
+alias grt='git remote -v'
+alias gj='git log -p'
+alias gle='~/bin/gle.sh'
+alias gdf='~/bin/gdf.sh'
+alias gig='cp ~/.gittemplates/.gitignore'
+alias gad='git add'
+alias gcl='git clean -d -f'
+
+alias N='~/bin/N.sh'
+
+alias lsb="export LS_COLORS=\"no=00:fi=00:di=01;34:ln=01;35:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;31:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;35:*.au=00;35:*.flac=00;35:*.mid=00;35:*.midi=00;35:*.mka=00;35:*.mp3=00;35:*.mpc=00;35:*.ogg=00;35:*.ra=00;35:*.wav=00;35:\""
+alias lsd="export LS_COLORS=\"no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:\""
diff --git a/freebsd/.bashrc b/freebsd/.bashrc
@@ -0,0 +1,62 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# don't put duplicate lines in the history. See bash(1) for more options
+export HISTCONTROL=ignoredups
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+export HISTSIZE=100000
+export HISTFILESIZE=100000
+export HISTTIMEFORMAT="%y-%m-%d %T "
+
+# default editor
+export EDITOR=vim
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# If set, the pattern "**" used in a pathname expansion context will
+# match all files and zero or more directories and subdirectories.
+#shopt -s globstar
+
+PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h\[\e[33m\] \w\[\e[0m\] \D{%m-%d %H:%M}> "
+
+# enable color support of ls and also add handy aliases
+alias grep='grep --color=always'
+export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s"
+export LESS=' -R '
+
+alias ls='ls --color'
+
+# Alias definitions.
+# You may want to put all your additions into a separate file like
+# ~/.bash_aliases, instead of adding them here directly.
+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
+
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
+fi
+
+# unset locale forwarded by ssh
+unset LC_PAPER LC_ADDRESS LC_MONETARY LC_NUMERIC LC_TELEPHONE LC_IDENTIFICATION LC_MEASUREMENT LC_TIME LC_NAME
+
+[ -f ~/.fzf.bash ] && source ~/.fzf.bash
diff --git a/freebsd/1-system.sh b/freebsd/1-system.sh
@@ -0,0 +1,105 @@
+# download and copy to usb key
+# dd if=Downloads/FreeBSD-12.1-RELEASE-amd64-memstick.img of=/dev/sdd bs=1M conv=sync
+
+# invite user to video wheel webcamd
+# pw user mod user -G wheel
+
+# pkg install vim
+
+# ssh server setup:
+# /etc/rc.conf
+# sshd_enable="YES"
+# /etc/rc.d/sshd start
+
+# pkg install xorg
+# pw groupmod video -m user || pw groupmod wheel -m user
+# pkg install drm-kmod
+# vim /etc/rc.conf
+# >> kld_list="/boot/modules/i915kms.ko"
+# edit file
+# pkg install xdm
+# vim /etc/ttys
+# >> on line ttyv8, change the off to on
+# pkg install xfce
+# vim /etc/rc.conf
+# >> dbus_enable="YES"
+# echo ". /usr/local/etc/xdg/xfce4/xinitrc" > ~/.xinitrc
+# echo ". /usr/local/etc/xdg/xfce4/xinitrc" > ~/.xsession
+
+pkg install sshguard wget tmux gcc gdb tree py37-ranger mc htop w3m tig imagemagick curl screen mc ncftp rtorrent pbzip2 atop tcc py37-sshuttle cmatrix kpcli iftop unison graphviz hs-pandoc elinks links nmap figlet zip lynx cowsay sl rdiff-backup graphicsmagick pwgen rsync pigz pixz astyle uncrustify valgrind doxygen fish lcov slurm-wlm cloc the_silver_searcher ncdu mutt bmon cppcheck check llvm90 toilet ctags py37-mkdocs source-highlight highlight
+
+# missing
+# iotop qrencode llgal unifdef massif-visualizer valkyrie etckeeper autojump
+
+
+# dd if=Downloads/GhostBSD-20.04.1.iso of=/dev/sdd bs=4M
+# dd if=Downloads/FuryBSD-12.1-XFCE-2020042001.iso of=/dev/sdd bs=4M
+
+# furybsd:
+# /etc/rc.conf
+# linux_enable="YES"
+# kld_list="sysctlinfo cuse utouch"
+# allscreens_kdbflags="-b quiet.off"
+# dhcpcd_enable="YES"
+# webcamd_enable="YES"
+# wlans_iwm0="wlan0"
+# ifconfig_wlan0="WPA"
+# lightdm_enable="YES"
+
+# pkg
+# mesi-dri
+# mesa-libs
+# utouch-kmod
+
+# xf86-input-edev
+# xf86-input-keyboard
+# xf86-input-libinput
+# xf86-input-mouse
+# xf86-video-cirrus
+# xf86-video-scfb
+# xf86-video-vesa
+# wpa-supplicant_gui
+# webcamiod
+# doas
+# sudo
+
+
+# ghostbsd
+# /etc/rc.conf
+# kld_list="linux linux64 cuse /boot/modules/amdgpu.ko /boot/modules/radeonkms.ko /boot/modules/i915kms.ko"
+
+# pkg
+# xf86-input-synaptics
+# xf86-input-vmmouse
+# xf86-video-intel
+
+# drm-fbsd12.0-kmod
+# gpu-firmware-kmod
+
+# vim
+# sed -i 's/"syntax on/syntax on/g' /etc/vim/vimrc
+# cp vimrc.local /etc/vim/vimrc.local
+
+cp ../dotfiles/webs.sh /usr/local/bin/
+
+# git (root account)
+cp ../dotfiles/.gitconfig /root/
+mkdir /root/.gittemplates
+cp -R ../dotfiles/.gittemplates/* /root/.gittemplates/
+git config --global user.email "you@example.com"
+git config --global user.name "Your Name"
+
+# 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://spartatek.se/git/sheepy.git
+cd sheepy
+./install.sh
+spm -g install sheepyExamples
+spm -g install hidir
+
+# end
diff --git a/freebsd/3-home.sh b/freebsd/3-home.sh
@@ -0,0 +1,34 @@
+./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 ..
+
+# 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/freebsd/updateHome.sh b/freebsd/updateHome.sh
@@ -0,0 +1,13 @@
+./updateHomeNoGui.sh
+
+# i3
+mkdir ~/.i3
+cp -R ../dotfiles/.i3/* ~/.i3/
+
+# fluxbox
+mkdir ~/.fluxbox
+cp -R ../dotfiles/.fluxbox/* ~/.fluxbox/
+
+# mlterm
+mkdir ~/.mlterm
+cp -R ../dotfiles/.mlterm/* ~/.mlterm/
diff --git a/freebsd/updateHomeNoGui.sh b/freebsd/updateHomeNoGui.sh
@@ -0,0 +1,45 @@
+cp .bash_aliases ~/
+cp .bashrc ~/
+cp ../dotfiles/.gdbinit ~/
+cp ../dotfiles/.gitconfig ~/
+cp -R ../dotfiles/.gittemplates ~/
+cp ../dotfiles/.tmux.conf ~/
+mkdir ~/.vim
+cp -R ../dotfiles/.vim/* ~/.vim/
+cp ../dotfiles/.vimrc ~/
+mkdir ~/bin
+cp ../dotfiles/new.sh ~/bin/
+cp ../dotfiles/gf ~/bin/
+cp ../dotfiles/gre ~/bin/
+cp ../dotfiles/mk.sh ~/bin/
+cp ../dotfiles/updateXapianIndex.sh ~/bin/
+cp ../dotfiles/xapianOmegaSearch.sh ~/bin/
+cp ../dotfiles/ref.sh ~/bin/
+cp ../dotfiles/ug.sh ~/bin/
+cp ../dotfiles/gle.sh ~/bin/
+cp ../dotfiles/gdf.sh ~/bin/
+cp ../dotfiles/vop.c ~/bin/
+cp ../dotfiles/N.sh ~/bin/
+cp ../dotfiles/pl.sh ~/bin/
+cp ../dotfiles/c.sh ~/bin/
+sheepy -c ~/bin/vop.c
+cp ../dotfiles/gop ~/bin/
+mkdir ~/.gnupg
+cp ../dotfiles/gpg-agent.conf ~/.gnupg/
+mkdir ~/.ssh
+chmod 700 ~/.ssh
+cp ../dotfiles/.ssh/config ~/.ssh/
+mkdir ~/.w3m
+cp ../dotfiles/.w3m/config ~/.w3m/
+
+# 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