diff --git a/unprocessed/bash/bash_profile b/unprocessed/bash/bash_profile deleted file mode 100644 index 3a27f3a..0000000 --- a/unprocessed/bash/bash_profile +++ /dev/null @@ -1,5 +0,0 @@ -[[ -f ~/.bashrc ]] && source ~/.bashrc - -if [[ ! $DISPLAY && $XDG_VTNR && $XDG_VTNR -le 3 ]]; then - exec startx "$XINITRC" -fi diff --git a/unprocessed/bash/bashrc b/unprocessed/bash/bashrc deleted file mode 100644 index 0ee79bf..0000000 --- a/unprocessed/bash/bashrc +++ /dev/null @@ -1,27 +0,0 @@ -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -# == Add personal bin directory to PATH -if ! [[ "${PATH}" =~ "${HOME}/.local/bin" ]]; then - export PATH=${HOME}/.local/bin:${PATH} -fi - -# == Add custom scripts directory to PATH -if ! [[ "${PATH}" =~ "${HOME}/.local/scripts" ]]; then - export PATH=${HOME}/.local/scripts:${PATH} -fi - -export XDG_CONFIG_HOME=${HOME}/.local/config -export XDG_DATA_HOME=${HOME}/.local/share -export XDG_CACHE_HOME=${HOME}/.local/cache -export XDG_STATE_HOME=${HOME}/.local/state -export LOG_HOME="${XDG_STATE_HOME}/logs" - -# == load all enabled scripts in ~/.bashrc.d -# == any scripts with the .disabled extension won't be loaded -for f in $(find ${XDG_CONFIG_HOME}/bash/bashrc.d -mindepth 1 -maxdepth 1 -type f -not -iname *.disabled | sort); do source $f; done - -# == Run tmux in the default session whenever a terminal session starts -if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then - exec tmux new-session -A -s main -fi diff --git a/unprocessed/bash/bashrc.d/X11 b/unprocessed/bash/bashrc.d/X11 deleted file mode 100644 index 1d8aa87..0000000 --- a/unprocessed/bash/bashrc.d/X11 +++ /dev/null @@ -1,4 +0,0 @@ -## Description: Bash configuration for X11. -## vim: ft=sh : - -export XINITRC=${XDG_CONFIG_HOME}/X11/xinitrc diff --git a/unprocessed/bash/bashrc.d/aliases b/unprocessed/bash/bashrc.d/aliases deleted file mode 100644 index e6fbc29..0000000 --- a/unprocessed/bash/bashrc.d/aliases +++ /dev/null @@ -1,31 +0,0 @@ -## Description: All aliases are defined here. -## vim: ft=sh : - -alias ls='ls --color=auto' -alias ll='ls -laF' -alias la='ls -A' -alias l='ls -CF' - -alias rm='rm -i' -alias mv='mv -i' -alias cp='cp -i' - -alias grep='grep --color=auto' -alias fgrep='fgrep --color=auto' -alias egrep='egrep --color=auto' - -alias systemctl='sudo systemctl' -alias journalctl='sudo journalctl' - -# aliases for pacman -if [[ -x $( command -v pacman ) ]]; then - alias pacman='sudo pacman' - alias pacupdate='sudo pacman -Syu --noconfirm' -fi - -alias pwgen="pwgen -s -c -n" -alias dc="docker-compose" - -alias vim="nvim" -alias view="nvim -R" -alias vimdiff="nvim -d" diff --git a/unprocessed/bash/bashrc.d/ansible b/unprocessed/bash/bashrc.d/ansible deleted file mode 100644 index 71e1b40..0000000 --- a/unprocessed/bash/bashrc.d/ansible +++ /dev/null @@ -1,7 +0,0 @@ -## Description: Bash configuration for Ansible. -## vim: ft=sh : - -export ANSIBLE_CONFIG=${XDG_CONFIG_HOME}/ansible/ansible.cfg -export ANSIBLE_INVENTORY=${XDG_CONFIG_HOME}/ansible/hosts.yml -export ANSIBLE_LOCAL_TEMP=${XDG_CACHE_HOME}/ansible -export ANSIBLE_COLLECTIONS_PATH=${XDG_DATA_HOME}/ansible/collections diff --git a/unprocessed/bash/bashrc.d/docker b/unprocessed/bash/bashrc.d/docker deleted file mode 100644 index ab8229d..0000000 --- a/unprocessed/bash/bashrc.d/docker +++ /dev/null @@ -1,3 +0,0 @@ -## vim: ft=sh : - -export DOCKER_CONFIG=${XDG_CONFIG_HOME}/docker diff --git a/unprocessed/bash/bashrc.d/exercism b/unprocessed/bash/bashrc.d/exercism deleted file mode 100644 index fe62a5a..0000000 --- a/unprocessed/bash/bashrc.d/exercism +++ /dev/null @@ -1,8 +0,0 @@ -## File: ~/.bashrc.d/exercism -## Description: Bash completion for exercism -## vim: ft=sh : - -# == Bash completion for exercism -if [ -f ${HOME}/.config/exercism/exercism_completion.bash ]; then - source ~/.config/exercism/exercism_completion.bash -fi diff --git a/unprocessed/bash/bashrc.d/functions b/unprocessed/bash/bashrc.d/functions deleted file mode 100644 index 785f49c..0000000 --- a/unprocessed/bash/bashrc.d/functions +++ /dev/null @@ -1,29 +0,0 @@ -## Description: All aliases are defined here. -## vim: ft=sh : - -# mkcd creates a new directory (including the parent directories if they don't exist) -# and makes it the current directory. -mkcd() { - mkdir -p $1 - cd $1 -} - -# go_up() navigates up a specified number of parent directories. -# Inspired from DT's up() function: -# https://gitlab.com/dwt1/dotfiles/-/blob/80632c5cad56ac96955e0ca1d582a4b59741bace/.bashrc#L109 -go_up() { - local d="" - local steps="$1" - - if [ -z "$steps" ] || [ "$steps" -lt 1 ]; then - steps=1 - fi - - for ((i=1; i<=steps; i++)); do - d="../$d" - done - - if ! cd "$d"; then - echo "Unable to go up $steps directories." - fi -} diff --git a/unprocessed/bash/bashrc.d/git b/unprocessed/bash/bashrc.d/git deleted file mode 100644 index 55c8e42..0000000 --- a/unprocessed/bash/bashrc.d/git +++ /dev/null @@ -1,10 +0,0 @@ -## File: ~/.bashrc.d/git -## Description: Bash configuration for Git -## vim: ft=sh : - -if [ -f /usr/share/bash-completion/completions/git ]; then - source /usr/share/bash-completion/completions/git -fi - -alias g="git" -complete -o bashdefault -o default -o nospace -F __git_wrap__git_main g diff --git a/unprocessed/bash/bashrc.d/gnupg b/unprocessed/bash/bashrc.d/gnupg deleted file mode 100644 index fdce781..0000000 --- a/unprocessed/bash/bashrc.d/gnupg +++ /dev/null @@ -1,4 +0,0 @@ -## vim: ft=sh : - -export GPG_TTY=$(tty) -export GNUPGHOME=${XDG_DATA_HOME}/gnupg diff --git a/unprocessed/bash/bashrc.d/go b/unprocessed/bash/bashrc.d/go deleted file mode 100644 index 5d2740f..0000000 --- a/unprocessed/bash/bashrc.d/go +++ /dev/null @@ -1,30 +0,0 @@ -## Description: Bash configuration for the Go setup -## vim: ft=sh : - -if [ -f "${HOME}/.local/software/go/bin/go" ]; then - export GOPATH=${XDG_DATA_HOME}/go - export GOROOT=${HOME}/.local/software/go - export GOBIN=${HOME}/.local/goblin - - if ! [[ "${PATH}" =~ "${GOBIN}" ]]; then - export PATH=${GOBIN}:${PATH} - fi - - if ! [ -d "${GOPATH}" ]; then - mkdir ${GOPATH} - fi - - if ! [ -d "${GOBIN}" ]; then - mkdir ${GOBIN} - fi - - export GOOS=linux - export GOARCH=amd64 - export CGO_ENABLED=0 -fi - -# Magefile stuff -if [ -x "$( command -v mage )" ]; then - export MAGEFILE_CACHE=${XDG_CACHE_HOME}/magefile - export MAGEFILE_ENABLE_COLOR=true -fi diff --git a/unprocessed/bash/bashrc.d/history b/unprocessed/bash/bashrc.d/history deleted file mode 100644 index 4104c9b..0000000 --- a/unprocessed/bash/bashrc.d/history +++ /dev/null @@ -1,21 +0,0 @@ -## File: ~/.bashrc.d/history -## Description: Configuration for Bash history -## vim: ft=sh : - -# The name of the history file. -HISTFILE=${XDG_STATE_HOME}/bash/history - -# Don't put duplicate lines or lines starting with space in the history. -HISTCONTROL=ignoreboth - -# The maximum number of lines in the history file. -HISTFILESIZE=10000 - -# The number of commands to remember in the command history. -HISTSIZE=1000 - -# Display the timestamp of each command in history using the below format. -HISTTIMEFORMAT="%d/%m/%y %T: " - -# Append to the history file, don't overwrite it. -shopt -s histappend diff --git a/unprocessed/bash/bashrc.d/kubectl b/unprocessed/bash/bashrc.d/kubectl deleted file mode 100644 index 60ec097..0000000 --- a/unprocessed/bash/bashrc.d/kubectl +++ /dev/null @@ -1,9 +0,0 @@ -## Description: Bash settings for kubectl -## vim: ft=sh : -export KUBECONFIG=${XDG_CONFIG_HOME}/kube/config - -if [ -x "$( command -v kubectl )" ]; then - source <(kubectl completion bash) - alias k='kubectl' - complete -F __start_kubectl k -fi diff --git a/unprocessed/bash/bashrc.d/less b/unprocessed/bash/bashrc.d/less deleted file mode 100644 index 2ba931d..0000000 --- a/unprocessed/bash/bashrc.d/less +++ /dev/null @@ -1,3 +0,0 @@ -## vim: ft=sh : - -export LESSHISTFILE=${XDG_STATE_HOME}/less/history diff --git a/unprocessed/bash/bashrc.d/lf b/unprocessed/bash/bashrc.d/lf deleted file mode 100644 index 4af8efc..0000000 --- a/unprocessed/bash/bashrc.d/lf +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -lf () { - tmp="$(mktemp)" - - logpath="${LOG_HOME}/lf.log" - - command lf --last-dir-path="$tmp" --log="$logpath" "$@" - if [ -f "$tmp" ]; then - dir="$(cat "$tmp")" - rm -f "$tmp" - if [ -d "$dir" ]; then - if [ "$dir" != "$(pwd)" ]; then - cd "$dir" - fi - fi - fi -} diff --git a/unprocessed/bash/bashrc.d/local_software b/unprocessed/bash/bashrc.d/local_software deleted file mode 100644 index f6de046..0000000 --- a/unprocessed/bash/bashrc.d/local_software +++ /dev/null @@ -1,12 +0,0 @@ -if [[ -d "$HOME/.local/software" ]]; then - for dir in ${HOME}/.local/software/*; do - dir=${dir:A} - if [[ -d "$dir/bin" ]]; then - if ! [[ "${PATH}" =~ "$dir/bin" ]]; then - export PATH="$dir/bin:$PATH" - fi - fi - done -fi - -unset dir diff --git a/unprocessed/bash/bashrc.d/minikube b/unprocessed/bash/bashrc.d/minikube deleted file mode 100644 index 84549e8..0000000 --- a/unprocessed/bash/bashrc.d/minikube +++ /dev/null @@ -1,3 +0,0 @@ -## vim: ft=sh : - -export MINIKUBE_HOME=${XDG_DATA_HOME}/minikube diff --git a/unprocessed/bash/bashrc.d/misc b/unprocessed/bash/bashrc.d/misc deleted file mode 100644 index 68af067..0000000 --- a/unprocessed/bash/bashrc.d/misc +++ /dev/null @@ -1,21 +0,0 @@ -## Description: Bash configuration where we can't categorize anywhere else. -## vim: ft=sh : - -export BROWSER=firefox -export EDITOR=nvim -export TERMINAL=st -export LANG=en_GB.UTF-8 -export MANPAGER="nvim +Man!" - -# == vi mode in Bash -set -o vi - -# == make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# == ensure that programmable completion features are enabled. -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 diff --git a/unprocessed/bash/bashrc.d/pass b/unprocessed/bash/bashrc.d/pass deleted file mode 100644 index fbd244e..0000000 --- a/unprocessed/bash/bashrc.d/pass +++ /dev/null @@ -1,9 +0,0 @@ -## Description: Bash configuration for pass -## vim: ft=sh : - -export PASSWORD_STORE_DIR=${XDG_DATA_HOME}/pass - -if ! [ -d "${PASSWORD_STORE_DIR}" ]; then - mkdir ${PASSWORD_STORE_DIR} - chmod 0700 ${PASSWORD_STORE_DIR} -fi diff --git a/unprocessed/bash/bashrc.d/prompt b/unprocessed/bash/bashrc.d/prompt deleted file mode 100644 index 91d0d88..0000000 --- a/unprocessed/bash/bashrc.d/prompt +++ /dev/null @@ -1,32 +0,0 @@ -## File: ~/.bashrc.d/prompt -## Description: Configuration for the Bash prompt -## vim: ft=sh : - -get_date() { - date '+%d.%m.%Y' -} - -if [ -f /usr/share/git/completion/git-prompt.sh ]; then - source /usr/share/git/completion/git-prompt.sh -elif [ -f /usr/share/git/git-prompt.sh ]; then - source /usr/share/git/git-prompt.sh -elif [ -f /usr/lib/git-core/git-sh-prompt ]; then - source /usr/lib/git-core/git-sh-prompt -elif [ -f /etc/bash_completion.d/git-prompt ]; then - source /etc/bash_completion.d/git-prompt -elif [ -f ${HOME}/.git-prompt ]; then - source ${HOME}/.git-prompt -fi - -GIT_PS1_SHOWDIRTYSTATE="true" -GIT_PS1_SHOWUPSTREAM="auto" -GIT_PS1_STATESEPARATOR=": " - -DATE_BG="$(tput setab 68)" -GREY_BG="$(tput setab 240)" -RESET="$(tput sgr0)" -FILEPATH_TC="$(tput setaf 81)" -WHITE_TC="$(tput setaf 255)" -GREEN_TC="$(tput setaf 2)" -PS1='${DATE_BG}${WHITE_TC}$(get_date) ${GREY_BG} \u • ${FILEPATH_TC}\033[1m\w ${RESET} ${GREEN_TC}\033[3m$(__git_ps1 "git:(%s)")${RESET}\n\$ ' -PS2=" -> " diff --git a/unprocessed/bash/bashrc.d/pulumi b/unprocessed/bash/bashrc.d/pulumi deleted file mode 100644 index 9dfe08d..0000000 --- a/unprocessed/bash/bashrc.d/pulumi +++ /dev/null @@ -1,6 +0,0 @@ -## File: ~/.bashrc.d/pulumi -## Description: Bash configuration for the pulumi setup -## vim: ft=sh : - -export PULUMI_SKIP_UPDATE_CHECK="true" -export PULUMI_HOME="${XDG_DATA_HOME}/pulumi" diff --git a/unprocessed/bash/bashrc.d/terminfo b/unprocessed/bash/bashrc.d/terminfo deleted file mode 100644 index bfeb17d..0000000 --- a/unprocessed/bash/bashrc.d/terminfo +++ /dev/null @@ -1,4 +0,0 @@ -## vim: ft=sh : - -export TERMINFO=${XDG_DATA_HOME}/terminfo -export TERMINFO_DIRS=${TERMINFO}:/usr/share/terminfo diff --git a/unprocessed/bash/bashrc.d/vagrant b/unprocessed/bash/bashrc.d/vagrant deleted file mode 100644 index c8f609b..0000000 --- a/unprocessed/bash/bashrc.d/vagrant +++ /dev/null @@ -1,3 +0,0 @@ -## vim: ft=sh : - -export VAGRANT_HOME=${XDG_DATA_HOME}/vagrant diff --git a/unprocessed/bash/bashrc.d/vault b/unprocessed/bash/bashrc.d/vault deleted file mode 100644 index 38beb89..0000000 --- a/unprocessed/bash/bashrc.d/vault +++ /dev/null @@ -1,8 +0,0 @@ -## File: ~/.bashrc.d/vault -## Description: Bash configuration for vault setup. -## vim: ft=sh : - -# bash autocompletion for vault -if [ -f "${HOME}/.local/bin/vault" ]; then - complete -C /home/dananglin/.local/bin/vault vault -fi diff --git a/unprocessed/bash/environment b/unprocessed/bash/environment deleted file mode 100644 index 87faaa4..0000000 --- a/unprocessed/bash/environment +++ /dev/null @@ -1,24 +0,0 @@ -## vim: ft=sh : - -# == Add personal bin directory to PATH -if ! [[ "${PATH}" =~ "${HOME}/.local/bin" ]]; then - export PATH=${HOME}/.local/bin:${PATH} -fi - -# == Add custom scripts directory to PATH -if ! [[ "${PATH}" =~ "${HOME}/.local/scripts" ]]; then - export PATH=${HOME}/.local/scripts:${PATH} -fi - -# == Add AppImage directory to PATH -if ! [[ "${PATH}" =~ "${HOME}/Applications" ]]; then - export PATH=${HOME}/Applications:${PATH} -fi - -# == The XDG Directories -export XDG_CONFIG_HOME=${HOME}/.local/config -export XDG_DATA_HOME=${HOME}/.local/share -export XDG_CACHE_HOME=${HOME}/.local/cache -export XDG_STATE_HOME=${HOME}/.local/state - -export LOG_HOME="${XDG_STATE_HOME}/logs"