Added skel with some default files to improve convenience.

This commit is contained in:
Storm Dragon 2023-08-19 08:35:35 -04:00
parent 5bae083148
commit 44cc2024fc
5 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1 @@
alias sudo='sudo '

View File

@ -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 <file>' >&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
}

24
pi4/files/skel/.bashrc Normal file
View File

@ -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

6
pi4/files/skel/.inputrc Normal file
View File

@ -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

18
pi4/files/skel/.screenrc Normal file
View File

@ -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@