bashrc added to my_config

This commit is contained in:
Dirk Alders 2023-04-30 13:55:56 +02:00
parent 9f82db520d
commit 859b88590c
17 changed files with 112 additions and 0 deletions

5
.bashrc.d/BASHRC_ADDON Normal file
View File

@ -0,0 +1,5 @@
# You may want to put all your additions into a folder file like
# ~/.bashrc.d instead of adding them here directly.
for file in ~/.bashrc.d/*.sh; do
. $file
done

View File

@ -0,0 +1,17 @@
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir -lh --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias less='less -iS'

View File

@ -0,0 +1,4 @@
# some more ls aliases
alias dd='dd status=progress'
alias dd_status="watch -n5 'sudo kill -USR1 $(pgrep ^dd)'"
alias ssh='ssh -X'

View File

@ -0,0 +1 @@
bind 'set bell-style none'

View File

@ -0,0 +1,4 @@
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi

View File

@ -0,0 +1,2 @@
PS1='$(giti)'"$PS1"
export PS1

View File

@ -0,0 +1,3 @@
neofetch

View File

@ -0,0 +1,14 @@
#!/bin/sh
#
# You need to install powerline and fonts-powerline
#
# You need to install powerline-gitstatus by sudo pip install powerline-gitstatus
# See also powerline.zip for the content in ~/config/powerline
if [ ! `which powerline-daemon` == "" ]; then
powerline-daemon -q
POWERLINE_BASH_SELECT=1
POWERLINE_BASH_CONTINUATION=1
. /usr/share/powerline/bindings/bash/powerline.sh
fi

View File

@ -0,0 +1,2 @@
PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
PS1="\033[1;31m$PS1\033[00m"
export PS1

View File

@ -0,0 +1,5 @@
#!/bin/sh
#
~/bin/tmux_ssh

View File

@ -0,0 +1,5 @@
#!/bin/sh
#
if [ -r ~/todo.txt ]; then
cat ~/todo.txt
fi

View File

@ -0,0 +1,19 @@
function venv_status {
COLOR_WHITE="\033[00m"
COLOR_CYAN="\033[1;36m"
COLOR_RED="\033[1;31m"
COLOR_YELLOW="\033[1;33m"
COLOR_DARKYELLOW="\033[0;33m"
COLOR_GREEN="\033[1;32m"
COLOR_DARKGREEN="\033[0;32m"
COLOR_OCHRE="\033[38;5;95m"
if [[ ! $VIRTUAL_ENV == "" ]]; then
echo -e "$COLOR_DARKGREEN(🐍 `basename \"$VIRTUAL_ENV\"`)$COLOR_OCHRE "
fi
}
export VIRTUAL_ENV_DISABLE_PROMPT=1
PS1='$(venv_status)'"$PS1"
export PS1

5
.bashrc.d/my_defaults Normal file
View File

@ -0,0 +1,5 @@
ln -vs __available__/aliases.sh
ln -vs __available__/bin.sh
ln -vs __available__/neofetch.sh
ln -vs __available__/powerline.sh
ln -vs __available__/todo.sh

17
add_bash Executable file
View File

@ -0,0 +1,17 @@
#!/bin/zsh
#
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
if [[ (-e ~/.bashrc.d) ]]; then
echo "A bash configuration already exists (~/.bashrc.d)"
echo "Remove this configuration and start the script again"
else
echo "Creating base link"
ln -vs $SCRIPTPATH/.bashrc.d ~/.bashrc.d
fi
GS=`grep .bashrc.d ~/.bashrc`
if [ ${#GS} -eq 0 ]; then
echo "Adding execution of scripts in ~.bashrc.d"
cat ~/.bashrc.d/BASHRC_ADDON >> ~/.bashrc
fi