diff --git a/pi4/files/skel/.bash_aliases b/pi4/files/skel/.bash_aliases new file mode 100644 index 0000000..4a06ced --- /dev/null +++ b/pi4/files/skel/.bash_aliases @@ -0,0 +1 @@ +alias sudo='sudo ' diff --git a/pi4/files/skel/.bash_functions b/pi4/files/skel/.bash_functions new file mode 100644 index 0000000..c4d13a6 --- /dev/null +++ b/pi4/files/skel/.bash_functions @@ -0,0 +1,21 @@ +memuse() { + ps axo rss,comm,pid \ + | awk '{ proc_list[$2] += $1; } END \ + { for (proc in proc_list) { printf("%d\t%s\n", proc_list[proc],proc); }}' \ + | sort -n | tail -n 10 | sort -rn \ + | awk '{$1/=1024;printf "%.0fMB\t",$1}{print $2}' +} + + +pdf() +{ + if [[ $# -ne 1 ]]; then + echo 'Usage: pdf ' >&2 + else + local dir=$(mktemp -d -p /tmp pdf_conversion.XXXXXX) + local outFile="${1##*/}" + local outFile="${outFile%.*}" + pdftohtml -noframes -i -s "$1" "${dir}/${outFile}.html" + w3m -s "${dir}/${outFile}.html" + fi +} diff --git a/pi4/files/skel/.bashrc b/pi4/files/skel/.bashrc new file mode 100644 index 0000000..65f57bd --- /dev/null +++ b/pi4/files/skel/.bashrc @@ -0,0 +1,24 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +#Change directories without using cd +shopt -s autocd + +# Keep bash history in screen +export HISTFILE="${HISTFILE}${WINDOW:+.${WINDOW}}" + +# load Aliases and functions +[[ -f ".bash_aliases" ]] && source .bash_aliases +[[ -f ".bash_functions" ]] && source .bash_functions +#Invironment variables +PS1='[\u@\h \W] \$ ' +export DIALOGOPTS='--no-lines --visit-items' +GPG_TTY=$(tty) +export GPG_TTY +# Don't put commands prefixed with space, or duplicate commands in history +export HISTCONTROL=ignoreboth + diff --git a/pi4/files/skel/.inputrc b/pi4/files/skel/.inputrc new file mode 100644 index 0000000..0dcf6ea --- /dev/null +++ b/pi4/files/skel/.inputrc @@ -0,0 +1,6 @@ +# Reload changes with control+x followed by control+r +set echo-control-characters off + +# History searching with up and down arrows. +"\e[A": history-search-backward +"\e[B": history-search-forward diff --git a/pi4/files/skel/.screenrc b/pi4/files/skel/.screenrc new file mode 100644 index 0000000..bd20ce3 --- /dev/null +++ b/pi4/files/skel/.screenrc @@ -0,0 +1,18 @@ +vbell off +bell_msg "" +hardstatus off +startup_message off +defscrollback 4096 +bind ! select 10 +bind @ select 11 +bind \# select 12 +bind $ select 13 +bind % select 14 +bind ^ select 15 +bind & select 16 +bind * select 17 +bind ( select 18 +bind ) select 19 +bind b eval "writebuf" 'exec !!! xclip -selection "clipboard" -i /tmp/screen-exchange' +#termcapinfo xterm|xterms|xs|rxvt ti@:te@ +termcapinfo xterm* ti@:te@