Browse Source

bashrc added to my_config

master
Dirk Alders 1 year ago
parent
commit
859b88590c

+ 5
- 0
.bashrc.d/BASHRC_ADDON View File

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

+ 17
- 0
.bashrc.d/__available__/aliases.sh View File

1
+# enable color support of ls and also add handy aliases
2
+if [ -x /usr/bin/dircolors ]; then
3
+    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
4
+    alias ls='ls --color=auto'
5
+    alias dir='dir -lh --color=auto'
6
+    #alias vdir='vdir --color=auto'
7
+
8
+    alias grep='grep --color=auto'
9
+    alias fgrep='fgrep --color=auto'
10
+    alias egrep='egrep --color=auto'
11
+fi
12
+
13
+# some more ls aliases
14
+alias ll='ls -alF'
15
+alias la='ls -A'
16
+alias l='ls -CF'
17
+alias less='less -iS'

+ 4
- 0
.bashrc.d/__available__/aliases_extended.sh View File

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

+ 1
- 0
.bashrc.d/__available__/bell-none.sh View File

1
+bind 'set bell-style none'

+ 4
- 0
.bashrc.d/__available__/bin.sh View File

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

+ 2
- 0
.bashrc.d/__available__/git_prompt.sh View File

1
+PS1='$(giti)'"$PS1"
2
+export PS1

+ 3
- 0
.bashrc.d/__available__/neofetch.sh View File

1
+neofetch
2
+
3
+

+ 14
- 0
.bashrc.d/__available__/powerline.sh View File

1
+#!/bin/sh
2
+#
3
+
4
+# You need to install powerline and fonts-powerline
5
+#
6
+# You need to install powerline-gitstatus by sudo pip install powerline-gitstatus
7
+# See also powerline.zip for the content in ~/config/powerline
8
+
9
+if [ ! `which powerline-daemon` == "" ]; then
10
+  powerline-daemon -q
11
+  POWERLINE_BASH_SELECT=1
12
+  POWERLINE_BASH_CONTINUATION=1
13
+  . /usr/share/powerline/bindings/bash/powerline.sh
14
+fi

+ 2
- 0
.bashrc.d/__available__/prompt_debian.sh View File

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

+ 3
- 0
.bashrc.d/__available__/pytux_32.sh
File diff suppressed because it is too large
View File


+ 3
- 0
.bashrc.d/__available__/pytux_48.sh
File diff suppressed because it is too large
View File


+ 3
- 0
.bashrc.d/__available__/root_prompt.sh View File

1
+PS1="\033[1;31m$PS1\033[00m"
2
+export PS1
3
+

+ 5
- 0
.bashrc.d/__available__/tmux_local.sh View File

1
+#!/bin/sh
2
+#
3
+~/bin/tmux_ssh
4
+
5
+

+ 5
- 0
.bashrc.d/__available__/todo.sh View File

1
+#!/bin/sh
2
+#
3
+if [ -r ~/todo.txt ]; then
4
+    cat ~/todo.txt
5
+fi

+ 19
- 0
.bashrc.d/__available__/venv_prompt.sh View File

1
+function venv_status {
2
+  COLOR_WHITE="\033[00m"
3
+  COLOR_CYAN="\033[1;36m"
4
+  COLOR_RED="\033[1;31m"
5
+  COLOR_YELLOW="\033[1;33m"
6
+  COLOR_DARKYELLOW="\033[0;33m"
7
+  COLOR_GREEN="\033[1;32m"
8
+  COLOR_DARKGREEN="\033[0;32m"
9
+  COLOR_OCHRE="\033[38;5;95m"
10
+
11
+  if [[ ! $VIRTUAL_ENV == "" ]]; then
12
+    echo -e "$COLOR_DARKGREEN(🐍 `basename \"$VIRTUAL_ENV\"`)$COLOR_OCHRE "
13
+  fi
14
+}
15
+
16
+export VIRTUAL_ENV_DISABLE_PROMPT=1
17
+PS1='$(venv_status)'"$PS1"
18
+export PS1
19
+

+ 5
- 0
.bashrc.d/my_defaults View File

1
+ln -vs __available__/aliases.sh
2
+ln -vs __available__/bin.sh
3
+ln -vs __available__/neofetch.sh
4
+ln -vs __available__/powerline.sh
5
+ln -vs __available__/todo.sh

+ 17
- 0
add_bash View File

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

Loading…
Cancel
Save