From 63388aaa7a3a648665e2548b7f2d1f2511a961e6 Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Sat, 20 Jan 2024 19:52:36 +0100 Subject: [PATCH] rename dot-files to non-dot, move pdf viewer to .bashrc.br --- config/home/{.bash_profile => bash_profile} | 3 ++- config/home/{.bashrc.br => bashrc.br} | 9 +++++++++ config/home/{.bashrc.br.eowyn => bashrc.br.eowyn} | 6 ------ config/home/{.bashrc.br.lorien => bashrc.br.lorien} | 3 --- config/home/{.emacs.d => emacs.d}/eowyn.el | 0 config/home/{.emacs.d => emacs.d}/graphic.el | 0 config/home/{.emacs.d => emacs.d}/init.el | 0 config/home/{.emacs.d => emacs.d}/lorien.el | 0 config/home/{.emacs.d => emacs.d}/term.el | 0 9 files changed, 11 insertions(+), 10 deletions(-) rename config/home/{.bash_profile => bash_profile} (83%) rename config/home/{.bashrc.br => bashrc.br} (97%) rename config/home/{.bashrc.br.eowyn => bashrc.br.eowyn} (96%) rename config/home/{.bashrc.br.lorien => bashrc.br.lorien} (97%) rename config/home/{.emacs.d => emacs.d}/eowyn.el (100%) rename config/home/{.emacs.d => emacs.d}/graphic.el (100%) rename config/home/{.emacs.d => emacs.d}/init.el (100%) rename config/home/{.emacs.d => emacs.d}/lorien.el (100%) rename config/home/{.emacs.d => emacs.d}/term.el (100%) diff --git a/config/home/.bash_profile b/config/home/bash_profile similarity index 83% rename from config/home/.bash_profile rename to config/home/bash_profile index 7e0655d..680453f 100644 --- a/config/home/.bash_profile +++ b/config/home/bash_profile @@ -13,5 +13,6 @@ # 1) source .bashrc if it exists # 2) add "$HOME"/bin in PATH # This imply a duplicate "$HOME/bin" in PATH, as we do everything in .bashrc.$user. +# Having this ~/.bash_profile will avoid the execution of ~/.profile - [ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc" +[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc" diff --git a/config/home/.bashrc.br b/config/home/bashrc.br similarity index 97% rename from config/home/.bashrc.br rename to config/home/bashrc.br index cc47342..6fa4880 100644 --- a/config/home/.bashrc.br +++ b/config/home/bashrc.br @@ -156,6 +156,15 @@ else fi export EDITOR=$VISUAL +# look for a pdf viewer +for _pdfviewer in qpdfview atril; do + if hash "$_pdfviewer" 2>/dev/null; then + alias acroread="$_pdfviewer" + break + fi +done +unset _pdfviewer + # append to the history file, don't overwrite it shopt -s histappend # write history after each command diff --git a/config/home/.bashrc.br.eowyn b/config/home/bashrc.br.eowyn similarity index 96% rename from config/home/.bashrc.br.eowyn rename to config/home/bashrc.br.eowyn index 835fe34..5c0183e 100644 --- a/config/home/.bashrc.br.eowyn +++ b/config/home/bashrc.br.eowyn @@ -15,12 +15,6 @@ # i.e., add at the end of .bashrc.$USER: # [ -f "$HOME/.bashrc.$USER.$(hostname)" ] && . "$HOME/.bashrc.$USER.$(hostname)" -# ibus -#export GTK - -# look for a pdf viewer -hash atril 2> /dev/null && alias acroread=atril - # mysql aliases. Will match any "[client-XXX]" lines in ~/.my.cnf # and generate "myXXX" aliases. if [[ -r ~/.my.cnf ]]; then diff --git a/config/home/.bashrc.br.lorien b/config/home/bashrc.br.lorien similarity index 97% rename from config/home/.bashrc.br.lorien rename to config/home/bashrc.br.lorien index 86b5747..0c6ab00 100644 --- a/config/home/.bashrc.br.lorien +++ b/config/home/bashrc.br.lorien @@ -15,9 +15,6 @@ # i.e., add at the end of .bashrc.$USER: # [ -f "$HOME/.bashrc.$USER.$(hostname)" ] && . "$HOME/.bashrc.$USER.$(hostname)" -# look for a pdf viewer -hash atril 2> /dev/null && alias acroread=atril - # mysql aliases. Will match any "[client-XXX]" lines in ~/.my.cnf # and generate "myXXX" aliases. if [[ -r ~/.my.cnf ]]; then diff --git a/config/home/.emacs.d/eowyn.el b/config/home/emacs.d/eowyn.el similarity index 100% rename from config/home/.emacs.d/eowyn.el rename to config/home/emacs.d/eowyn.el diff --git a/config/home/.emacs.d/graphic.el b/config/home/emacs.d/graphic.el similarity index 100% rename from config/home/.emacs.d/graphic.el rename to config/home/emacs.d/graphic.el diff --git a/config/home/.emacs.d/init.el b/config/home/emacs.d/init.el similarity index 100% rename from config/home/.emacs.d/init.el rename to config/home/emacs.d/init.el diff --git a/config/home/.emacs.d/lorien.el b/config/home/emacs.d/lorien.el similarity index 100% rename from config/home/.emacs.d/lorien.el rename to config/home/emacs.d/lorien.el diff --git a/config/home/.emacs.d/term.el b/config/home/emacs.d/term.el similarity index 100% rename from config/home/.emacs.d/term.el rename to config/home/emacs.d/term.el