home · contact · privacy
Declutter home directories from .profile.* by move into ~/.profile.d/.
authorPlom Heller <plom@plomlompom.com>
Sat, 19 Sep 2026 09:21:41 +0000 (11:21 +0200)
committerPlom Heller <plom@plomlompom.com>
Sat, 19 Sep 2026 09:21:41 +0000 (11:21 +0200)
home/any/.profile.aliases [deleted file]
home/any/.profile.d/aliases [new file with mode: 0644]
home/root/.profile.d/hibernation [new file with mode: 0644]
home/root/.profile.hibernation [deleted file]
home/user/.profile.d/hibernation [new file with mode: 0644]
home/user/.profile.d/prompt [new file with mode: 0644]
home/user/.profile.d/ssh-agent [new file with mode: 0644]
home/user/.profile.hibernation [deleted file]
home/user/.profile.prompt [deleted file]
home/user/.profile.ssh-agent [deleted file]
scripts/lib/link_home.sh

diff --git a/home/any/.profile.aliases b/home/any/.profile.aliases
deleted file mode 100644 (file)
index f0ff635..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-alias ls="ls --color=auto"
-
diff --git a/home/any/.profile.d/aliases b/home/any/.profile.d/aliases
new file mode 100644 (file)
index 0000000..f0ff635
--- /dev/null
@@ -0,0 +1,2 @@
+alias ls="ls --color=auto"
+
diff --git a/home/root/.profile.d/hibernation b/home/root/.profile.d/hibernation
new file mode 100644 (file)
index 0000000..8f1a3c5
--- /dev/null
@@ -0,0 +1,8 @@
+# /etc/systemd/system/sytemd-hibernate.service.d/60-poweroff-on-failure.conf
+# is bypassed by pure "systemctl hibernate", so only allow wrap with poweroff
+alias hibernate_safe="command systemctl hibernate || systemctl poweroff"
+systemctl () {
+    local MSG="Use 'hibernate_safe' instead."
+    [ "$@" = "hibernate" ] && echo "${MSG}" && return 1
+    command systemctl "$@"
+}
diff --git a/home/root/.profile.hibernation b/home/root/.profile.hibernation
deleted file mode 100644 (file)
index 8f1a3c5..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# /etc/systemd/system/sytemd-hibernate.service.d/60-poweroff-on-failure.conf
-# is bypassed by pure "systemctl hibernate", so only allow wrap with poweroff
-alias hibernate_safe="command systemctl hibernate || systemctl poweroff"
-systemctl () {
-    local MSG="Use 'hibernate_safe' instead."
-    [ "$@" = "hibernate" ] && echo "${MSG}" && return 1
-    command systemctl "$@"
-}
diff --git a/home/user/.profile.d/hibernation b/home/user/.profile.d/hibernation
new file mode 100644 (file)
index 0000000..da7ef8f
--- /dev/null
@@ -0,0 +1,6 @@
+alias hibernate_safe="sudo /bin/sh -lc hibernate_safe"
+sudo() {
+    local MSG="Use 'hibernate_safe' instead."
+    [ "$1 $2" = "systemctl hibernate" ] && echo "${MSG}" && return 1
+    command sudo "$@"
+}
diff --git a/home/user/.profile.d/prompt b/home/user/.profile.d/prompt
new file mode 100644 (file)
index 0000000..c543779
--- /dev/null
@@ -0,0 +1,20 @@
+_dot_profile_dot_prompt() {
+    local COLOR_NUMBER=2
+    local COLOR_ON
+    local COLOR_OFF
+    COLOR_ON="$(tput setaf "${COLOR_NUMBER}" 2>/dev/null)$(tput bold 2>/dev/null)"
+    COLOR_OFF="$(tput sgr0 2>/dev/null)"
+    # Bash confuses the line length when not told not to count escape
+    # sequences. PS3 is printed verbatim by "select", so it must get the
+    # unwrapped codes.
+    PS3="${COLOR_ON}select: ${COLOR_OFF}"
+    if [ -n "${BASH:-}" ]; then
+        COLOR_ON="\[${COLOR_ON}\]"
+        COLOR_OFF="\[${COLOR_OFF}\]"
+    fi
+    PS1="${COLOR_ON}[\D{%Y-%m-%d/%H:%M:%S/%Z} \u@\h:\w]\$ ${COLOR_OFF}"
+    PS2="${COLOR_ON}> ${COLOR_OFF}"
+    PS4="${COLOR_ON}+ ${COLOR_OFF}"
+}
+_dot_profile_dot_prompt
+unset -f _dot_profile_dot_prompt
diff --git a/home/user/.profile.d/ssh-agent b/home/user/.profile.d/ssh-agent
new file mode 100644 (file)
index 0000000..6fec6f9
--- /dev/null
@@ -0,0 +1 @@
+[ -z "${SSH_AGENT_PID}" ] && eval $(ssh-agent) > /dev/null && ssh-add -q
diff --git a/home/user/.profile.hibernation b/home/user/.profile.hibernation
deleted file mode 100644 (file)
index da7ef8f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-alias hibernate_safe="sudo /bin/sh -lc hibernate_safe"
-sudo() {
-    local MSG="Use 'hibernate_safe' instead."
-    [ "$1 $2" = "systemctl hibernate" ] && echo "${MSG}" && return 1
-    command sudo "$@"
-}
diff --git a/home/user/.profile.prompt b/home/user/.profile.prompt
deleted file mode 100644 (file)
index c543779..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-_dot_profile_dot_prompt() {
-    local COLOR_NUMBER=2
-    local COLOR_ON
-    local COLOR_OFF
-    COLOR_ON="$(tput setaf "${COLOR_NUMBER}" 2>/dev/null)$(tput bold 2>/dev/null)"
-    COLOR_OFF="$(tput sgr0 2>/dev/null)"
-    # Bash confuses the line length when not told not to count escape
-    # sequences. PS3 is printed verbatim by "select", so it must get the
-    # unwrapped codes.
-    PS3="${COLOR_ON}select: ${COLOR_OFF}"
-    if [ -n "${BASH:-}" ]; then
-        COLOR_ON="\[${COLOR_ON}\]"
-        COLOR_OFF="\[${COLOR_OFF}\]"
-    fi
-    PS1="${COLOR_ON}[\D{%Y-%m-%d/%H:%M:%S/%Z} \u@\h:\w]\$ ${COLOR_OFF}"
-    PS2="${COLOR_ON}> ${COLOR_OFF}"
-    PS4="${COLOR_ON}+ ${COLOR_OFF}"
-}
-_dot_profile_dot_prompt
-unset -f _dot_profile_dot_prompt
diff --git a/home/user/.profile.ssh-agent b/home/user/.profile.ssh-agent
deleted file mode 100644 (file)
index 6fec6f9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-[ -z "${SSH_AGENT_PID}" ] && eval $(ssh-agent) > /dev/null && ssh-add -q
index 0ecbb84132f173671d0c20261b1711bd7771868d..146e8fa08e9020d4b39bcc4fe7b0dd7a12e576e8 100644 (file)
@@ -3,7 +3,7 @@ include PATH_REPO
 include msg
 
 link_home() {
-    local LOOP_PROFILES='for FILE in ${HOME}/.profile.*; do . "${FILE}"; done'
+    local LOOP_PROFILES='for FILE in ${HOME}/.profile.d/*; do . "${FILE}"; done'
     local PATH_PROFILE="${HOME}/${FNAME_PROFILE}"
     for DIRNAME in any "$1"; do
         local PATH_SKEL="${PATH_REPO}/home/${DIRNAME}"