dotfiles/.bashrc

56 lines
1.8 KiB
Bash
Raw Normal View History

2013-03-23 14:48:31 +01:00
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
2015-02-13 18:31:43 +01:00
shopt -s checkwinsize
shopt -s histappend
export HISTCONTROL=ignoredups
export CLICOLOR=1
2015-10-17 10:43:06 +02:00
export EDITOR='vim'
2015-02-13 18:31:43 +01:00
export PAGER='less'
export MY_CONFIG="$HOME/.config/rodolphe"
2020-09-26 22:34:38 +02:00
export USER_NICKNAME="Rodolphe Bréard"
2015-02-13 18:31:43 +01:00
export DEBEMAIL="packages+deb@what.tf"
2013-03-23 14:48:31 +01:00
export DEBFULLNAME="$USER_NICKNAME"
# Path
[ -f "$MY_CONFIG/.setpath.sh" ] && . "$MY_CONFIG/.setpath.sh"
[ -f "$MY_CONFIG/.xdg_set_env.sh" ] && . "$MY_CONFIG/.xdg_set_env.sh"
2013-04-24 17:16:14 +02:00
2013-03-23 14:48:31 +01:00
# Colors
2015-02-13 18:31:43 +01:00
[ "$CLICOLOR" -ne 0 ] && hash dircolors 2>/dev/null && eval $(dircolors -b)
2013-03-23 14:48:31 +01:00
2015-02-13 18:31:43 +01:00
# Command completion
[ -f /etc/bash_completion ] && . /etc/bash_completion
2015-02-13 18:31:43 +01:00
# Prompt
2015-10-20 13:52:26 +02:00
if [ -f "/usr/bin/liquidprompt" ]; then
2014-01-14 12:23:34 +01:00
unset PROMPT_COMMAND
2015-10-20 13:52:26 +02:00
. "/usr/bin/liquidprompt"
2022-08-02 17:28:05 +02:00
elif [ -f "/usr/share/liquidprompt/liquidprompt" ]; then
unset PROMPT_COMMAND
. "/usr/share/liquidprompt/liquidprompt"
2014-08-26 11:38:49 +02:00
elif [ -f "$HOME/liquidprompt/liquidprompt" ]; then
unset PROMPT_COMMAND
2015-02-13 18:31:43 +01:00
. "$HOME/liquidprompt/liquidprompt"
2015-10-20 13:52:26 +02:00
elif [ "$CLICOLOR" -ne 0 ]; then
PS1="\[\033[01;31m\]\u\[\033[01;37m\]@\[\033[01;33m\]\h\[\033[01;31m\]->\[\033[00m\] "
2014-01-14 12:23:34 +01:00
else
2015-10-20 13:52:26 +02:00
PS1='\u@\h-> '
2013-03-23 14:48:31 +01:00
fi
2013-08-23 11:43:48 +02:00
2013-11-13 15:39:59 +01:00
# GPG Agent
export GPG_TTY=$(tty)
2016-06-28 23:14:30 +02:00
[ -S "/run/user/${UID}/gnupg/S.gpg-agent" ] && export GPG_AGENT_INFO="/run/user/${UID}/gnupg/S.gpg-agent"
[ -S "/run/user/${UID}/gnupg/S.gpg-agent.ssh" ] && export SSH_AUTH_SOCK="/run/user/${UID}/gnupg/S.gpg-agent.ssh"
pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1 && export SSH_AGENT_PID=$(pgrep -x -u "${USER}" gpg-agent)
2015-02-13 18:31:43 +01:00
# Aliases
[ -f "$MY_CONFIG/.aliases" ] && . "$MY_CONFIG/.aliases"
2021-01-14 11:49:31 +01:00
# Proxy settings
[ -f "$HOME/.proxy" ] && . "$HOME/.proxy"