Compare commits

...

5 Commits

Author SHA1 Message Date
masterzu 6263513f71
update xinirc 2024-10-30 20:02:55 +01:00
masterzu e964a95093
update bash 2024-10-30 20:02:50 +01:00
masterzu 9f0eca64ef
update dircolors 2024-10-30 19:38:41 +01:00
masterzu 6e576fa39c
fixup 2024-10-30 19:32:23 +01:00
masterzu 4ca34b43b1
update mutt 2024-10-30 19:32:23 +01:00
10 changed files with 470 additions and 220 deletions

View File

@ -5,8 +5,8 @@ alias l='ls -lh'
alias la='ls -Alh'
alias lt='ls -lrt'
alias d='ls -al | egrep ^d'
alias dl='ls -al | grep -E "^[d|l]"'
alias ll='ls -al | grep -E ^l'
alias dl='ls -al | egrep "^[d|l]"'
alias ll='ls -alh'
alias h=history
alias td='todo -c --force-colour --filter -done,+children | less -r'
alias tdall='todo --force-colour -A|less -r'
@ -68,14 +68,14 @@ alias vic='vim ~/.irssi/config'
# mutt
alias cm='cd ~/.mutt'
alias vm='vim ~/.mutt/muttrc'
alias vma='vim ~/.mutt/muttrc-alias'
alias ou='offlineimap -a upmc'
alias og='offlineimap -a gmail'
alias vma='vim ~/.mutt/alias'
# w3m
alias cw='cd ~/.w3m'
alias vw='vim ~/.w3m/config'
alias wb='w3m -B'
# fzf
alias vf='vim $(fzf --preview="head -$LINES {}")'
alias of='xdg-open "$(fzf --preview="head -$LINES {}")"'
#newsboat
alias nb=newsboat
@ -144,13 +144,6 @@ alias vss='vi ~/.config/starship.toml'
alias gt="go test | _gotestcolored"
alias gtv="go test -v | _gotestcolored"
# go buffalo
# alias bt='buffalo test | _gotestcolored'
# alias btv='buffalo test -v | _gotestcolored | less'
# force no caching in test with -count=1
alias bt="go test -p 1 -tags test subscribe subscribe/actions subscribe/grifts subscribe/mailers"
alias btv='bt -v | _gotestcolored | less '
alias pm='sudo pacman'
# end .bash_aliases

View File

