diff options
| author | Marc Vertes <mvertes@free.fr> | 2020-01-05 10:28:54 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2020-01-05 10:28:54 +0100 |
| commit | e0c4cb9e45f339883d9ae7aeb52958c95c5ed839 (patch) | |
| tree | 42d9b12c73da23df89fc306d71d760227f0f7697 | |
| parent | aadfbdd2c890dfe277dbd25739241e864dbd74a5 (diff) | |
update .profile and bashrc
| -rw-r--r-- | .Xresources | 53 | ||||
| -rw-r--r-- | .bashrc | 72 | ||||
| -rw-r--r-- | .profile | 9 | ||||
| -rw-r--r-- | .profile-g5 | 2 | ||||
| -rw-r--r-- | .profile-swift | 3 |
5 files changed, 139 insertions, 0 deletions
diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..9bc5e4b --- /dev/null +++ b/.Xresources @@ -0,0 +1,53 @@ +! uncomment following to display corretly using font 10x20 +! URxvt.boldFont: +URxvt.transparent: false +URxvt.scrollBar: False +URxvt.intensityStyles: False +URxvt.colorBD: blue3 +URxvt.colorUL: magenta3 +URxvt.cursorColor: red +! URxvt.color12: rgb:5c/5c/ff +URxvt.font: xft:Mono:size=12 +URxvt.letterSpace: -1 +URxvt.perl-ext-common: font-size +URxvt.keysym.C-Prior: font-size:increase +URxvt.keysym.C-Next: font-size:decrease +URxvt.foreground: grey90 +URxvt.background: black + +xterm*termName: xterm-256color +xterm*VT100.Translations: #override \ + Ctrl <Key> Next: smaller-vt-font() \n\ + Ctrl <Key> Prior: larger-vt-font() \n +! xterm*font: 7x14 + +! Black + DarkGrey +*color0: #000000 +*color8: #555753 +! DarkRed + Red +*color1: #ff6565 +*color9: #ff8d8d +!*color1: #803232 +!*color9: #982b2b +! DarkGreen + Green +!*color2: #93c44f +!*color10: #c8e7a8 +*color2: #93b44f +*color10: #c8d7a8 +!*color2: #5b762f +!*color10: #89b83f +! DarkYellow + Yellow +*color3: #eab93d +*color11: #ffc123 +! DarkBlue + Blue +*color4: #204a87 +*color12: #3465a4 +! DarkMagenta + Magenta +*color5: #ce5c00 +*color13: #f57900 +!DarkCyan + Cyan (both not tango) +*color6: #89b6e2 +*color14: #46a4ff +! LightGrey + White +*color7: #cccccc +*color15: #ffffff @@ -0,0 +1,72 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +export EDITOR=vim +export HISTIGNORE=ls:ps:history +export HISTCONTROL=ignoreboth:erasedups # no start space and duplicate entries +export HISTSIZE=100000 # big big history +export HISTFILESIZE=100000 # big big history +shopt -s histappend # append to history, don't overwrite it + +# Save and reload the history after each command finishes +#export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" + +# Change font for urxvt. Examples: +# cf 9x15 +# cf xft:Monospace:size=12 +# cf "xft:Bitstream Vera Sans Mono:size=8:antialias=true +cf() { printf '\e]710;%s\007' "${1:-fixed}"; } + +p() { [ -f "$1" -a ! -x "$1" ] && less -XF $1 || "$@" 2>&1 | less -XF ; } + +fixab() { printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 "$1"; } + +# Less: use colors in place of bold/underline +# red: 1, green: 2, yellow: 3, blue: 4, magenta: 5, cyan: 6, grey: 7, black: 8 +#export LESS_TERMCAP_md=$(tput setaf 4) # bold (blue) +#export LESS_TERMCAP_me=$'\E[0m' # end bold +#export LESS_TERMCAP_us=$(tput setaf 5) # underline (magenta) +#export LESS_TERMCAP_ue=$'\E[0m' # end underline + +# Stopwatch +alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' + +export TERMINAL=xt + +alias cl='cf xft:Mono:size=12' +alias ls='ls --color=auto' +alias ll='ls -alF' +alias git='hub' +alias go11='go1.11.13' +alias go12='go1.12.9' +alias go13='go.1.13.1' +alias gob='go build' +alias goh='p go help' +alias god='p go doc' +alias gtr='go test -run' +alias gtb='go test -cpuprofile cpu.out -memprofile mem.out -benchmem -bench' +alias vi='vim' +alias rvi='sudo vim' +alias rxt='sudo xt' +alias rxvi='sudo xvi' + +alias uc='systemctl --user' +alias wpa='sudo wpa_gui -i wlo1' + +alias ifre='echo "ip link set wlo1 down; ip link set wlo1 up"|sudo sh' + +alias by='go build cmd/yaegi/yaegi.go' +alias cy='cd ~/go/src/github.com/containous/yaegi' +alias ya='rlwrap -pblue ./yaegi' +alias dya='YAEGI_AST_DOT=1 YAEGI_CFG_DOT=1 ya' + +#PS1='[\u@\h \W]\$ ' + +# Display git status in prompt +. ~/.bash-powerline.sh + +. $ROOT/usr/share/bash-completion/bash_completion diff --git a/.profile b/.profile new file mode 100644 index 0000000..afa89c1 --- /dev/null +++ b/.profile @@ -0,0 +1,9 @@ +# ~/.profile + +[ -f /etc/hostname ] && HOSTNAME=$(cat /etc/hostname) || HOSTNAME=$(cat ~/.hostname) + +export PATH=~/bin:$PATH:~/go/bin + +[ "${SHELL##*/}" = bash ] && [ -f ~/.bashrc ] && . ~/.bashrc + +[ -f ~/.profile-$HOSTNAME ] && . ~/.profile-$HOSTNAME diff --git a/.profile-g5 b/.profile-g5 new file mode 100644 index 0000000..9e46e7c --- /dev/null +++ b/.profile-g5 @@ -0,0 +1,2 @@ +# root prefix when running in termux +export ROOT=/data/data/com.termux/files diff --git a/.profile-swift b/.profile-swift new file mode 100644 index 0000000..dbf7f9a --- /dev/null +++ b/.profile-swift @@ -0,0 +1,3 @@ +# Profile specific for swift machine +# auto start X11 when logged on first terminal +[ "$(tty)" != /dev/tty1 ] || exec startx |
