diff --git a/common.toml b/common.toml index 8a1b043..c241b40 100644 --- a/common.toml +++ b/common.toml @@ -1,9 +1,12 @@ ### ### Macros ### -[macros.install__ubuntu] +[macros.install__debian] prefix = ["sudo", "apt-get", "install"] +[macros.install__work] + prefix = ["ovh-root", "install"] + [macros.install__arch] prefix = ["sudo", "pacman", "-S"] @@ -23,18 +26,18 @@ ### Tasks ### [tasks.htop] - rejects = [["which", "htop"]] - cmds = [["@install", "htop"]] links = [[".config/htop/htoprc", "config/htop"]] +# rejects = [["which", "htop"]] + cmds = [["@install", "htop"]] [tasks.asciinema] cmds = [["@install", "asciinema"]] links = [[".config/asciinema/config", "config/asciinema"]] [tasks.tmux] - rejects = [["which", "tmux"]] - cmds = [["@install", "tmux"]] links = [[".tmux.conf", "config/tmux"]] +# rejects = [["which", "tmux"]] + cmds = [["@install", "tmux"]] [tasks.nano] links = [[".nanorc", "config/nanorc"]] @@ -44,7 +47,7 @@ templates = [[".gitconfig", "config/gitconfig"]] [tasks.zsh] - rejects = [["which", "zsh"]] +# rejects = [["which", "zsh"]] cmds = [ ["@install", "zsh"], ["@clone", "--depth=1" ,"https://github.com/robbyrussell/oh-my-zsh.git", ".oh-my-zsh"], diff --git a/config/gitconfig b/config/gitconfig index 76cd7a5..0135c2d 100644 --- a/config/gitconfig +++ b/config/gitconfig @@ -1,14 +1,16 @@ [user] {{if eq .Env.USER "qgodefro"}} - name = "Quentin Godefroid" - email = "quentin.godefroid@corp.ovh.com" + name = "Quentin Godefroid" + email = "quentin.godefroid@corp.ovh.com" {{else if eq .Env.USER "quentin"}} - name = "Quentin Godefroid" - email = "quentin.git@godefroid.eu" + name = "Quentin Godefroid" + email = "quentin.git@godefroid.eu" {{else}} - name = "Hactarus" - email = "hactarus.git@cresi.be" + name = "Hactarus" + email = "hactarus.git@cresi.be" {{end}} [alias] - pushdev = !git push --set-upstream origin "`git branch --no-color 2>/dev/null | grep '*' | sed -e 's/\\* //'`:dev/{{ .Env.USER }}/`git branch --no-color 2>/dev/null | grep '*' | sed -e 's/\\* //'`" \ No newline at end of file + pushdev = !git push --set-upstream origin "`git branch --no-color 2>/dev/null | grep '*' | sed -e 's/\\* //'`:dev/{{ .Env.USER }}/`git branch --no-color 2>/dev/null | grep '*' | sed -e 's/\\* //'`" +[push] + default = simple \ No newline at end of file diff --git a/config/nanorc b/config/nanorc index 0fbac4a..b93226a 100644 --- a/config/nanorc +++ b/config/nanorc @@ -12,7 +12,7 @@ set constantshow # set fill -4 # set historylog # set justifytrim -set linenumbers +# set linenumbers # set locking set matchbrackets "(<[{)>]}" # set morespace @@ -49,14 +49,14 @@ set tabsize 4 # set wordchars "<_>." set titlecolor brightwhite,blue set statuscolor brightwhite,green -set selectedcolor brightwhite,magenta -set numbercolor cyan +#set selectedcolor brightwhite,magenta +#set numbercolor cyan set keycolor cyan set functioncolor green set titlecolor brightwhite,red set statuscolor brightwhite,red -set selectedcolor brightwhite,cyan -set numbercolor magenta +#set selectedcolor brightwhite,cyan +#set numbercolor magenta # set keycolor brightmagenta # set functioncolor magenta include "/usr/share/nano/*.nanorc" @@ -64,3 +64,4 @@ include "/usr/share/nano/*.nanorc" # bind M-B cutwordleft main # bind M-N cutwordright main # bind Del backspace all +set nonewlines diff --git a/config/tmux b/config/tmux index aa19fc0..b0cb168 100644 --- a/config/tmux +++ b/config/tmux @@ -109,16 +109,9 @@ if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind v; bind v split-window -h -c "#{pane_current_path}"' if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind %; bind % split-window -h -c "#{pane_current_path}"' -# Make mouse useful in copy mode -#set -g mode-mouse on -#set -g mouse-select-pane on -#set -g mouse-resize-pane on -#set -g mouse-select-window on - -# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right -# (commented out because it disables cursor navigation in vim) -#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC" - set -g history-limit 90000 set -g alternate-screen on -#set -s escape-time 50% \ No newline at end of file + +set -g mouse-utf8 on +set -g mouse on +set-option -g set-titles on diff --git a/config/zshrc b/config/zshrc index 805ae9f..d143f36 100644 --- a/config/zshrc +++ b/config/zshrc @@ -1,5 +1,4 @@ -export PATH=$HOME/bin:/usr/local/bin:$PATH -export ZSH=$HOME/.oh-my-zsh +export PATH=$HOME/bin:$HOME/toolbox:/usr/local/bin:$HOME/hosting-run-scripts/:$PATH export ZSH=$HOME/.oh-my-zsh # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes ZSH_THEME="agnoster" @@ -268,6 +267,10 @@ tmux #zsh_reload ) +zstyle :omz:plugins:ssh-agent agent-forwarding on +zstyle :omz:plugins:ssh-agent identities id_ed25519 work_201806 auberge +zstyle :omz:plugins:ssh-agent lifetime 4h + source $ZSH/oh-my-zsh.sh # User configuration @@ -305,11 +308,8 @@ setopt hist_ignore_dups #export TERM=rxvt-unicode-256color unsetopt rm_star_silent setopt auto_pushd -alias ls='ls --classify --tabsize=0 --literal --color=auto --show-control-chars --human-readable' -alias l='ls' -alias ll='ls -ahl' -alias fr='setxkbmap fr' -alias us='setxkbmap us' + +export SSH_KEY_PATH="~/.ssh/work_201806" status() { print "" @@ -322,4 +322,33 @@ status() { print "" } -alias meteo='curl -4 http://wttr.in/Roubaix' \ No newline at end of file +alias fr='setxkbmap fr' +alias us='setxkbmap us' +alias meteo='curl -4 http://wttr.in/Roubaix' +alias dl='wget -r -k -T 5 -t 2 -U '\''Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0'\'' ' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias flip='shuf -i 0-1 -n 1 | sed -e '\''s/1/Pile/'\'' -e '\''s/0/Face/'\''' +alias grep='grep --color=auto' +alias ls='ls --classify --tabsize=0 --literal --color=auto --show-control-chars --human-readable' +alias l='ls -CF' +alias la='ls -A' +alias ll='ls -lah' +alias osj='openstack -f json' +alias osc='openstack console log show' +alias oss='openstack server' +alias pass='tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs' +alias paste='pastebin -m -n Hactar' +alias psa='ps auxwwwf' +alias toph='top -cHd1' +alias vdir='vdir --color=auto' +alias ip="ip --color" + +alias gw01='z3 gw01.infra.mps.gs.ovh.net' +alias hr-admin='z3 root@hr-admin.rungs.ovh' +alias public='z3 root@public01.infra.gs.ovh.net' +alias thot_cloudweb-robot-preprod='thot '\''wss://thot.ovh.com/tail/?tk=c89ec346-ce0d-4504-b69b-b3c216e91385'\''' +alias thot_reseller-robot-preprod='thot '\''wss://thot.ovh.com/tail/?tk=e4bdf746-d041-41d3-81a5-7e4629d3e507'\''' +alias m5='sm3 ovh@mozg-mutu5.ovh.ha.ovh.net' +alias melt='sm3 gs@mozg-meltingpot.ovh.ha.ovh.net' +alias mis='sm3 mozg-mis.ovh.ha.ovh.net' \ No newline at end of file diff --git a/init b/init index 088a81c..062485c 100755 --- a/init +++ b/init @@ -1,5 +1,5 @@ #!/bin/bash -locale -a | grep -i "utf8" +locale -a | grep -i "utf8" 2>&1 > /dev/null if [[ ! $? -eq 0 ]]; then echo -e "\033[31;1mPlease install utf8 locale\033[0m" exit 1