--- /dev/null
+# ~/.bash_profile, if it exists, is sourced by Bash for all login shells,
+# instead of ~/.profile
+#
+# While I prefer using ~/.profile, I provide ~/.bash_profile because some
+# applications write to it even if it does not previously exist, which
+# deactivates ~/.profile if not explicitly sourced from within here.
+. "${HOME}/.profile"
+
--- /dev/null
+# ~/.bashrc is sourced by Bash for any interactive shells.
+
+# Use vim as default editor for anything.
+export VISUAL=vim
+export EDITOR="${VISUAL}"
+
+# Some helpful aliases.
+alias curlpost='curl -H "Content-Type: application/json" -X POST'
+alias ls="ls --color=auto"
+alias sshauth='eval $(ssh-agent) && ssh-add'
+
+# Colored prompt with username, hostname, date/time, directory.
+COLOR_NUMBER=7 # default to white
+COLOR_NUMBER_FILE="${HOME}/.shell_prompt_color"
+[ -f "${COLOR_NUMBER_FILE}" ] && COLOR_NUMBER=`cat "${COLOR_NUMBER_FILE}"`
+tput_color="$(tput setaf "${COLOR_NUMBER}")$(tput bold)"
+tput_reset="$(tput sgr0)"
+# Bash confuses the line length when not told to not count escape sequences.
+if [ -n "${BASH}" ]; then
+ tput_color="\[$tput_color\]"
+ tput_reset="\[$tput_reset\]"
+fi
+PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $(whoami)@$(hostname):"\$\(pwd\)"]$ ${tput_reset}"
+PS2="${tput_color}> ${tput_reset}"
+PS3="${tput_color}select: ${tput_reset}"
+PS4="${tput_color}+ ${tput_reset}"
+
+# Optional additional stuff.
+PATH_BASHRC_BONUS="${HOME}/.bashrc_bonus"
+[ -f "${PATH_BASHRC_BONUS}" ] && . "${PATH_BASHRC_BONUS}"
--- /dev/null
+# ~/.profile is sourced on login, with its exports inherited by all processes
+# started below it under the same login, i.e. it has a very deep effect, but
+# changes to it only apply to new login sessions (compare to e.g. ~/.bashrc
+# which by is sourced anew for every new interactive Bash, login or not).
+#
+# Notably this makes ~/.profile (outside its optional sourcing of ~/.bashrc)
+# useful for providing environment variables to non-shell applications started
+# within a login session.
+
+PATH_BASHRC="${HOME}/.bashrc"
+[ -n "${BASH_VERSION}" -a -f "${PATH_BASHRC}" ] && . "${PATH_BASHRC}"
+
+PATH_LOCAL_BIN="${HOME}/.local/bin"
+[ -d "${PATH_LOCAL_BIN}" ] && PATH="${PATH_LOCAL_BIN}:${PATH}"
+
+# local changes to this shell variable otherwise will get lost
+export PATH
--- /dev/null
+# mere "kb" might be more flexible, but this way I won't accidentally try for
+# a non-existing "en" layout
+alias kb_de="swaymsg input * xkb_layout de"
+alias kb_us="swaymsg input * xkb_layout us"