commit c5d1a21d204f62239f7349d103445ab7b2f2c940 Author: Ian Rettig Date: Wed Mar 22 11:14:43 2023 -0400 Add old default files. diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..cd40614 --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,10 @@ +alias duh1='du --max-depth=1 -h' +alias mv='mv -i' +alias rm='rm -i' +alias vi='vim' +alias svi='sudo vi' +alias vims='vi -S' +alias cdd='cd ..' +alias cddd='cd ../..' +alias cdddd='cd ../../..' +alias cddddd='cd ../../../..' \ No newline at end of file diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..3db0616 --- /dev/null +++ b/.bashrc @@ -0,0 +1,171 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +########################################################################## +# functions for git details in command line prompt + +pwd_git() { + git rev-parse 2>/dev/null + if [ $? == 0 ]; then + GIT_BASENAME=$(basename `git rev-parse --show-toplevel`) + GIT_PREFIX="$(echo -n / && git rev-parse --show-prefix)" + + echo -n "${GIT_BASENAME}${GIT_PREFIX::-1} " + else + echo -n "${PWD/#$HOME/'~'} " + fi +} + +user_host() { + if [ $(whoami) != 'dev' ] || [ $(hostname) != 'ubuntu' ]; then + echo -n "$(whoami)@$(hostname) " + fi +} + +# needs fixed to show develop tag possibly +git_hint() { + git rev-parse 2>/dev/null + if [ $? == 0 ]; then + CMD=`git branch --show-current` + HINT=$(echo -n $(echo -n "$CMD" | grep -oP '\w+-\d+') | cut -d " " -f 1) || HINT=$(echo -n "$CMD") + HINT=$HINT | tr '\n' '\0' + + echo "($HINT)" + fi +} + +########################################################################## +# Default .bashrc options. + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +# comment if user does not want git details in command line. +show_git_details=yes + +# modified prompt creation with git details. +if [ "$show_git_details" = yes ]; then + if [ "$color_prompt" = yes ]; then + export PS1="\[\033[33m\]\$(user_host)\[\033[00m\]\$(pwd_git)\[\033[36m\]\$(git_hint)\[\033[00m\]\n$ " + else + export PS1="\$(user_host)\$(pwd_git)\$(git_hint)\n$ " + fi +else + if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' + else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' + fi +fi +unset color_prompt force_color_prompt show_git_details + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +# export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' + +# Add an "alert" alias for long running commands. Use like so: +# sleep 10; alert +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +########################################################################## +# Additional non-default settings. + +# allow core files. +ulimit -S -c unlimited diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..301ac93 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,15 @@ +[credential] + helper = store +[user] + name = Ian Rettig + email = ian.rettig@sbdinc.com +[submodule] + recursive = true + recurse = true +[core] + editor = vim + excludesFile = ~/.gitignore +[merge] + tool = kdiff3 +[diff] + tool = kdiff3 diff --git a/.hgrc b/.hgrc new file mode 100644 index 0000000..89984a3 --- /dev/null +++ b/.hgrc @@ -0,0 +1,32 @@ +# Generated by TortoiseHg settings dialog + + +[ui] +username = irettig +editor = vim +ignore = ~/.hgignore +merge = kdiff3 + + +[tortoisehg] +vdiff = kdiff3 +editor = gedit +shell = /bin/bash + + +[extensions] +strip = + +[extdiff] +cmd.kdiff3 = +[merge-tools] +kdiff3.args = $base $local $other -o $output + + +[extensions] +mercurial_keyring = /usr/lib/python2.7/site-packages/mercurial_keyring.py +mq = + +[auth] +txt.prefix = https://hg.systems.textron.com:5443/ +txt.username = irettig diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..9d30636 --- /dev/null +++ b/.vimrc @@ -0,0 +1,69 @@ +set tabstop=3 +set shiftwidth=3 +set expandtab +set mouse=a +set number +set lazyredraw +set wildmenu +set showmatch +set hlsearch +set incsearch +set foldenable +set foldlevelstart=10 +set foldnestmax=10 +set foldmethod=indent +set autoindent + +" leader to comma +let mapleader="," + +" move between tabs +nmap L :tabn +nmap H :tabp + +" move vertically in wrapped lines +nnoremap j gj +nnoremap k gk + +" (clear highlight in search) +nnoremap :nohlsearch +" fold/unfold +nnoremap za + +" move to beginning/end of line. Remap old ones +nnoremap B ^ +nnoremap E $ +nnoremap $ +nnoremap ^ + +" edit vimrc and load vimrc bindings +nnoremap ev :tabnew $MYVIMRC +nnoremap sv :source $MYVIMRC + +" save session. Open next time with vim -S +nnoremap s :mksession + +" jk is escape. Caseful if actually need to type jk. Type j and then let timer timeout +inoremap jk + +" arrow between line changes +set whichwrap+=<,>,h,l + +" formatting code +if has ('python') + map :pyf /usr/share/vim/addons/syntax/clang-format-12.py + imap :pyf /usr/share/vim/addons/syntax/clang-format-12.py +elseif has ('python3') + map :py3f /usr/share/vim/addons/syntax/clang-format-12.py + imap :py3f /usr/share/vim/addons/syntax/clang-format-12.py +endif + +function! Formatonsave() + let l:formatdiff = 1 + if has ('python') + pyf /usr/share/vim/addons/syntax/clang-format-12.py + elseif has ('python3') + py3f /usr/share/vim/addons/syntax/clang-format-12.py + endif +endfunction +autocmd BufWritePre *.h,*.c,*.cpp call Formatonsave() diff --git a/code extensions.txt b/code extensions.txt new file mode 100644 index 0000000..545a607 --- /dev/null +++ b/code extensions.txt @@ -0,0 +1,34 @@ +alefragnani.Bookmarks +atlassian.atlascode +coolbear.systemd-unit-file +cschlosser.doxdocgen +donjayamanne.githistory +eamodio.gitlens +file-icons.file-icons +Gruntfuggly.todo-tree +IBM.output-colorizer +jeff-hykin.better-cpp-syntax +mhutchie.git-graph +ms-azuretools.vscode-docker +ms-python.isort +ms-python.pylint +ms-python.python +ms-python.vscode-pylance +ms-vscode-remote.remote-containers +ms-vscode-remote.remote-ssh +ms-vscode-remote.remote-ssh-edit +ms-vscode-remote.remote-wsl +ms-vscode.cmake-tools +ms-vscode.cpptools +ms-vscode.cpptools-extension-pack +ms-vscode.cpptools-themes +ms-vscode.makefile-tools +ms-vscode.remote-explorer +njpwerner.autodocstring +notskm.clang-tidy +redhat.vscode-yaml +smcpeak.default-keys-windows +twxs.cmake +Tyriar.sort-lines +xaver.clang-format +ZainChen.json \ No newline at end of file