Shells are command line interpreter for UNIX systems. These shells can
operate in one of three modes: interactive, non-interactive or
login. Login mode starts with a login prompt. After that it works
similarly to either interactive or non-interactive mode.
~/.bash_profile is the dotfile for bash in the login mode. It sources
program-specific *.sh profiles in {XDG_CONFIG_HOME}/profile.d. This
mimics behaviour of /etc/profile, the global shell dotfile.
~/,bashrc is the dotfile for bash in the interactive mode.
guix
====
-System and home directory configuration for the GNU Guix operating system.
+System and home directory configuration for the GNU Guix operating system. It
+installs programs and their configuration files (dotfiles).
Files
-----
-* home.scm - home directory configuration for the GNU Guix operating system.
+* home.scm - home directory configuration for the GNU Guix operating system.
+* <program>/ - program-specific dotfiles.
--- /dev/null
+#!/bin/bash
+# Copyright (c) 2022 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+#
+# .bash_profile - bash dotfile for login shells.
+#
+# Sources program-specific profiles from $XDG_CONFIG_HOME/profile.d and starts
+# Xorg. See bash(1) for more information about login shells.
+
+_confdir=${XDG_CONFIG_HOME:-${HOME}/.config}
+
+if [ -d ${_confdir}/profile.d/ ]; then
+ for _f in ${_confdir}/profile.d/*.sh; do
+ [ -r ${_f} ] && . ${_f}
+ done
+ unset _f
+fi
+
+unset _confdir
--- /dev/null
+#!/bin/bash
+# Copyright (c) 2022 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+#
+# .bashrc - bash dotfile for interactive shells.
+#
+# Sources $HOME/.bash_profile. See bash(1) for more information about interactive
+# shells.
+
+if [ -f "${HOME}/.bash_profile" ]; then
+ . ${HOME}/.bash_profile
+fi
+
+# Prompt
+export PS1="[\w]$ "
+
+# Aliases
+alias ls="ls --color=auto"