fi
fi
+# Look for DBUS
+if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -S "/run/user/$(id -u)/bus" ]; then
+ DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus"
+ export DBUS_SESSION_BUS_ADDRESS
+fi
+
###########################
# Interactive shells only #
aliasf python 'PYTHONSTARTUP=~/.pythonrc.py python3'
aliasf webshare 'python3 -mhttp.server'
+export EDITOR='vim'
+aliasf edit "$EDITOR"
+
if ! command -v pbcopy &> /dev/null; then
alias pbcopy='xsel --clipboard --input'
alias pbcopym='xsel --input'
}
-##################
-# Editor aliases #
-##################
-
-if emacsclient --version &> /dev/null; then
- export ALTERNATE_EDITOR='vim'
- export EDITOR='emacsclient --tty'
-else
- export EDITOR='vim'
-fi
-aliasf edit "$EDITOR"
-
-
#########################
# Optional local config #
#########################
function print_title_prompt {
printf '\e]0;bash:%s (%s)\a' \
"${PWD/$HOME/\~}" \
- "$(hostname -s)"
+ "$(cat /etc/hostname)"
if [[ "$TERM" == screen* ]]; then
printf '\ekbash\e\\'
printf '\e]0;%s (%s)\a' \
"$(tr -cd '[:graph:] ' <<< "$BASH_COMMAND")" \
- "$(hostname -s)"
+ "$(cat /etc/hostname)"
if [[ "$TERM" == screen* ]]; then
printf '\ek%s\e\\' \