From a1fbcddac9b5f3d9c00ec043ca45ffbf94f76b92 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Fri, 5 Dec 2025 03:36:38 +0100 Subject: [PATCH 1/5] Move .bashrc.d to .config --- .bashrc | 10 ++++++---- .../bashrc.d/10_common.sh | 2 +- {.bashrc.d => .config/bashrc.d}/30_desktop.sh | 2 +- {.bashrc.d => .config/bashrc.d}/60_server.sh | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) rename .bashrc.d/10_common_aliases.sh => .config/bashrc.d/10_common.sh (96%) rename {.bashrc.d => .config/bashrc.d}/30_desktop.sh (80%) rename {.bashrc.d => .config/bashrc.d}/60_server.sh (85%) diff --git a/.bashrc b/.bashrc index c16633f..47ad17d 100644 --- a/.bashrc +++ b/.bashrc @@ -71,14 +71,16 @@ else fi # Include drop-in files -if [[ -d ~/.bashrc.d ]]; then - for f in ~/.bashrc.d/*; do +if [[ -d ~/.config/bashrc.d ]]; then + for f in ~/.config/bashrc.d/*; do [[ -f $f ]] && source "$f" done fi -# Include host-specific bashrc -[[ -f ~/.bashrc.local ]] && source ~/.bashrc.local +# Deprecation warning for old drop-in file locations +if [[ -e ~/.bashrc.d || -e ~/.bashrc.local ]]; then + echo "WARNING: ~/.bashrc.d and ~/.bashrc.local are ignored, please use ~/.config/bashrc.d/ instead." +fi # Clean up environment variables unset TRED TGREEN TBLUE TGREENB TCYANB TWHITEB TRESET diff --git a/.bashrc.d/10_common_aliases.sh b/.config/bashrc.d/10_common.sh similarity index 96% rename from .bashrc.d/10_common_aliases.sh rename to .config/bashrc.d/10_common.sh index 00883f9..afa83de 100644 --- a/.bashrc.d/10_common_aliases.sh +++ b/.config/bashrc.d/10_common.sh @@ -1,5 +1,5 @@ # -# ~/.bashrc.d/10_common_aliases.sh -- Collection of common bash aliases and functions +# ~/.config/bashrc.d/10_common.sh -- Collection of common bash aliases and functions # # Shortcut aliases diff --git a/.bashrc.d/30_desktop.sh b/.config/bashrc.d/30_desktop.sh similarity index 80% rename from .bashrc.d/30_desktop.sh rename to .config/bashrc.d/30_desktop.sh index 87b06b8..c0d556e 100644 --- a/.bashrc.d/30_desktop.sh +++ b/.config/bashrc.d/30_desktop.sh @@ -1,5 +1,5 @@ # -# ~/.bashrc.d/30_desktop.sh -- Aliases and functions for desktop environments +# ~/.config/bashrc.d/30_desktop.sh -- Aliases and functions for desktop environments # # Open files according to MIME type diff --git a/.bashrc.d/60_server.sh b/.config/bashrc.d/60_server.sh similarity index 85% rename from .bashrc.d/60_server.sh rename to .config/bashrc.d/60_server.sh index 106b30f..9e41ec4 100644 --- a/.bashrc.d/60_server.sh +++ b/.config/bashrc.d/60_server.sh @@ -1,5 +1,5 @@ # -# ~/.bashrc.d/60_server.sh -- Custom .bashrc additions for server environments +# ~/.config/bashrc.d/60_server.sh -- Custom .bashrc additions for server environments # # Set this alias only on hosts where restic is installed From 92f87bbaddfd254486c9706178117fefff1e156f Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Fri, 5 Dec 2025 03:42:31 +0100 Subject: [PATCH 2/5] .bashrc: Don't export bash-internal vars --- .bashrc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.bashrc b/.bashrc index 47ad17d..018626c 100644 --- a/.bashrc +++ b/.bashrc @@ -9,17 +9,17 @@ set -o noclobber shopt -s checkwinsize shopt -s histappend -export HISTCONTROL=ignoreboth -export HISTSIZE=20000 -export HISTFILESIZE=20000 -export PROMPT_DIRTRIM=3 +HISTCONTROL=ignoreboth +HISTSIZE=20000 +HISTFILESIZE=20000 +PROMPT_DIRTRIM=3 # Save and display timestamps for history HISTTIMEFORMAT="[%F %T] " # Color output and default options -export GREP_OPTS='--color=auto' -export LS_OPTS='--color=auto -hFN --group-directories-first' +GREP_OPTS='--color=auto' +LS_OPTS='--color=auto -hFN --group-directories-first' export LESS="-Ri" # colored GCC warnings and errors From 3050db0a9b4b09c90b49c0bc12c42ea5fdd543a6 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Fri, 5 Dec 2025 04:11:13 +0100 Subject: [PATCH 3/5] .profile: Move desktop-specific vars to .config/profile.d --- .bashrc | 3 ++- .config/profile.d/30_desktop.sh | 16 ++++++++++++++ .pam_environment | 1 - .profile | 37 ++++++++++++++++++--------------- 4 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 .config/profile.d/30_desktop.sh delete mode 100644 .pam_environment diff --git a/.bashrc b/.bashrc index 018626c..d69d7b3 100644 --- a/.bashrc +++ b/.bashrc @@ -1,5 +1,6 @@ # -# ~/.bashrc -- Sourced by bash in interactive non-login shells; includes ~/bashrc.d/* and ~/.bashrc.local +# ~/.bashrc -- Sourced by bash in interactive non-login shells. +# Includes ~/.config/bashrc.d/* # # If not running interactively, don't do anything diff --git a/.config/profile.d/30_desktop.sh b/.config/profile.d/30_desktop.sh new file mode 100644 index 0000000..3ed9f2d --- /dev/null +++ b/.config/profile.d/30_desktop.sh @@ -0,0 +1,16 @@ +# +# ~/.config/profile.d/30_desktop.sh -- Environment variables for clients / desktop environments. +# + +# GNOME Keyring is used as an SSH agent on desktops +export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh" + +# Preferred applications +export TERMINAL=sakura +export BROWSER=firefox + +# Wine: Do not change filetype associations +export WINEDLLOVERRIDES=winemenubuilder.exe=d + +# Firefox: Enable pixel-perfect scrolling +export MOZ_USE_XINPUT2=1 diff --git a/.pam_environment b/.pam_environment deleted file mode 100644 index 95f2bc4..0000000 --- a/.pam_environment +++ /dev/null @@ -1 +0,0 @@ -SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.sock" diff --git a/.profile b/.profile index 2df3854..e58d5b9 100644 --- a/.profile +++ b/.profile @@ -1,30 +1,33 @@ # -# ~/.profile -- Included by .bash_profile; includes ~/.profile.local +# ~/.profile -- Included by .bash_profile, i.e. sourced in login shells. +# Includes ~/.config/profile.d/* # -# SSH key agent -[[ -e "$XDG_RUNTIME_DIR/gcr/ssh" ]] && export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh" - # GPG key stuff export GPG_TTY=$(tty) -# Environment variables +# Set terminal type to support colors export TERM=xterm-color -export TERMINAL=mate-terminal -export EDITOR=vim -export BROWSER=firefox -export BC_ENV_ARGS="-lq" -[[ -f "$HOME/.bcrc" ]] && export BC_ENV_ARGS="$BC_ENV_ARGS $HOME/.bcrc" -# PATH +# Preferred editor +export EDITOR=vim + +# Set PATH [[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH" [[ -d "$HOME/bin" ]] && export PATH="$HOME/bin:$PATH" -# Wine: do not change filetype associations -export WINEDLLOVERRIDES=winemenubuilder.exe=d +# Settings for bc +export BC_ENV_ARGS="-lq" +[[ -f "$HOME/.bcrc" ]] && export BC_ENV_ARGS="$BC_ENV_ARGS $HOME/.bcrc" -# Firefox: Enable pixel-perfect scrolling -export MOZ_USE_XINPUT2=1 +# Include drop-in files +if [[ -d ~/.config/profile.d ]]; then + for f in ~/.config/profile.d/*; do + [[ -f $f ]] && source "$f" + done +fi -# Include host-specific .profile -[ -f ~/.profile.local ] && source ~/.profile.local +# Deprecation warning for .profile.local +if [[ -e ~/.profile.local ]]; then + echo "WARNING: ~/.profile.local is ignored, please use ~/.config/profile.d/ instead." +fi From 1a1f02602daf41847a1d71d30d65ba20d6afd700 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Fri, 5 Dec 2025 04:15:09 +0100 Subject: [PATCH 4/5] Clean up old local files --- _local/aranea/.profile.local | 3 --- _local/calliope/.bashrc.local | 18 ------------------ 2 files changed, 21 deletions(-) delete mode 100644 _local/aranea/.profile.local delete mode 100644 _local/calliope/.bashrc.local diff --git a/_local/aranea/.profile.local b/_local/aranea/.profile.local deleted file mode 100644 index 606eb9e..0000000 --- a/_local/aranea/.profile.local +++ /dev/null @@ -1,3 +0,0 @@ -# -# ~/.profile.local (included by ~/.profile) -# diff --git a/_local/calliope/.bashrc.local b/_local/calliope/.bashrc.local deleted file mode 100644 index d7307b5..0000000 --- a/_local/calliope/.bashrc.local +++ /dev/null @@ -1,18 +0,0 @@ -# -# ~/.bashrc.local -- calliope version -# - -# Assume colors are set in global .bashrc: -# - TRED -# - TGREEN -# - TBLUE -# - TGREENB (bold) -# - TRESET - -# Set host-specific bash prompt: "user@host pwd :U " -if [[ ${EUID} == 0 ]] ; then - PS1="${TRED}\u@\h ${TBLUE}\w ${TGREENB}:U ${TRESET}" -else - PS1="${TGREEN}\u@\h ${TBLUE}\w ${TGREENB}:U ${TRESET}" -fi - From 9ccef54ca7d0d151ac44a94011d8ece8cf86877a Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Fri, 5 Dec 2025 04:22:02 +0100 Subject: [PATCH 5/5] Move .gitconfig to .config/git/ --- .config/git/config | 11 +++++++++++ .../git/config.inc}/common.gitconfig | 0 .../git/config.inc}/no_gpgsign.gitconfig | 0 .../git/config.inc}/user_binaryDiv.gitconfig | 0 .config/git/config_root | 11 +++++++++++ .gitconfig | 11 ----------- .gitconfig_root | 11 ----------- 7 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 .config/git/config rename {.gitconfig.inc => .config/git/config.inc}/common.gitconfig (100%) rename {.gitconfig.inc => .config/git/config.inc}/no_gpgsign.gitconfig (100%) rename {.gitconfig.inc => .config/git/config.inc}/user_binaryDiv.gitconfig (100%) create mode 100644 .config/git/config_root delete mode 100644 .gitconfig delete mode 100644 .gitconfig_root diff --git a/.config/git/config b/.config/git/config new file mode 100644 index 0000000..cdfd2f3 --- /dev/null +++ b/.config/git/config @@ -0,0 +1,11 @@ +# Include common settings (default branch, diff tools, aliases...) +[include] + path = ~/.config/git/config.inc/common.gitconfig + +# Include default user settings +[include] + path = ~/.config/git/config.inc/user_binaryDiv.gitconfig + +# # Do not sign commits with GPG +# [include] +# path = ~/.config/git/config.inc/no_gpgsign.gitconfig diff --git a/.gitconfig.inc/common.gitconfig b/.config/git/config.inc/common.gitconfig similarity index 100% rename from .gitconfig.inc/common.gitconfig rename to .config/git/config.inc/common.gitconfig diff --git a/.gitconfig.inc/no_gpgsign.gitconfig b/.config/git/config.inc/no_gpgsign.gitconfig similarity index 100% rename from .gitconfig.inc/no_gpgsign.gitconfig rename to .config/git/config.inc/no_gpgsign.gitconfig diff --git a/.gitconfig.inc/user_binaryDiv.gitconfig b/.config/git/config.inc/user_binaryDiv.gitconfig similarity index 100% rename from .gitconfig.inc/user_binaryDiv.gitconfig rename to .config/git/config.inc/user_binaryDiv.gitconfig diff --git a/.config/git/config_root b/.config/git/config_root new file mode 100644 index 0000000..6df8856 --- /dev/null +++ b/.config/git/config_root @@ -0,0 +1,11 @@ +# Include common settings (default branch, diff tools, aliases...) +[include] + path = ~/.config/git/config.inc/common.gitconfig + +# Include default user settings +[include] + path = ~/.config/git/config.inc/user_binaryDiv.gitconfig + +# No PGP key for root user +[include] + path = ~/.config/git/config.inc/no_gpgsign.gitconfig diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 7df42d2..0000000 --- a/.gitconfig +++ /dev/null @@ -1,11 +0,0 @@ -# Include common settings (default branch, diff tools, aliases...) -[include] - path = ~/.gitconfig.inc/common.gitconfig - -# Include default user settings -[include] - path = ~/.gitconfig.inc/user_binaryDiv.gitconfig - -# # Do not sign commits with GPG -# [include] -# path = ~/.gitconfig.inc/no_gpgsign.gitconfig diff --git a/.gitconfig_root b/.gitconfig_root deleted file mode 100644 index ec96d0f..0000000 --- a/.gitconfig_root +++ /dev/null @@ -1,11 +0,0 @@ -# Include common settings (default branch, diff tools, aliases...) -[include] - path = ~/.gitconfig.inc/common.gitconfig - -# Include default user settings -[include] - path = ~/.gitconfig.inc/user_binaryDiv.gitconfig - -# No PGP key for root user -[include] - path = ~/.gitconfig.inc/no_gpgsign.gitconfig