From 1b1f68325df1ea7521223bb689e794f2b32c039a Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 22 Oct 2020 10:54:37 +0200 Subject: emacs: fixed directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use `user-emacs-directory` instead of `~/.emacs.d` directly. - Use XDG-related environment variables, which are set on the `bashrc` file. Signed-off-by: Miquel Sabaté Solà --- .bashrc | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to '.bashrc') diff --git a/.bashrc b/.bashrc index 3122124..eb99159 100644 --- a/.bashrc +++ b/.bashrc @@ -13,6 +13,22 @@ else fi fi +## +# Utility functions. + +# Sources the given file if it really exists. +source_maybe() { + if [ -f "$1" ]; then + source "$1" + fi +} + +## +# XDG: sourcing the variables on $HOME/.config/user-dirs.dirs might ease up the +# configuration of other tools. + +source_maybe "$HOME/.config/user-dirs.dirs" + ## # Basics. @@ -26,16 +42,6 @@ alias lisa='ls -lisa --group-directories-first --time-style=+"%d.%m.%Y %H:%M" -- alias ..='cd ..' alias cd..='cd ..' -## -# Utility functions. - -# Sources the given file if it really exists. -source_maybe() { - if [ -f "$1" ]; then - source "$1" - fi -} - ## # Editors & terminals. -- cgit v1.2.3