dotfiles/bashrc/.bashrc

71 lines
2.0 KiB
Bash
Raw Normal View History

2022-03-01 03:54:50 +00:00
#
# ~/.bashrc
#
2025-02-28 14:25:30 +00:00
# If not running interactively, don't do anything
2022-03-01 03:54:50 +00:00
[[ $- != *i* ]] && return
2025-02-28 14:25:30 +00:00
# that ain't vimlike
set -o vi
bind -m vi-command 'Control-l: clear-screen'
bind -m vi-insert 'Control-l: clear-screen'
2022-03-01 03:54:50 +00:00
2025-02-28 14:25:30 +00:00
# prompt
PS1='\[\e[32m\]\u@\h\[\e[0m\]:\[\e[34m\]\w\[\e[0m\] \$ '
2022-03-01 03:54:50 +00:00
2025-02-28 14:25:30 +00:00
# Source this file from git that expands PS1 stuff
2025-02-28 14:52:24 +00:00
GIT_PS1_SHOWUPSTREAM='verbose name'
2025-02-28 14:25:30 +00:00
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
2025-02-28 14:52:24 +00:00
#GIT_PS1_SHOWCOLORHINTS=true
GIT_PS1_DESCRIBE_STYLE=branch
2025-02-28 14:25:30 +00:00
source /etc/bash_completion.d/git-prompt.sh
2025-02-28 15:08:46 +00:00
PS1='\[\e[01;32m\]\u@\h\[\e[0m\]:\[\e[01;34m\]\w\[\e[0m\]$(__git_ps1 "(%s)")\[\e[0m\]\$ '
2025-03-25 00:00:40 +00:00
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
. /usr/share/bash-completion/bash_completion
2022-03-01 03:54:50 +00:00
2025-02-28 14:25:30 +00:00
# History settings: no duplicates, decent size
HISTSIZE=10000
HISTFILESIZE=2000
HISTCONTROL=ignoredups
2022-03-01 03:54:50 +00:00
2024-02-06 03:21:57 +00:00
# aliases
alias python="python3"
2022-03-01 03:54:50 +00:00
alias cp="cp -i" # confirm before overwriting something
alias np='nano -w PKGBUILD'
2024-02-06 03:21:57 +00:00
alias more="less"
2022-09-29 01:44:12 +00:00
alias rofi='rofi -m 1'
2024-02-06 03:21:57 +00:00
alias weather="curl wttr.in"
alias ls="exa -lhg --group-directories-first"
alias ll="exa -lhga --group-directories-first"
alias vim="nvim"
alias docs="python ~/scripts/stock_price.py -s docs"
alias stock="python ~/scripts/stock_price.py -s "
2024-02-27 20:15:53 +00:00
alias r="ranger"
2025-02-28 14:25:30 +00:00
alias grep='grep --colour=auto'
2022-03-01 03:54:50 +00:00
2025-02-28 14:25:30 +00:00
# expand path
PATH=/usr/local/bin:/usr/bin/:/usr/sbin
PATH=$PATH:~/.local/share
2022-03-01 03:54:50 +00:00
2025-02-28 14:25:30 +00:00
# exports
export EDITOR=/usr/bin/nvim
export BROWSER=firefox
2022-03-01 03:54:50 +00:00
2025-02-28 14:25:30 +00:00
# fzf
export FZF_DEFAULT_OPTS='--layout=reverse --height=50% --preview-window=right:50%:border-sharp --border-label=" command preview " --border=double'
2022-03-01 03:54:50 +00:00
2025-02-28 14:25:30 +00:00
# Set up fzf key bindings and fuzzy completion
# Ctrl+R override for bash history
# Alt-C overried to cd into selected directory
eval "$(fzf --bash)"
2022-03-01 03:54:50 +00:00
2025-02-28 14:25:30 +00:00
# Quick file finder with preview and open with vim (Ctrl+T override)
bind '"\C-t": "fzf --preview \"cat {}\" < <(find . -type f) | xargs $EDITOR\n"'
2022-03-06 21:45:05 +00:00
2025-02-28 14:25:30 +00:00
# kinda annoying tbh
2025-02-05 06:34:16 +00:00
# pfetch || neofetch || fastfetch
2025-05-07 19:55:40 +00:00
# Created by `pipx` on 2025-05-04 00:05:20
export PATH="$PATH:/home/clint/.local/bin"