From bb68ddcc3493fa906035d085f8d42a1fb3ccae16 Mon Sep 17 00:00:00 2001 From: Quentin Godefroid Date: Fri, 15 Jun 2018 11:39:33 +0200 Subject: [PATCH 1/4] work add's --- common.toml | 7 +++++-- config/tmux | 26 ++++++++++++++++++++++++++ config/zshrc | 39 ++++++++++++++++++++++++++++++++------- init | 2 +- 4 files changed, 64 insertions(+), 10 deletions(-) diff --git a/common.toml b/common.toml index 1b3da5c..b5ccc64 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"] @@ -40,7 +43,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/tmux b/config/tmux index 0947072..708037b 100644 --- a/config/tmux +++ b/config/tmux @@ -108,3 +108,29 @@ 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 '\"'; bind '\"' split-window -v -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}"' + + +# Make mouse useful in copy mode +setw -g mode-mouse on + +# Allow mouse to select which pane to use +set -g mouse-select-pane on + +# Allow mouse dragging to resize panes +set -g mouse-resize-pane on + +# Allow mouse to select windows +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" + +# Scroll History +set -g history-limit 90000 + +# Set ability to capture on start and restore on exit window data when running an application +setw -g alternate-screen on + +# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access. +set -s escape-time 50 \ No newline at end of file diff --git a/config/zshrc b/config/zshrc index 805ae9f..f919cc2 100644 --- a/config/zshrc +++ b/config/zshrc @@ -1,4 +1,4 @@ -export PATH=$HOME/bin:/usr/local/bin:$PATH +export PATH=$HOME/bin:$HOME/toolbox:/usr/local/bin:$PATH export ZSH=$HOME/.oh-my-zsh # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes @@ -305,11 +305,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 +319,32 @@ 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 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 From 3b2ae162b8853f1c6d5feaa8bf4e880972a07ac9 Mon Sep 17 00:00:00 2001 From: Quentin Godefroid Date: Fri, 15 Jun 2018 12:06:05 +0200 Subject: [PATCH 2/4] work others fixes --- config/gitconfig | 16 +++++++++------- config/nanorc | 11 ++++++----- config/zshrc | 4 ++++ 3 files changed, 19 insertions(+), 12 deletions(-) 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/zshrc b/config/zshrc index f919cc2..06bdfe3 100644 --- a/config/zshrc +++ b/config/zshrc @@ -268,6 +268,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 From e00f96f1f0c51a5c2b5655468750df8aa5b13aa2 Mon Sep 17 00:00:00 2001 From: Quentin Godefroid Date: Fri, 15 Jun 2018 12:18:48 +0200 Subject: [PATCH 3/4] d --- common.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common.toml b/common.toml index b5ccc64..c452f19 100644 --- a/common.toml +++ b/common.toml @@ -26,14 +26,14 @@ ### Tasks ### [tasks.htop] - rejects = [["which", "htop"]] - cmds = [["@install", "htop"]] links = [[".config/htop/htoprc", "config/htop"]] +# rejects = [["which", "htop"]] + cmds = [["@install", "htop"]] [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"]] From 7655d1983d7c95b15e254ff0e6cc3fdcb5c2ce56 Mon Sep 17 00:00:00 2001 From: Quentin Godefroid Date: Tue, 19 Jun 2018 15:03:15 +0200 Subject: [PATCH 4/4] some fixRemove tmux mouse < 2.1 remove tmux mouse suppor from old config < 2.1 Add ip --color as alias --- config/tmux | 28 +++------------------------- config/zshrc | 4 ++-- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/config/tmux b/config/tmux index 708037b..e44caad 100644 --- a/config/tmux +++ b/config/tmux @@ -109,28 +109,6 @@ 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 -setw -g mode-mouse on - -# Allow mouse to select which pane to use -set -g mouse-select-pane on - -# Allow mouse dragging to resize panes -set -g mouse-resize-pane on - -# Allow mouse to select windows -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" - -# Scroll History -set -g history-limit 90000 - -# Set ability to capture on start and restore on exit window data when running an application -setw -g alternate-screen on - -# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access. -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 \ No newline at end of file diff --git a/config/zshrc b/config/zshrc index 06bdfe3..d143f36 100644 --- a/config/zshrc +++ b/config/zshrc @@ -1,5 +1,4 @@ -export PATH=$HOME/bin:$HOME/toolbox:/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" @@ -343,6 +342,7 @@ 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'