summaryrefslogtreecommitdiff
path: root/.config/shell/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.config/shell/.bashrc')
-rw-r--r--.config/shell/.bashrc71
1 files changed, 71 insertions, 0 deletions
diff --git a/.config/shell/.bashrc b/.config/shell/.bashrc
new file mode 100644
index 0000000..6474a3b
--- /dev/null
+++ b/.config/shell/.bashrc
@@ -0,0 +1,71 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+
+# If not running interactively, don't do anything
+case $- in
+ *i*) ;;
+ *) return;;
+esac
+
+# don't put duplicate lines or lines starting with space in the history.
+HISTCONTROL=ignoreboth
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=1000
+HISTFILESIZE=2000
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# set a fancy prompt
+case "$TERM" in
+ *-256color) color_prompt=yes;;
+esac
+
+# colored GCC warnings and errors
+export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
+
+# Alias definitions
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+# Set vi mode as the default mode
+set -o vi
+
+# Opam configuration
+test -r /home/filipek/.opam/opam-init/init.sh && . /home/filipek/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
+
+# Set options for some frequently used programs
+export LS_OPTIONS='-lha --color=auto'
+export TAR_EXTRACT='-xvzf'
+export TAR_ARCHIVE='-cvzf'
+export MKDIR_OPTIONS='-p'
+export RSYNC_OPTIONS='-rtvzP'
+export MANPAGER="vim -M +MANPAGER - "
+
+export SCRIPTS=$HOME/.scripts
+export PATH=$SCRIPTS:$HOME/.cargo/bin:$HOME/.local/bin:$PATH
+export EDITOR="vim"
+export BROWSER="librewolf"
+
+# GPG Config
+GPG_TTY=$(tty)
+export GPG_TTY
+
+# Prompt colors
+export PS1="\[$(tput setaf 2)\]\u\[$(tput setaf 35)\]@\[$(tput setaf 10)\]\h \[$(tput setaf 33)\]\w \[$(tput sgr0)\]$ "
+force_color_prompt=yes
+
+# Run these scripts at login
+remaps
+
+# After every command, switch to insert mode automatically
+bind -m vi-command 'RETURN':vi-insert-mode
+
+# Make it so that Ctrl+L works in vi mode
+bind -m vi-command '"\C-l": clear-screen'
+bind -m vi-insert '"\C-l": clear-screen'