Adding simple bashrc
This commit is contained in:
parent
93695bc69f
commit
e84e2263d9
|
@ -0,0 +1,58 @@
|
|||
# Bash initialization for interactive non-login shells and
|
||||
# for remote shells (info "(bash) Bash Startup Files").
|
||||
|
||||
# Export 'SHELL' to child processes. Programs such as 'screen'
|
||||
# honor it and otherwise use /bin/sh.
|
||||
export SHELL
|
||||
|
||||
if [[ $- != *i* ]]
|
||||
then
|
||||
# We are being invoked from a non-interactive shell. If this
|
||||
# is an SSH session (as in "ssh host command"), source
|
||||
# /etc/profile so we get PATH and other essential variables.
|
||||
[[ -n "$SSH_CLIENT" ]] && source /etc/profile
|
||||
|
||||
# Don't do anything else.
|
||||
return
|
||||
fi
|
||||
|
||||
# Source the system-wide file.
|
||||
source /etc/bashrc
|
||||
|
||||
# Adjust the prompt depending on whether we're in 'guix environment'.
|
||||
if [ -n "$GUIX_ENVIRONMENT" ]
|
||||
then
|
||||
PS1='\u@\h \w [env]\$ '
|
||||
else
|
||||
PS1='\u@\h \w\$ '
|
||||
fi
|
||||
|
||||
# Remap the capslock key because it's useless
|
||||
setxkbmap -option caps:super
|
||||
# Single press of the super key should send an Escape code
|
||||
killall xcape 2>dev/null; xcape -e 'Super_L=Escape'
|
||||
|
||||
# Aliases
|
||||
# ALL THE COLORS
|
||||
alias \
|
||||
ls='ls -hp --color=auto --group-directories-first' \
|
||||
grep='grep --color=auto'
|
||||
|
||||
# Short alias modifications that we always want
|
||||
alias \
|
||||
ll='ls -l' \
|
||||
la='ls -a' \
|
||||
cp='cp -iv' \
|
||||
mv='mv -iv' \
|
||||
rm='rm -vI' \
|
||||
..='cd ..'
|
||||
|
||||
# du sort by size please
|
||||
alias du='du -hs * | sort -h'
|
||||
|
||||
# Shortcuts for common directories
|
||||
alias \
|
||||
cf='cd ${XDG_CONFIG_HOME:-$HOME/.config} && ls -a --color=auto' \
|
||||
sc='cd ~/.local/bin/ && ls -a --color=auto'
|
||||
GUIX_PROFILE="/home/dorian/.guix-profile"
|
||||
source "$GUIX_PROFILE/etc/profile"
|
Loading…
Reference in New Issue