@ -16,7 +16,10 @@
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
YELLOW="\[\033[0;33m\]"
BLUE="\[\033[0;34m\]"
MAGENTA="\[\033[0;35m\]"
CYAN="\[\033[0;36m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
LIGHT_YELLOW="\[\033[1;33m\]"
@ -89,7 +92,7 @@ function prompt_func() {
test "`id -ng`" != "`id -nu`" && psnewgrp="${LIGHT_GREEN}(`id -ng`)"
# [user$host]
prompt="${prompt}${COLOR_NONE}[${YELLOW}\u${psnewgrp}${COLOR_NONE}@${WHITE}\h${COLOR_NONE}]"
prompt="${prompt}${COLOR_NONE}[${YELLOW}\u${COLOR_NONE}@${WHITE}\h${COLOR_NONE}]"
# python virtualenv
test -n "$VIRTUAL_ENV" && prompt="${prompt} (env:${BLUE}$(basename $VIRTUAL_ENV)${COLOR_NONE})"
@ -115,6 +118,13 @@ function prompt_func() {
# prompt="${prompt} \w"
prompt="${prompt} $(short_path "$PWD")"
# if test $previous_return_value -eq 0
# then
# PS1="${prompt} ${GREEN}\$${COLOR_NONE} "
# else
# PS1="${prompt} ${RED}(err=${previous_return_value}) \$${COLOR_NONE} "
# fi
# test right align FIXME
# PS1=$(printf "%${COLUMNS}s \r%s" "${prompt}" "${GREEN}\$${COLOR_NONE} ")

110
.bashrc
View File

@ -26,12 +26,6 @@ shopt -s checkwinsize
## autocd
shopt -s autocd
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
# LESS options
export LESS="-FRX"
# very basic prompt -- more in .bash_prompt
PROMPT_COMMAND='PS1="[\u@\h] -- \w "; echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
@ -44,6 +38,8 @@ export BROWSER=w3m
# ... and vim is the Best
export EDITOR=vim
export PAGER=less
# very min bash aliases
alias ls='ls -F --color'
alias l='ls -l'
@ -55,6 +51,7 @@ alias wa='ssh warhol'
#
test -f ~/.bash_aliases && source ~/.bash_aliases
test -f ~/.bash_prompt && source ~/.bash_prompt
eval $(dircolors ~/.dircolors)
# shellcheck disable=SC2046
test -f ~/.dircolors && eval $(dircolors ~/.dircolors)
test -d ~/dotfiles/bash_completion && {
@ -65,6 +62,26 @@ test -d ~/dotfiles/bash_completion && {
done;
}
# man in color with less
# from https://unix.stackexchange.com/questions/108699/documentation-on-less-termcap-variables
# export LESS_TERMCAP_mb=$'\e[5;31m' # blink
# export LESS_TERMCAP_md=$'\e[1;33m' # bold
# export LESS_TERMCAP_me=$'\e[0m' # no bold, blink, underline
# export LESS_TERMCAP_so=$'\e[7m' # reverse
# export LESS_TERMCAP_se=$'\e[27m' # no reverse
# export LESS_TERMCAP_us=$'\e[4;32m' # underline
# export LESS_TERMCAP_ue=$'\e[24m' # no underline
# https://wiki.archlinux.org/title/Color_output_in_console#Using_less
export MANPAGER="less -R --use-color -Dsc -Dk+r -Dd+g -Du+c -DPgb -DEbR"
export MANROFFOPT="-P -c"
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe.sh ] && eval "$(lesspipe.sh)"
# LESS options
#export LESS="-FRX"
# startship
# https://starship.rs/
type -t starship >/dev/null && {
@ -89,7 +106,7 @@ export MANPATH=$HOME/.local/share/man:
# od it in .bash_profile if [ -e /home/patrick/.nix-profile/etc/profile.d/nix.sh ]; then . /home/patrick/.nix-profile/etc/profile.d/nix.sh; fi
# tmux dirty hack : TERM and SSH_AGENT_PID
test -n "$TMUX" && export TERM="xterm-256color"
# test -n "$TMUX" && export TERM="xterm-256color"
# use gpg-agent for gpg
# from gpg-agent(1)
@ -155,22 +172,40 @@ function _prepend_path() { _append_path -r "$1" "$2"; }
test -d "$HOME/.cargo/bin" && PATH=$(_prepend_path "$PATH" "$HOME/.cargo/bin")
### nodejs
test -d "$HOME/download/nodejs/latest/bin" && PATH=$(_prepend_path "$PATH" "$HOME/download/nodejs/latest/bin")
test -d "$HOME/src/node/current/bin" && PATH=$(_prepend_path "$PATH" "$HOME/src/node/current/bin")
# test -d "$HOME/download/nodejs/latest/bin" && PATH=$(_prepend_path "$PATH" "$HOME/download/nodejs/latest/bin")
# test -d "$HOME/src/node/current/bin" && PATH=$(_prepend_path "$PATH" "$HOME/src/node/current/bin")
### npm in user mode
# test -d "${HOME}/.npm-packages" || mkdir "${HOME}/.npm-packages"
# export NPM_PACKAGES="${HOME}/.npm-packages"
# PATH=$(_prepend_path "$PATH" "$NPM_PACKAGES/bin")
# MANPATH=$(_append_path "$MANPATH" "$NPM_PACKAGES/share/man")
test -d "${HOME}/.npm-packages" || mkdir "${HOME}/.npm-packages"
export NPM_PACKAGES="${HOME}/.npm-packages"
PATH=$(_prepend_path "$PATH" "$NPM_PACKAGES/bin")
MANPATH=$(_append_path "$MANPATH" "$NPM_PACKAGES/share/man")
### yarn
test -d "$HOME/src/yarn/latest/bin" && PATH=$(_prepend_path "$PATH" "$HOME/src/yarn/latest/bin")
# test -d "$HOME/src/yarn/latest/bin" && PATH=$(_prepend_path "$PATH" "$HOME/src/yarn/latest/bin")
### golang - default is $HOME/go/bin
export GOPATH="$HOME/go"
test -d "$HOME"/go/bin && PATH=$(_prepend_path "$PATH" "$HOME/go/bin")
### gobuffalo
type -t buffalo > /dev/null 2>&1 && eval "$(buffalo completion bash)"
function bt {
echo "bash bt $*"
local opt=
test "$#" -ne 0 && opt="-m ""$*"
# shellcheck disable=SC2086
buffalo test $opt | _gotestcolored | less -RF
}
function btv {
echo "bash btv $*"
local opt=
test "$#" -ne 0 && opt="-m ""$*"
# shellcheck disable=SC2086
buffalo test -v $opt | _gotestcolored | less -RF
}
# host specific bash
test -r "$HOME/.bashrc-${HOSTNAME}" && source "$HOME/.bashrc-${HOSTNAME}"
@ -260,7 +295,7 @@ function u () {
# mkcd
function mkcd {
test "x$1" = x && return 1
test -n "$1" || return 1
if test -d "$1"
then
echo "dir '$1' already exists"
@ -307,29 +342,27 @@ function faint () {
# chech all cert/key/csr
function openssl_check_all {
local file="$1"
test -n "${file}" || { echo "Usage: $(basename "$0") <template_file>"; return 1; }
test -f "${file}.csr" && openssl_check_csr "${file}.csr"
test -f "${file}.cert" && openssl_check_cert "${file}.cert"
test -f "${file}.cer" && openssl_check_cert "${file}.cer"
test -f "${file}.crt" && openssl_check_cert "${file}.crt"
test -f "${file}.pem" && openssl_check_cert "${file}.pem"
test -f "${file}.key" && openssl_check_key "${file}.key"
local file2;file2=$(sed 's/\./_/g' <<<"$file")
__openssl_check_all "$file"
# local file2;file2=$(sed 's/\./_/g' <<<"$file")
local file2;file2=${file//./_}
test "$file" = "$file2" && return 0
file="$file2"
test -f "${file}.csr" && openssl_check_csr "${file}.csr"
test -f "${file}.cert" && openssl_check_cert "${file}.cert"
test -f "${file}.cer" && openssl_check_cert "${file}.cer"
test -f "${file}.crt" && openssl_check_cert "${file}.crt"
test -f "${file}.pem" && openssl_check_cert "${file}.pem"
test -f "${file}.key" && openssl_check_key "${file}.key"
__openssl_check_all "$file2"
}
__openssl_check_all () {
test -e "${1}.csr" && openssl_check_csr "${1}.csr"
test -e "${1}.cert" && openssl_check_cert "${1}.cert"
test -e "${1}.cer" && openssl_check_cert "${1}.cer"
test -e "${1}.crt" && openssl_check_cert "${1}.crt"
test -e "${1}.pem" && openssl_check_cert "${1}.pem"
test -e "${1}.key" && openssl_check_key "${1}.key"
}
# check Certificate Signing Request file
function openssl_check_csr {
test -f "$1" || { echo "Usage: $(basename "$0") <csr_file>"; return 1; }
faint "# openssl req -noout -text -verify -in $1"
faint "# openssl req -noout -text -verify -in $1 | grep Subject:"
openssl req -noout -text -verify -in "$1" | grep Subject:
faint "# openssl req -noout -modulus -in $1 | openssl md5 "
openssl req -noout -modulus -in "$1" | openssl md5
@ -362,12 +395,12 @@ function openssl_check_https {
function openssl_check_protocol {
test -n "$1" || { echo "Usage: $(basename "$0") mon.site.example.com"; return 1; }
faint "# openssl s_client -servername $1 -connect $1 | egrep 'Protocol|Cipher'"
openssl s_client -servername "$1" -connect "$1" <> /dev/null | egrep 'Protocol|Cipher'
openssl s_client -servername "$1" -connect "$1" <> /dev/null | grep -E 'Protocol|Cipher'
}
# check certificat file dates
function openssl_check_cert_validity {
test -n "$1" || { echo "Usage: $(basename "$0") mon.site.example.com:443"; return 1; }
faint "# openssl s_client -servername ${1%:*} -connect '$1' < /dev/null 2>/dev/null | openssl x509 -noout -dates"
faint "# openssl s_client -servername ${1%:*} -connect $1 < /dev/null 2>/dev/null | openssl x509 -noout -dates"
openssl s_client -servername "${1%:*}" -connect "$1" < /dev/null 2>/dev/null | openssl x509 -noout -dates
#
@ -380,7 +413,7 @@ function openssl_check_cert_validity {
# le certificat
local dest_cert;dest_cert=$(mktemp)
(openssl s_client -connect "$1" < /dev/null 2>&1 | sed -n '/-----BEGIN/,/-----END/p') > "$dest_cert"
openssl s_client -connect "$1" < /dev/null 2>&1 | sed -n '/-----BEGIN/,/-----END/p' > "$dest_cert"
# la chaine de certificat
local chain_cert;chain_cert=$(mktemp)
# openssl s_client -showcerts -connect $1 < /dev/null 2>&1 | sed -n '/-----BEGIN/,/-----END/p' | sed -E '/^---/d' > $chain_cert
@ -396,6 +429,8 @@ function openssl_check_cert_validity {
faint "# openssl ocsp -issuer $onlychain_cert -cert $dest_cert -text -url $ocsp"
openssl ocsp -issuer "$onlychain_cert" -cert "$dest_cert" -url "$ocsp" -text 2>/dev/null | grep "$dest_cert" 2>/dev/null | awk -F " " '{print $2}'
# rm -rf "$dest_cert" "$chain_cert" "$onlychain_cert"
}
@ -459,7 +494,7 @@ EOT
# video
function videoprobe {
test -f "$1" || return 127
ffprobe "$1" 2>&1 | egrep 'Stream|Duration'
ffprobe "$1" 2>&1 | grep -E 'Stream|Duration'
}
function videomakefilm {
# from https://trac.ffmpeg.org/wiki/Encode/H.264
@ -511,6 +546,7 @@ comment () {
}
# terraform env
# shellcheck disable=SC1091
test -r /home/terraform/.terraform_pipelinerc && source /home/terraform/.terraform_pipelinerc
# echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK"
@ -531,7 +567,10 @@ then
PATH="/home/patrick/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/home/patrick/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/patrick/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/patrick/perl5\""; export PERL_MB_OPT;
# shellcheck disable=2089
PERL_MB_OPT='--install_base "/home/patrick/perl5"'
# shellcheck disable=2090
export PERL_MB_OPT;
fi
# pyenv
@ -549,4 +588,3 @@ export SHELLCHECK_OPTS="-x"
echo "<< .bashrc"
# end .bashrc

View File

@ -56,6 +56,8 @@ TERM screen.linux
TERM st
TERM st-256color
TERM terminator
TERM tmux
TERM tmux-256color
TERM vt100
TERM xterm
TERM xterm-16color
@ -76,9 +78,8 @@ NORMAL 0 # no color code at all
FILE 0 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 1;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
ORPHAN 1;41;36 # symlink to nonexistent file, or non-stat'able file
ORPHAN 01;41;37 # symlink to nonexistent file, or non-stat'able file
LINK 1;37 # symbolic link. (If you set this to 'target' instead of a numerical value, the color is as for the file pointed to.)
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 04;35 # door
@ -90,63 +91,151 @@ CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;32
EXEC 04;32 # This is for files with execute permission:
MULTIHARDLINK 1;4 # regular file with more than one link
# public key / certificate
.gpg 4;31
.pub 31
.pem 31
.asc 31
.pgp 31
.crt 31
# request
.csr 2;31
# private key
.key 1;31
# executables win
.cmd 01;32;41
.exe 01;32;41
.com 01;32;41
.btm 01;32;41
.bat 01;32;41
.cmd 2;32;41
.exe 2;32;41
.com 2;32;41
.btm 2;32;41
.bat 2;32;41
# Or if you want to colorize scripts even if they do not have the
# executable bit actually set.
#.sh 01;32
#.csh 01;32
.sh 32
.csh 32
.ksh 32
.zsh 32
.bash 32
.pl 32
.pm 32
.php 32
.py 32
.rb 32
.js 32
# archives (bold + italic)
.tar 3;4;32
.tgz 3;4;32
.arc 3;4;32
.arj 3;4;32
.taz 3;4;32
.lha 3;4;32
.lz4 3;4;32
.lzh 3;4;32
.lzma 3;4;32
.tlz 3;4;32
.txz 3;4;32
.tzo 3;4;32
.t7z 3;4;32
.zip 3;4;32
.z 3;4;32
.Z 3;4;32
.dz 3;4;32
.gz 3;4;32
.lrz 3;4;32
.lz 3;4;32
.lzo 3;4;32
.xz 3;4;32
.bz2 3;4;32
.bz 3;4;32
.tbz 3;4;32
.tbz2 3;4;32
.tz 3;4;32
.deb 3;4;32
.rpm 3;4;32
.jar 3;4;32
.war 3;4;32
.ear 3;4;32
.sar 3;4;32
.rar 3;4;32
.alz 3;4;32
.ace 3;4;32
.zoo 3;4;32
.cpio 3;4;32
.7z 3;4;32
.rz 3;4;32
.cab 3;4;32
# source code
.c 2;32
.cc 2;32
.h 2;32
.cpp 2;32
.hh 2;32
.go 2;32
.java 2;32
# archives (italic + underline)
.tar 3;4;33
.tgz 3;4;33
.arc 3;4;33
.arj 3;4;33
.taz 3;4;33
.lha 3;4;33
.lz4 3;4;33
.lzh 3;4;33
.lzma 3;4;33
.tlz 3;4;33
.txz 3;4;33
.tzo 3;4;33
.t7z 3;4;33
.zip 3;4;33
.z 3;4;33
.Z 3;4;33
.dz 3;4;33
.gz 3;4;33
.lrz 3;4;33
.lz 3;4;33
.lzo 3;4;33
.xz 3;4;33
.bz2 3;4;33
.bz 3;4;33
.tbz 3;4;33
.tbz2 3;4;33
.tz 3;4;33
.deb 3;4;33
.rpm 3;4;33
.jar 3;4;33
.ear 3;4;33
.sar 3;4;33
.rar 3;4;33
.alz 3;4;33
.ace 3;4;33
.zoo 3;4;33
.cpio 3;4;33
.7z 3;4;33
.rz 3;4;33
.cab 3;4;33
.iso 3;4;33
# image src
.dot 3;33
.xcf 3;33
.ps 3;33
.svg 3;33
.eps 3;33
# image formats
.jpg 33
.jpeg 033
.gif 033
.bmp 033
.pbm 033
.pgm 033
.ppm 033
.tga 033
.xbm 033
.xpm 033
.tif 033
.tiff 033
.png 033
.svg 033
.svgz 033
.mng 033
.pcx 033
.gl 033
.dl 033
.xcf 033
.xwd 033
.yuv 033
.cgm 033
.emf 033
.ico 033
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axv 033
.anx 033
.ogv 033
.ogx 033
# text documents src
.md 1;3;34
.rst 1;3;34
.txt 1;3;34
.latex 1;3;34
.tex 1;3;34
.texi 1;3;34
.texinfo 1;3;34
.1 1;3;34
.2 1;3;34
.3 1;3;34
.4 1;3;34
.5 1;3;34
.6 1;3;34
.7 1;3;34
.8 1;3;34
.9 1;3;34
# documents
.pdf 3;35
@ -154,96 +243,73 @@ MULTIHARDLINK 1;4 # regular file with more than one link
.dvi 3;35
# documents office
.odp 35
.ods 35
.odt 35
.doc 35
.docx 35
.xls 35
.xlsx 35
.ppt 35
.pptx 35
.odp 2;35
.ods 2;35
.odt 2;35
.doc 2;35
.docx 2;35
.xls 2;35
.xlsx 2;35
.ppt 2;35
.pptx 2;35
# image formats
.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
.svgz 01;35
.mng 01;35
.pcx 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
.cgm 01;35
.emf 01;35
.ico 01;35
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axv 01;35
.anx 01;35
.ogv 01;35
.ogx 01;35
# audio formats
.aac 00;36
.au 00;36
.flac 00;36
.m4a 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
.aac 36
.au 36
.flac 36
.m4a 36
.mid 36
.midi 36
.mka 36
.mp3 36
.mpc 36
.ogg 36
.ra 36
.wav 36
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axa 00;36
.oga 00;36
.spx 00;36
.xspf 00;36
.axa 36
.oga 36
.spx 36
.xspf 36
# video
.mov 1;33
.mpg 1;33
.mpeg 1;33
.m2v 1;33
.mkv 1;33
.webm 1;33
.ogm 1;33
.mp4 1;33
.m4v 1;33
.mp4v 1;33
.vob 1;33
.qt 1;33
.nuv 1;33
.wmv 1;33
.asf 1;33
.rm 1;33
.rmvb 1;33
.flc 1;33
.avi 1;33
.fli 1;33
.flv 1;33
.avi 1;33
.mov 1;33
.mp4 1;33
.mpg 1;33
.mpeg 1;33
.wmv 1;33
.flv 1;33
.webm 1;33
.mov 4;36
.mpg 4;36
.mpeg 4;36
.m2v 4;36
.mkv 4;36
.webm 4;36
.ogm 4;36
.mp4 4;36
.m4v 4;36
.mp4v 4;36
.vob 4;36
.qt 4;36
.nuv 4;36
.wmv 4;36
.asf 4;36
.rm 4;36
.rmvb 4;36
.flc 4;36
.avi 4;36
.fli 4;36
.flv 4;36
.avi 4;36
.mov 4;36
.mp4 4;36
.mpg 4;36
.mpeg 4;36
.wmv 4;36
.flv 4;36
.webm 4;36
# some other formats
.bak 2
.save 2
.sav 2
.old 2
.orig 2
.swp 2
# end .dircolors

84
.xinitrc-warhol Normal file
View File

@ -0,0 +1,84 @@
# samsung S27C450: res opt 1920x1080 avec dpi opt 76
# FIXME ne fonctionne pas en 2560x1440
xrandr --output HDMI-1-1 --primary --mode 1920x1080
# DELL U2722D
xrandr --output DP-3 --mode 1920x1080 --right-of HDMI-1-1
# my 2 monitors / lege
# samsung S27C450: res opt 1920x1080 avec dpi opt 76
#xrandr --output DVI-D-1 --primary --mode 1920x1080 --scale 1x1
#+ with samsung 3840x2160 en hidpi
#xrandr --output HDMI-1-1 --mode 3840x2160 --scale 0.5x0.5 --right-of DVI-D-1
# only HDMI-0 (droite)
# xrandr --output HDMI-0 --mode 3840x2160 --scale 1x1
# onfly disable screen
# xrandr --output HDMI-0 --off
# new dvi
# xrandr --output DVI-D-0 --mode 1920x1080 ---scale 1x1 --right-of HDMI-0
# xrandr --output DVI-D-0 --off
# notify
dunst --startup_notification &
notify-send "Running dunst" "notification daemon"
# dwm status -- compilé
# notify-send "Running slstatus" "status bar"
slstatus &
# pulse audio
# notify-send "Running pasystray" "Pulse Audio tray"
pasystray &
# udiskie - automount
# notify-send "Running udiskie" "auto-mount tool"
udiskie &
# key binding daemon
# see ~/.dxhd.sh
dxhd -b -c ~/.dxhd.sh
# autolock
# notify-send "Running xsidle.sh" "auto-lock tool"
# xsidle.sh slock &
# Xresources
# hiDPI
test -f $HOME/.Xresources-leger && xrdb -merge $HOME/.Xresources-leger
# ssh-agent
eval $(ssh-agent)
if test -f /usr/lib/ssh/x11-ssh-askpass # Archlinux
then
SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass ssh-add < /dev/null
notify-send "set SSH_ASKPASS to /usr/lib/ssh/x11-ssh-askpass"
fi
# background
test -f $HOME/.fehbg && { notify-send .fehbg; source $HOME/.fehbg; }
# xclock
# xclock -d -update 1 -strftime '%T %d %b %Y' -face 'Noto Sans-60' &
# xclock -update 1 &
## restart with Alt-Shift-Q
## (only in debug process because make dwm slow not using exec)
# while true
# do
# dwm 2> $HOME/.dwm.log
# done
# my keyboards:
# - keyboard 1 = us
# - keyboard 2 = us international
# - use right_ctrl + right_shft to change it
setxkbmap -layout us,us -variant ,intl -option grp:rctrl_rshift_toggle
## or do a simple exec
# eval $(gpg-agent --daemon) #DONT NEED TO LAUNCH IT
exec dwm 2>> $HOME/.dwm.log

View File

@ -0,0 +1,37 @@
#/usr/bin/env bash
_buffalo_complete()
{
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $(compgen -W "build db destroy dev fix generate help info new pop routes setup task test version" -- $cur) )
elif [ $COMP_CWORD -eq 2 ]; then
case "$prev" in
-*)
COMPREPLY=( $(compgen -W "h -help" -- $cur) )
;;
"pop"|"db")
COMPREPLY=( $(compgen -W "create destroy drop fix generate migrate reset schema version" -- $cur) )
;;
"destroy")
COMPREPLY=( $(compgen -W "action mailer model resource" -- $cur) )
;;
"generate")
COMPREPLY=( $(compgen -W "action docker mailer resource swagger task" -- $cur) )
;;
"help")
COMPREPLY=( $(compgen -W "build db destroy dev fix generate help info new pop routes setup task test version" -- $cur) )
;;
*)
;;
esac
fi
return 0
} &&
complete -F _buffalo_complete buffalo

View File

@ -27,9 +27,11 @@ set ispell = "aspell check"
set mail_check=90 # check mail every (s)
set timeout=15 # wait only (s) max
set editor='vim "+set spelllang=fr"'
set nowait_key
set wait_key=no
set user_agent=yes
set mime_forward=yes # set forward message as attach and not in text
set pipe_decode=yes
set pipe_decode_weed=yes
# text/html ....
alternative_order text/plain text/html
@ -85,10 +87,12 @@ bind pager <down> half-down
#
# Macros
#
macro index .r ":source ~/.mutt/muttrc<enter>" "Reload muttrc"
macro index <esc>T <untag-pattern>
# urlscan
macro index,pager \cb "<pipe-message>urlscan<enter>" "open URL in urlscan"
# urlscan/urlview
# FIXME BROKEN macro index,pager \cb "<pipe-message>urlscan<enter>" "open URL in urlscan"
macro index,pager \cb "<pipe-message>urlview<enter>" "open URL in urlview"
# save messages
macro index >I <tag-prefix><save-message>=SERVICE.INFO<enter> 'save to service info'
@ -99,13 +103,16 @@ macro index >S <tag-prefix><save-message>=SPAM<enter> 'save to SPAM'
# filtres to new/old/flag messages
macro index ,a "<limit>~A<Enter>" "Voir: all"
macro index ,n "<limit>(~N|~O|~F)<Enter>" "Voir: new/flag"
macro index ,f "<limit>~F<Enter>" "Voir: flag"
macro index ,m "<limit>(~N|~O)(~p|~P|~C info@)|~C printers@|~C proxmox@|~s 'monit alert'|~s SMART|~F<Enter>" "Voir: new+from/to me"
macro index ,M "<limit>(~p|~P|~C info@|~C printers@)|~C proxmox@|~s 'monit alert'|~s SMART|~F<Enter>" "Voir: from/to me"
macro index ,t "<limit>(~N|~O|~F) ~C tout.?ida@<Enter>" "Voir: new+toutida"
macro index ,T "<limit>~C tout.?ida@<Enter>" "Voir: toutida"
# filtres autres
macro index ,i "<limit>Demande.*inscription<Enter>" "view logwatch"
macro index ,i "<limit>Demande.*inscription<Enter>" "view inscription"
macro index >i <tag-prefix><save-message>=dalembert-inscription<enter> 'save to IMPRIMANTES'
macro index,pager .i ":set wait_key=yes<enter><tag-prefix><pipe-message>mutt_process<enter>:set wait_key=no<enter>" 'generate responses from '
# macro index,pager .i ":set wait_key=yes<enter><tag-prefix><pipe-message>mutt_process<enter>:set wait_key=no<enter>" 'generate responses from '
# macro index /c "<limit>~C su-adherents|~C diffusion-fercsup|~C bureau-sntrsjussieu|~C communication-syndicale|~C commob_jussieu|~s CGT|~s 'commission sociale'<Enter>" "view listes CGT"
macro index ,c "<limit>~C corresp_ssi@services.cnrs.fr | ~C cssi_dr2@services.cnrs.fr | ~C netadmin@listes.sorbonne-universite.fr | ~c cssi@listes.sorbonne-universite.fr | ~f support@cert-manager.com | ~s genci <Enter>" "view CSSI"
macro index >C <tag-prefix><save-message>=CSSI<enter> 'save to CSSI'
@ -114,20 +121,30 @@ macro index >L <tag-prefix><save-message>=logwatchs<enter> 'save to logwatchs'
macro index ,v "<limit>~f @brahma<Enter>" "view brahma logs"
macro index >V <tag-prefix><save-message>=VLAN<enter> 'save to VLAN'
# listes
macro index /a "<limit>~C asr@services.cnrs.fr<Enter>" "Voir: liste-ASR"
macro index >A <tag-prefix><save-message>=liste-ASR<enter> "save to liste-ASR"
macro index /d "<limit>~C @lists.debian.org<Enter>" "Voir: liste-Debian"
macro index >D <tag-prefix><save-message>=liste-DEBIAN<enter> "save to liste-DEBIAN"
macro index /h "<limit>~C hackesr@groupes.renater.fr<Enter>" "Voir: liste-hackesr"
macro index >H <tag-prefix><save-message>=liste-hackesr<enter> "save to liste-hackesr"
macro index /l "<limit>(~C @listes.upmc.fr|~C @services.cnrs.fr|~C @groupes.renater.fr|~C @pmichaud.com)<Enter>" "Voir: Listes pro"
macro index /l "<limit>(~C @listes.sorbonne-universite.fr|~C @listes.upmc.fr|~C @services.cnrs.fr|~C @groupes.renater.fr|~C @pmichaud.com|~C @lists.debian.org)<Enter>" "Voir: Listes"
macro index /m "<limit>monit<Enter>" "Voir: monit"
# get new messages by default
folder-hook INBOX push ,m
### automatic actions
# (push are executed AFTER all commands)
# (multiple push/exec will be exec in reverse order)
# delete duplicate messages
folder-hook . 'set confirmappend=yes'
folder-hook . 'push <delete-pattern>~=<enter>'
## FIXME ne marche pas
# folder-hook INBOX 'set confirmappend=no'
# folder-hook INBOX 'push ,m'
#+ get new messages by default
# folder-hook INBOX 'push <tag-pattern>CERTFR-<enter><tag-prefix><save-message>=CSSI<enter>'
#+ save CERTFR- to =CSSI
folder-hook INBOX 'push ,m'
#+ get new messages by default
# identities
macro compose \cf "<edit-from>^Umoi\_<tab>" "Select from"
@ -152,8 +169,6 @@ set date_format = "%d %b %Y a %H:%M:%S %Z"
set attribution_locale = "fr_FR.UTF-7"
set attribution="Le %d, %n a écrit :"
# delete duplicate messages
folder-hook . push "<delete-pattern>~=<enter>"
#
# headers
@ -191,14 +206,15 @@ set crypt_autosign = yes
set crypt_replysign = yes
set crypt_replyencrypt = yes
set crypt_replysignencrypted = yes
# set crypt_protected_headers_write = yes # protect subject
# set crypt_protected_headers_subject = 'Sujet Sensible (chiffré)'
set pgp_default_key = D7B87DFB479CA02E48A2383C00054A3358D16D27
# set pgp_sign_as = D7B87DFB479CA02E48A2383C00054A3358D16D27
set crypt_protected_headers_write = yes # protect subject
set crypt_protected_headers_subject = 'Sujet Sensible (chiffré)'
# OLD set pgp_default_key = D7B87DFB479CA02E48A2383C00054A3358D16D27
set pgp_default_key = A8F721C80E43073F40DF8F21B57DBE40C72FBCF4
# auto attach pub key from https://stackoverflow.com/a/67065558
macro compose y "<attach-key>`echo D7B87DFB479CA02E48A2383C00054A3358D16D27`<enter><enter><send-message>"
# Esc-k pour inclure manuellement
macro compose y "<attach-key>`echo A8F721C80E43073F40DF8F21B57DBE40C72FBCF4`<enter><enter><send-message>"
macro compose Y "<send-message>"
#

View File

@ -15,19 +15,22 @@ set use_domain
# SMTP
#
# heywood dont handle TLS -- too old version
set smtp_url=smtp://heywood.dalembert.upmc.fr
set smtp_url=smtp://smtp.dalembert.upmc.fr
unset ssl_force_tls
unset ssl_starttls
# set smtp_url=smtp://mail.lam.jussieu.fr
# vm11 new postfix
# set smtp_url=smtp://vm11
# unset ssl_force_tls
# unset ssl_starttls
#
# accounts
#
source $HOME/.mutt/accounts/archive
source $HOME/.mutt/accounts/dalembert
macro generic \Cx0 "\Cx| ~/.mutt/accounts/archive\"\n\Cx&1\"<enter><change-folder>!<enter>"
macro generic \Cx1 "\Cx| ~/.mutt/accounts/dalembert\"\n\Cx&2\"<enter><change-folder>!<enter>"
macro generic \Cx2 "\Cx| ~/.mutt/accounts/gmail\"\n\Cx&0\"<enter><change-folder>!<enter>"
#macro generic \Cx0 "\Cx| ~/.mutt/accounts/archive\"\n\Cx&1\"<enter><change-folder>!<enter>"
macro generic \Cx0 "\Cx| ~/.mutt/accounts/dalembert\"\n\Cx&1\"<enter><change-folder>!<enter>"
macro generic \Cx1 "\Cx| ~/.mutt/accounts/gmail\"\n\Cx&0\"<enter><change-folder>!<enter>"
#
# switch account with <tab>
macro index <tab> "\Cx1"

View File

@ -16,15 +16,16 @@ alias chloe2 chloees@gmail.com
# pro
alias toutida Institut ∂\'Alembert <toutida@dalembert.upmc.fr>
alias info info@dalembert.upmc.fr
alias elisee Elisée Mackagny <mackagny@dalembert.upmc.fr>
alias elisee Elisée Mackagny <elisee.mackagny@dalembert.upmc.fr>
alias ray Pascal Ray <ray@ida.upmc.fr>
alias lesaec Pascal Le Saëc <lesaec@lam.jussieu.fr>
alias popinet Stephane Popinet <stephane.popinet@upmc.fr>
alias cablage dsi-reseau@sorbonne-universite.fr
alias cablage dsi-reseau@listes.sorbonne-universite.fr
alias paola Paola Cinnella <paola.cinnella@sorbonne-universite.fr>
alias zaleski Stéphane Zaleski <stephane.zaleski@sorbonne-universite.fr>
alias katz Brian FG Katz <brian.katz@upmc.fr>
alias arnaud.antkowiak Arnaud Antkowiak <arnaud.antkowiak@upmc.fr>
alias fuster Daniel Fuster <fuster@dalembert.upmc.fr>
alias ASR ASR <asr@services.cnrs.fr>
alias dsi-certi dsi-certi@sorbonne-universite.fr
@ -43,6 +44,7 @@ alias olivier Olivier LABBEY <labbey@dalembert.upmc.fr>
alias alvaro Alvaro Veronique <veronique.alvaro@upmc.fr>
alias dupuy Sylvie Dupuy <sylvie.dupuy@sorbonne-universite.fr>
alias sylvie.dupuy Sylvie Dupuy <sylvie.dupuy@sorbonne-universite.fr>
# exterieur pro
@ -67,6 +69,7 @@ alias papi_et_nanou Papi et Nanou <nanou.escudier@gmail.com>
alias juliette Juliette Mersanne <juliette.mersanne@yahoo.fr>
alias emmanuelle Emma Chevalier <chevalier.emma@wanadoo.fr>
alias thomas Thomas Félix-François <thomas@nocive.com>
alias Matthieu.Pluvinage Matthieu Pluvinage <Matthieu.Pluvinage@shields-e.com>
alias mp Matthieu Pluvinage <Matthieu.Pluvinage@shields-e.com>
alias aziz Aziz Boutalbi <azizounet@free.fr>
alias emmanuelle.wilgenbus Emmanuelle Wilgenbus <emmanuelle.wilgenbus@gmail.com>
alias phuc-loc Phuc Loc NGUYEN <phuc-loc.nguyen@sorbonne-universite.fr>

View File

@ -11,7 +11,7 @@ color header color9 color240 "^(X-j-chkmail-Status|X-Spam-Status|X-Amavis-Spam-S
color body color40 color236 "\[[^\[]+\]"
# field in body
color body color248 color236 "^[A-Z][a-zA-Z0-9\-]*:\.*"
color body blue default "[\-\.+_a-zA-Z0-9]+@[\-\._a-zA-Z0-9]+" # Email addresses
color body brightgreen default "[\-\.+_a-zA-Z0-9]+@[\-\._a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue