This commit is contained in:
Hactarus 2018-06-19 13:08:14 +00:00
commit 6aad7fa7fb
6 changed files with 66 additions and 38 deletions

View file

@ -1,9 +1,12 @@
### ###
### Macros ### Macros
### ###
[macros.install__ubuntu] [macros.install__debian]
prefix = ["sudo", "apt-get", "install"] prefix = ["sudo", "apt-get", "install"]
[macros.install__work]
prefix = ["ovh-root", "install"]
[macros.install__arch] [macros.install__arch]
prefix = ["sudo", "pacman", "-S"] prefix = ["sudo", "pacman", "-S"]
@ -23,18 +26,18 @@
### Tasks ### Tasks
### ###
[tasks.htop] [tasks.htop]
rejects = [["which", "htop"]]
cmds = [["@install", "htop"]]
links = [[".config/htop/htoprc", "config/htop"]] links = [[".config/htop/htoprc", "config/htop"]]
# rejects = [["which", "htop"]]
cmds = [["@install", "htop"]]
[tasks.asciinema] [tasks.asciinema]
cmds = [["@install", "asciinema"]] cmds = [["@install", "asciinema"]]
links = [[".config/asciinema/config", "config/asciinema"]] links = [[".config/asciinema/config", "config/asciinema"]]
[tasks.tmux] [tasks.tmux]
rejects = [["which", "tmux"]]
cmds = [["@install", "tmux"]]
links = [[".tmux.conf", "config/tmux"]] links = [[".tmux.conf", "config/tmux"]]
# rejects = [["which", "tmux"]]
cmds = [["@install", "tmux"]]
[tasks.nano] [tasks.nano]
links = [[".nanorc", "config/nanorc"]] links = [[".nanorc", "config/nanorc"]]
@ -44,7 +47,7 @@
templates = [[".gitconfig", "config/gitconfig"]] templates = [[".gitconfig", "config/gitconfig"]]
[tasks.zsh] [tasks.zsh]
rejects = [["which", "zsh"]] # rejects = [["which", "zsh"]]
cmds = [ cmds = [
["@install", "zsh"], ["@install", "zsh"],
["@clone", "--depth=1" ,"https://github.com/robbyrussell/oh-my-zsh.git", ".oh-my-zsh"], ["@clone", "--depth=1" ,"https://github.com/robbyrussell/oh-my-zsh.git", ".oh-my-zsh"],

View file

@ -1,14 +1,16 @@
[user] [user]
{{if eq .Env.USER "qgodefro"}} {{if eq .Env.USER "qgodefro"}}
name = "Quentin Godefroid" name = "Quentin Godefroid"
email = "quentin.godefroid@corp.ovh.com" email = "quentin.godefroid@corp.ovh.com"
{{else if eq .Env.USER "quentin"}} {{else if eq .Env.USER "quentin"}}
name = "Quentin Godefroid" name = "Quentin Godefroid"
email = "quentin.git@godefroid.eu" email = "quentin.git@godefroid.eu"
{{else}} {{else}}
name = "Hactarus" name = "Hactarus"
email = "hactarus.git@cresi.be" email = "hactarus.git@cresi.be"
{{end}} {{end}}
[alias] [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/\\* //'`" 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

View file

@ -12,7 +12,7 @@ set constantshow
# set fill -4 # set fill -4
# set historylog # set historylog
# set justifytrim # set justifytrim
set linenumbers # set linenumbers
# set locking # set locking
set matchbrackets "(<[{)>]}" set matchbrackets "(<[{)>]}"
# set morespace # set morespace
@ -49,14 +49,14 @@ set tabsize 4
# set wordchars "<_>." # set wordchars "<_>."
set titlecolor brightwhite,blue set titlecolor brightwhite,blue
set statuscolor brightwhite,green set statuscolor brightwhite,green
set selectedcolor brightwhite,magenta #set selectedcolor brightwhite,magenta
set numbercolor cyan #set numbercolor cyan
set keycolor cyan set keycolor cyan
set functioncolor green set functioncolor green
set titlecolor brightwhite,red set titlecolor brightwhite,red
set statuscolor brightwhite,red set statuscolor brightwhite,red
set selectedcolor brightwhite,cyan #set selectedcolor brightwhite,cyan
set numbercolor magenta #set numbercolor magenta
# set keycolor brightmagenta # set keycolor brightmagenta
# set functioncolor magenta # set functioncolor magenta
include "/usr/share/nano/*.nanorc" include "/usr/share/nano/*.nanorc"
@ -64,3 +64,4 @@ include "/usr/share/nano/*.nanorc"
# bind M-B cutwordleft main # bind M-B cutwordleft main
# bind M-N cutwordright main # bind M-N cutwordright main
# bind Del backspace all # bind Del backspace all
set nonewlines

View file

@ -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 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}"' 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 history-limit 90000
set -g alternate-screen on set -g alternate-screen on
#set -s escape-time 50%
set -g mouse-utf8 on
set -g mouse on
set-option -g set-titles on

View file

@ -1,5 +1,4 @@
export PATH=$HOME/bin:/usr/local/bin:$PATH export PATH=$HOME/bin:$HOME/toolbox:/usr/local/bin:$HOME/hosting-run-scripts/:$PATH export ZSH=$HOME/.oh-my-zsh
export ZSH=$HOME/.oh-my-zsh
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster" ZSH_THEME="agnoster"
@ -268,6 +267,10 @@ tmux
#zsh_reload #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 source $ZSH/oh-my-zsh.sh
# User configuration # User configuration
@ -305,11 +308,8 @@ setopt hist_ignore_dups
#export TERM=rxvt-unicode-256color #export TERM=rxvt-unicode-256color
unsetopt rm_star_silent unsetopt rm_star_silent
setopt auto_pushd setopt auto_pushd
alias ls='ls --classify --tabsize=0 --literal --color=auto --show-control-chars --human-readable'
alias l='ls' export SSH_KEY_PATH="~/.ssh/work_201806"
alias ll='ls -ahl'
alias fr='setxkbmap fr'
alias us='setxkbmap us'
status() { status() {
print "" print ""
@ -322,4 +322,33 @@ status() {
print "" print ""
} }
alias meteo='curl -4 http://wttr.in/Roubaix' 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'

2
init
View file

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
locale -a | grep -i "utf8" locale -a | grep -i "utf8" 2>&1 > /dev/null
if [[ ! $? -eq 0 ]]; then if [[ ! $? -eq 0 ]]; then
echo -e "\033[31;1mPlease install utf8 locale\033[0m" echo -e "\033[31;1mPlease install utf8 locale\033[0m"
exit 1 exit 1