Add .bashrc

This commit is contained in:
Marco Thomas
2021-02-04 18:04:35 +01:00
parent 3dff76e578
commit b5db404046
3 changed files with 41 additions and 16 deletions

40
files/.bashrc Normal file
View File

@@ -0,0 +1,40 @@
# ============================== Prompt
git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/|\1/'
}
HOST="\[\033[0;93m\]\h\[\033[m\]"
GIT="\[\033[1;91m\]\$(git_branch)\[\033[m\]"
ICON="\[\033[1;92m\]➜\[\033[m\]"
DIR="\[\033[1;94m\]\w\[\033[m\]"
export PS1="${HOST} ${DIR}${GIT} ${ICON} "
# ============================== Exports
export VISUAL=vim
export EDITOR="$VISUAL"
export LANG="en_US.UTF-8"
export TERM="xterm-256color"
# ============================== Aliases
alias s="cd ~/scripts/"
alias c='clear'
alias l='ls -lfh' #size,show type,human readable
alias la='ls -lafh' #long list,show almost all,show type,human readable
alias ll='ls -l' #long list
alias rm='rm -i' # ask before removal
alias cp='cp -i' # ask before removal
alias mv='mv -i' # ask before removal
if [ -f ~/.bashrc_local ]; then
source ~/.bashrc_local
fi
# ============================== vi-Mode
set -o vi
# ============================== Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

View File

@@ -156,18 +156,3 @@ bindsym $mod+Shift+0 move container to workspace number $ws10
# ============================== Startup
exec ~/scripts/run_on_startup.sh
#exec setxkbmap -layout za
#
## Launch Programs at start
#exec fcitx -d
#exec nextcloud
#exec dunst
#exec picom
#exec nm-applet
#
#exec feh --bg-scale $HOME/data/nextcloud/Wallpaper/wallpaper.png
#
#exec ~/scripts/fix_screens.sh
#exec ~/scripts/polybar.sh

View File

@@ -10,7 +10,7 @@ rm -rf $HOME/scripts
ln -sf $path/scripts $HOME/scripts
# Home directory
home_files=".dir_colors .gitconfig .tmux.conf .vimrc .Xresources .zshrc .zsh-highlighting"
home_files=".bashrc .dir_colors .gitconfig .tmux.conf .vimrc .Xresources .zshrc .zsh-highlighting"
for file in $home_files
do
ln -sf $path/$file $HOME/$file