From b5db4040469269b101f50ba1fe60101edfd72aa8 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Thu, 4 Feb 2021 18:04:35 +0100 Subject: [PATCH] Add .bashrc --- files/.bashrc | 40 ++++++++++++++++++++++++++++++++++++++++ files/.config/i3/config | 15 --------------- files/linkdots.sh | 2 +- 3 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 files/.bashrc diff --git a/files/.bashrc b/files/.bashrc new file mode 100644 index 0000000..766ef7e --- /dev/null +++ b/files/.bashrc @@ -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 diff --git a/files/.config/i3/config b/files/.config/i3/config index 61b71f2..0fc39f4 100644 --- a/files/.config/i3/config +++ b/files/.config/i3/config @@ -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 diff --git a/files/linkdots.sh b/files/linkdots.sh index efa3837..60d94de 100755 --- a/files/linkdots.sh +++ b/files/linkdots.sh @@ -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