diff --git a/.ksh/dotfiles.ksh b/.ksh/dotfiles.ksh new file mode 100644 index 0000000..3eee5ef --- /dev/null +++ b/.ksh/dotfiles.ksh @@ -0,0 +1,18 @@ +######################################################################## +# DOTFILES WITH GIT +######################################################################## + +alias config='git --git-dir=${HOME}/.cfg/ --work-tree=${HOME}' + +dotfiles_autoupdate() { + config add -u && \ + config commit -m "Update $(date +"%Y-%m-%d %H:%M") \ + $(uname -s)/$(uname -m)-$(hostname -s)" && config push +} + +dotfiles_init() { + git --no-replace-objects clone --bare --depth 1 \ + _gitea@git.uugrn.org:sdk/dotfiles.git $HOME/.cfg; + config config --local status.showUntrackedFiles no; + config checkout -f +} diff --git a/.ksh/prompt-bash.ksh b/.ksh/prompt-bash.ksh new file mode 100644 index 0000000..46e5955 --- /dev/null +++ b/.ksh/prompt-bash.ksh @@ -0,0 +1,5 @@ +C1="\[$(tput setaf 241)\]" # gray +C2="\[$(tput setaf 37)\]" # green +C0="\[$(tput op)\]" # reset + +PS1="${C1}[${C2}\h${C1}](${C2}${?}${C1})(${C2}\w${C1})\$ ${C0}" diff --git a/.ksh/prompt-ksh.ksh b/.ksh/prompt-ksh.ksh new file mode 100644 index 0000000..ecd7ee8 --- /dev/null +++ b/.ksh/prompt-ksh.ksh @@ -0,0 +1,10 @@ +######################################################################## +# PROMPT +######################################################################## + +C1="\[$(tput setaf 241)\]" # gray +#C2="\[$(tput setaf 208)\]" # orange +C2="\[$(tput setaf 37)\]" # green +C0="\[$(tput op)\]" # reset +x=$(print \\001) # hack from ksh(1) +PS1="$x\${C1}[\${C2}\h\${C1}](\${C2}\${?}\${C1})(\${C2}\W\${C1})\\$ \${C0}$x" diff --git a/.ksh/prompt-oksh.ksh b/.ksh/prompt-oksh.ksh new file mode 100644 index 0000000..ecd7ee8 --- /dev/null +++ b/.ksh/prompt-oksh.ksh @@ -0,0 +1,10 @@ +######################################################################## +# PROMPT +######################################################################## + +C1="\[$(tput setaf 241)\]" # gray +#C2="\[$(tput setaf 208)\]" # orange +C2="\[$(tput setaf 37)\]" # green +C0="\[$(tput op)\]" # reset +x=$(print \\001) # hack from ksh(1) +PS1="$x\${C1}[\${C2}\h\${C1}](\${C2}\${?}\${C1})(\${C2}\W\${C1})\\$ \${C0}$x"