diff --git a/bash/.bash_ps1 b/bash/.bash_ps1 index fb8f9b7..69b6dba 100644 --- a/bash/.bash_ps1 +++ b/bash/.bash_ps1 @@ -89,7 +89,7 @@ __git_ps1 () fi } -if [ $HOSTNAME = "franks" ]; then +if [ $HOSTNAME = "frankslim" ]; then IntroCol=$BIBlack; else IntroCol=$BIRed; @@ -127,6 +127,10 @@ __prompt_command() { PS1+=" $Yellow$PathShort$Color_Off\$ " fi + if [[ "$KUBECONFIG" =~ (.*pikprod.*|.*rapace.*) ]]; then + PS1+="${URed}PIKPROD !!${Color_Off}" + fi + PS1+="\n" } diff --git a/bash/.bashrc b/bash/.bashrc index 4942ad7..869d318 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -62,6 +62,8 @@ source ~/.bash_ps1 #### ALIAS #### ############### # {{{ +alias dive='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive:latest' +alias g='grep' alias hget='curl' alias hpost='curl -X POST' alias hdelete='curl -X DELETE' @@ -72,9 +74,10 @@ alias nshttp='NSH_HTTP=http NSH_PORT=8888 nsh localhost' alias kl='kubectl' alias klks='kubectl -n kube-system' alias kp='kubectl -n pasika' -alias change_yubikey='pkill gpg-agent ssh-agent pinentry ; eval $(gpg-agent --daemon --enable-ssh-support) ; gpg-connect-agent updatestartuptty /bye' +alias change_yubikey='gpg-connect-agent "scd serialno" "learn --force" /bye' alias dockerdns=' docker run -d --hostname dns.mageddo --restart=unless-stopped -p 5380:5380 -v /var/run/docker.sock:/var/run/docker.sock -v /etc/resolv.conf:/etc/resolv.conf -d defreitas/dns-proxy-server' alias flake='docker run --rm -v $(pwd):/data -it gitlab.infomaniak.ch:4567/production-purple/ci/flake8/master:latest flake8 --ignore=E266,E303,E501,W391,E722,W503,F403,F405 --max-line-length=110 --exclude=venv,__pycache__ /data' +alias hadolint='docker run --rm -v $(pwd):/data -it hadolint/hadolint:latest-debian hadolint /data/Dockerfile' alias dockre='docker' alias dokcer='docker' alias connect='ssh ra "sudo issh ra /home/scripts/connect $1"' @@ -585,8 +588,9 @@ alias dockip='docker inspect --format "{{ .NetworkSettings.IPAddress }}"' SSHAGENT=/usr/bin/ssh-agent SSHAGENTARGS="-s" if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then - eval `$SSHAGENT $SSHAGENTARGS` - trap "kill $SSH_AGENT_PID" 0 + #eval `$SSHAGENT $SSHAGENTARGS` + #trap "kill $SSH_AGENT_PID" 0 + true fi ############### @@ -599,12 +603,12 @@ GPG_TTY=`tty` export GPG_TTY export GPGKEY=016106A6AF223DBE -export PATH=$PATH:$DEVKITARM/bin -export MANPATH=$MANPATH:$DEVKITARM/man export GOPATH=~/Programmation/ export PATH=$PATH:~/Programmation/dotfiles/Utils +export PATH=$PATH:/home/frank/Programmation/frank/ti.py +export PATH=$PATH:/home/frank/Programmation/pasika/utils/tools export HISTCONTROL=erasedups export HISTSIZE=99999999 @@ -614,16 +618,23 @@ export PATH="$HOME/opt/cross/bin:$PATH" PATH=$PATH:/home/frank/Programmation/kubectx -export KUBECONFIG=$(echo ~/.kube/*yml | tr ' ' ':') +PATH=$PATH:$GOPATH/bin +#export KUBECONFIG=$(echo ~/.kube/*yml | tr ' ' ':') +#export KUBECONFIG=~/.kube/macmini.yaml #Launch startx when login [[ -z $DISPLAY && $XDG_VTNR -le 4 && -z $SSH_CLIENT ]] && exec startx +export SENTRY_DSN='https://d0e5f2206479445ca88a427171d05f70@sentry.purple.infomaniak.ch/43' source ~/.env-secrets export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh source /etc/profile.d/bash_completion.sh source <(kubectl completion bash) # completion will save a lot of time and avoid typo source <(kubectl completion bash | sed 's/kubectl/kl/g' ) # so completion works with the alias "k" +source <(kubectl completion bash | sed 's/kubectl/klks/g' ) # so completion works with the alias "k" +source <(kubectl completion bash | sed 's/kubectl/kp/g' ) # so completion works with the alias "k" +. <(flux completion bash) eval "$(direnv hook bash)" +export KUBECONFIG=/home/frank/Programmation/pasika/management/dev-env/pasika_dev_kubeconfig diff --git a/git/.gitconfig b/git/.gitconfig index 6582478..8b49e0c 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -22,11 +22,16 @@ psh = push undo-commit = reset --soft HEAD^ tag = tag -s + open = "!f() { local url=$(git remote get-url origin | tr ':' '/' | sed -e 's|///|://|' -e 's|git@|https://|' -e 's/.git$//')/$1; echo opening $url; xdg-open $url; }; f" + open-ci = !git open pipelines + open-mr = !git open merge_requests + ap = add --patch [core] editor = vim excludesfile = ~/.gitignore hooksPath = .githooks + abbrev = 12 [merge] tool = vimdiff @@ -39,3 +44,10 @@ [credential] helper = cache +[filter "lfs"] + process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f +[init] + defaultBranch = main diff --git a/graphical/.xinitrc b/graphical/.xinitrc index 336bacb..04e9e25 100644 --- a/graphical/.xinitrc +++ b/graphical/.xinitrc @@ -25,6 +25,9 @@ xbindkeysrc & #My pinkie hurts :'( xmodmap ~/.Xmodmap +export GTK_IM_MODULE=xim # Make compose key work on FF et al +export QT_IM_MODULE=xim + $OCTOPUS init-all 1>> /dev/shm/Octopus_logs 2>> /dev/shm/Octopus_logs & #The status bar @@ -51,6 +54,7 @@ redshift -l 46:6 || true & xautolock -time 4 -locker slock & +xrdb /home/frank/.Xresources #ssh-agent -t 10 /home/frank/Programmation/dotfiles/dwm/dwm /home/frank/Programmation/dotfiles/dwm/dwm diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc index 9eb3834..6f8143b 100644 --- a/vim/.vim/vimrc +++ b/vim/.vim/vimrc @@ -186,7 +186,9 @@ au BufRead,BufNewFile *.js set ts=4 sw=4 "Automatic documentation -autocmd BufNewFile,BufRead *.yml set autoindent ts=2 sw=2 +autocmd BufNewFile,BufRead *.yml set autoindent ts=2 sw=2 expandtab +autocmd BufNewFile,BufRead *.sh set autoindent ts=2 sw=2 noexpandtab +autocmd BufNewFile,BufRead *.yaml set autoindent ts=2 sw=2 expandtab autocmd BufNewFile,BufRead *.py set keywordprg=pydoc ts=4 sw=4 expandtab autocmd BufNewFile,BufRead *.php set autoindent ts=4 sw=4 keywordprg=~/.vim/scripts/doc.php.sh autocmd BufNewFile,BufRead *.R set ts=4 sw=4 keywordprg=~/.vim/scripts/doc.R.sh