From 30038788b42fab54c3e33603778105cc05012175 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Sun, 15 May 2022 21:33:17 +0100 Subject: [PATCH] feat(bash): XDG Dir spec updates and other fixes - Update program configurations to use the XDG Directories with the help of xdg-ninja. - Add missing alias for the copy command. - Remove the alias for tmux since it should now support XDG_CONFIG_HOME by default. - Remove the run_package_updates function since this is now a bash script. - Update the MANPAGER variable so that it works properly with neovim, --- config/bash/bashrc.d/aliases | 2 +- config/bash/bashrc.d/docker | 3 +++ config/bash/bashrc.d/functions | 10 ---------- config/bash/bashrc.d/gnupg | 3 +++ config/bash/bashrc.d/minikube | 3 +++ config/bash/bashrc.d/misc | 2 +- config/bash/bashrc.d/pulumi | 6 ++++++ config/bash/bashrc.d/terminfo | 4 ++++ config/bash/bashrc.d/vagrant | 3 +++ 9 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 config/bash/bashrc.d/docker create mode 100644 config/bash/bashrc.d/gnupg create mode 100644 config/bash/bashrc.d/minikube create mode 100644 config/bash/bashrc.d/pulumi create mode 100644 config/bash/bashrc.d/terminfo create mode 100644 config/bash/bashrc.d/vagrant diff --git a/config/bash/bashrc.d/aliases b/config/bash/bashrc.d/aliases index 9f62f3d..e6fbc29 100644 --- a/config/bash/bashrc.d/aliases +++ b/config/bash/bashrc.d/aliases @@ -8,6 +8,7 @@ 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' @@ -22,7 +23,6 @@ if [[ -x $( command -v pacman ) ]]; then alias pacupdate='sudo pacman -Syu --noconfirm' fi -alias tmux="tmux -f ${XDG_CONFIG_HOME}/tmux/tmux.conf" alias pwgen="pwgen -s -c -n" alias dc="docker-compose" diff --git a/config/bash/bashrc.d/docker b/config/bash/bashrc.d/docker new file mode 100644 index 0000000..ab8229d --- /dev/null +++ b/config/bash/bashrc.d/docker @@ -0,0 +1,3 @@ +## vim: ft=sh : + +export DOCKER_CONFIG=${XDG_CONFIG_HOME}/docker diff --git a/config/bash/bashrc.d/functions b/config/bash/bashrc.d/functions index ed14e41..785f49c 100644 --- a/config/bash/bashrc.d/functions +++ b/config/bash/bashrc.d/functions @@ -27,13 +27,3 @@ go_up() { echo "Unable to go up $steps directories." fi } - -# run_package_updates() ensures all apt packages are updated -# and runs autoremove to remove any unused packages. -run_package_updates() { - sudo apt update - apt list --upgradable - sleep 5 - sudo apt dist-upgrade - sudo apt autoremove -} diff --git a/config/bash/bashrc.d/gnupg b/config/bash/bashrc.d/gnupg new file mode 100644 index 0000000..4a5eb32 --- /dev/null +++ b/config/bash/bashrc.d/gnupg @@ -0,0 +1,3 @@ +## vim: ft=sh : + +export GNUPGHOME=${XDG_DATA_HOME}/gnupg diff --git a/config/bash/bashrc.d/minikube b/config/bash/bashrc.d/minikube new file mode 100644 index 0000000..84549e8 --- /dev/null +++ b/config/bash/bashrc.d/minikube @@ -0,0 +1,3 @@ +## vim: ft=sh : + +export MINIKUBE_HOME=${XDG_DATA_HOME}/minikube diff --git a/config/bash/bashrc.d/misc b/config/bash/bashrc.d/misc index c1273b9..68af067 100644 --- a/config/bash/bashrc.d/misc +++ b/config/bash/bashrc.d/misc @@ -5,7 +5,7 @@ export BROWSER=firefox export EDITOR=nvim export TERMINAL=st export LANG=en_GB.UTF-8 -export MANPAGER="nvim -c 'set ft=man' -" +export MANPAGER="nvim +Man!" # == vi mode in Bash set -o vi diff --git a/config/bash/bashrc.d/pulumi b/config/bash/bashrc.d/pulumi new file mode 100644 index 0000000..9dfe08d --- /dev/null +++ b/config/bash/bashrc.d/pulumi @@ -0,0 +1,6 @@ +## 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/config/bash/bashrc.d/terminfo b/config/bash/bashrc.d/terminfo new file mode 100644 index 0000000..bfeb17d --- /dev/null +++ b/config/bash/bashrc.d/terminfo @@ -0,0 +1,4 @@ +## vim: ft=sh : + +export TERMINFO=${XDG_DATA_HOME}/terminfo +export TERMINFO_DIRS=${TERMINFO}:/usr/share/terminfo diff --git a/config/bash/bashrc.d/vagrant b/config/bash/bashrc.d/vagrant new file mode 100644 index 0000000..c8f609b --- /dev/null +++ b/config/bash/bashrc.d/vagrant @@ -0,0 +1,3 @@ +## vim: ft=sh : + +export VAGRANT_HOME=${XDG_DATA_HOME}/vagrant