Add oh-my-bash
This commit is contained in:
parent
3d17d60bc9
commit
6b3f597745
7 changed files with 106 additions and 58 deletions
112
.bashrc
112
.bashrc
|
@ -1,29 +1,101 @@
|
||||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
# Path to your oh-my-bash installation.
|
||||||
|
export OSH=/home/tobias/.config/bash/oh-my-bash
|
||||||
|
|
||||||
source $HOME/.config/environment
|
# Set name of the theme to load. Optionally, if you set this to "random"
|
||||||
|
# it'll load a random theme each time that oh-my-bash is loaded.
|
||||||
|
OSH_THEME="font"
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
[ -z "$PS1" ] && return
|
# CASE_SENSITIVE="true"
|
||||||
|
|
||||||
# ignoredups and ignorespace
|
# Uncomment the following line to use hyphen-insensitive completion. Case
|
||||||
HISTCONTROL=ignoreboth
|
# sensitive completion must be off. _ and - will be interchangeable.
|
||||||
HISTFILE=$HOME/.cache/bash_history
|
# HYPHEN_INSENSITIVE="true"
|
||||||
|
|
||||||
# append to the history file, don't overwrite it
|
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||||
shopt -s histappend
|
# DISABLE_AUTO_UPDATE="true"
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
# Uncomment the following line to change how often to auto-update (in days).
|
||||||
# update the values of LINES and COLUMNS.
|
# export UPDATE_OSH_DAYS=13
|
||||||
shopt -s checkwinsize
|
|
||||||
|
|
||||||
[ -f $HOME/.config/bash/colours ] && source $HOME/.config/bash/colours
|
# Uncomment the following line to disable colors in ls.
|
||||||
|
# DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
PS1="$PURPLE\u$nc@$BLUE\H$nc:$GREEN\w$YELLOW"'$(__git_ps1)'"$nc\\n$GREEN\$$nc "
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
if [ -f /usr/share/git/completion/git-prompt.sh ]; then
|
# Uncomment the following line to enable command auto-correction.
|
||||||
source /usr/share/git/completion/git-prompt.sh
|
# ENABLE_CORRECTION="true"
|
||||||
else
|
|
||||||
function __git_ps1() { echo ""; };
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -f "$HOME/.config/aliasrc" ] && source $HOME/.config/aliasrc
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to disable marking untracked files
|
||||||
|
# under VCS as dirty. This makes repository status check for large repositories
|
||||||
|
# much, much faster.
|
||||||
|
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to change the command execution time
|
||||||
|
# stamp shown in the history command output.
|
||||||
|
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
|
# HIST_STAMPS="mm/dd/yyyy"
|
||||||
|
|
||||||
|
# Would you like to use another custom folder than $OSH/custom?
|
||||||
|
# OSH_CUSTOM=/path/to/new-custom-folder
|
||||||
|
|
||||||
|
# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)
|
||||||
|
# Custom completions may be added to ~/.oh-my-bash/custom/completions/
|
||||||
|
# Example format: completions=(ssh git bundler gem pip pip3)
|
||||||
|
# Add wisely, as too many completions slow down shell startup.
|
||||||
|
completions=(
|
||||||
|
git
|
||||||
|
composer
|
||||||
|
ssh
|
||||||
|
)
|
||||||
|
|
||||||
|
# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)
|
||||||
|
# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/
|
||||||
|
# Example format: aliases=(vagrant composer git-avh)
|
||||||
|
# Add wisely, as too many aliases slow down shell startup.
|
||||||
|
aliases=(
|
||||||
|
general
|
||||||
|
)
|
||||||
|
|
||||||
|
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)
|
||||||
|
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
|
||||||
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
|
plugins=(
|
||||||
|
git
|
||||||
|
bashmarks
|
||||||
|
)
|
||||||
|
|
||||||
|
source $OSH/oh-my-bash.sh
|
||||||
|
|
||||||
|
# User configuration
|
||||||
|
# export MANPATH="/usr/local/man:$MANPATH"
|
||||||
|
|
||||||
|
# You may need to manually set your language environment
|
||||||
|
# export LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
# Preferred editor for local and remote sessions
|
||||||
|
# if [[ -n $SSH_CONNECTION ]]; then
|
||||||
|
# export EDITOR='vim'
|
||||||
|
# else
|
||||||
|
# export EDITOR='mvim'
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# Compilation flags
|
||||||
|
# export ARCHFLAGS="-arch x86_64"
|
||||||
|
|
||||||
|
# ssh
|
||||||
|
# export SSH_KEY_PATH="~/.ssh/rsa_id"
|
||||||
|
|
||||||
|
# Set personal aliases, overriding those provided by oh-my-bash libs,
|
||||||
|
# plugins, and themes. Aliases can be placed here, though oh-my-bash
|
||||||
|
# users are encouraged to define aliases within the OSH_CUSTOM folder.
|
||||||
|
# For a full list of active aliases, run `alias`.
|
||||||
|
#
|
||||||
|
# Example aliases
|
||||||
|
# alias bashconfig="mate ~/.bashrc"
|
||||||
|
# alias ohmybash="mate ~/.oh-my-bash"
|
||||||
|
|
|
@ -7,7 +7,7 @@ alias aliases='vim ~/.config/aliasrc && source ~/.config/aliasrc'
|
||||||
|
|
||||||
alias bfg='java -jar ~/tools/bfg-1.13.0.jar'
|
alias bfg='java -jar ~/tools/bfg-1.13.0.jar'
|
||||||
|
|
||||||
alias cp='cp -i'
|
alias cp='cp -iv'
|
||||||
|
|
||||||
alias df='df -h'
|
alias df='df -h'
|
||||||
alias doas='doas -- '
|
alias doas='doas -- '
|
||||||
|
@ -23,11 +23,14 @@ alias hist-grep='history 0 | grep '
|
||||||
|
|
||||||
alias j='jump'
|
alias j='jump'
|
||||||
|
|
||||||
alias ls='ls -Flh --color=auto'
|
alias less='less -FS'
|
||||||
|
alias ls='ls -lFh --color=auto'
|
||||||
|
|
||||||
alias lsblk='lsblk -o +PARTLABEL -o +FSTYPE'
|
alias lsblk='lsblk -o +PARTLABEL -o +FSTYPE'
|
||||||
|
|
||||||
alias make='make -j5'
|
alias make='make -j5'
|
||||||
|
alias mkdir='mkdir -pv'
|
||||||
|
alias mv='mv -iv'
|
||||||
|
|
||||||
alias pacman-autoremove='pacman -Rns $(pacman -Qtdq)'
|
alias pacman-autoremove='pacman -Rns $(pacman -Qtdq)'
|
||||||
|
|
||||||
|
@ -35,8 +38,11 @@ alias qutebrowser-kiosk='qutebrowser -B $XDG_DATA_DIR/qutebrowser-kiosk -C $XDG_
|
||||||
|
|
||||||
alias rm='rm -I --one-file-system -v'
|
alias rm='rm -I --one-file-system -v'
|
||||||
|
|
||||||
|
alias s3cmd="s3cmd --config=$XDG_CONFIG_DIR/s3cmd/config"
|
||||||
alias sudo='sudo '
|
alias sudo='sudo '
|
||||||
|
|
||||||
|
alias wget='wget -c'
|
||||||
|
|
||||||
### conditionals
|
### conditionals
|
||||||
|
|
||||||
[ -x "$(command -v bat)" ] && alias cat='bat -pp'
|
[ -x "$(command -v bat)" ] && alias cat='bat -pp'
|
||||||
|
|
0
.config/bash/.gitkeep
Normal file
0
.config/bash/.gitkeep
Normal file
|
@ -1,33 +0,0 @@
|
||||||
black='\[\e[0;30m\]'
|
|
||||||
BLACK='\[\e[1;30m\]'
|
|
||||||
blackbg='\[\e[40m\]'
|
|
||||||
|
|
||||||
red='\[\e[0;31m\]'
|
|
||||||
RED='\[\e[1;31m\]'
|
|
||||||
redbg='\[\e[41m\]'
|
|
||||||
|
|
||||||
green='\[\e[0;32m\]'
|
|
||||||
GREEN='\[\e[1;32m\]'
|
|
||||||
greenbg='\[\e[42m\]'
|
|
||||||
|
|
||||||
yellow='\[\e[0;33m\]'
|
|
||||||
YELLOW='\[\e[1;33m\]'
|
|
||||||
yellowbg='\[\e[43m\]'
|
|
||||||
|
|
||||||
blue='\[\e[0;34m\]'
|
|
||||||
BLUE='\[\e[1;34m\]'
|
|
||||||
bluebg='\[\e[44m\]'
|
|
||||||
|
|
||||||
purple='\[\e[0;35m\]'
|
|
||||||
PURPLE='\[\e[1;35m\]'
|
|
||||||
purplebg='\[\e[45m\]'
|
|
||||||
|
|
||||||
cyan='\[\e[0;36m\]'
|
|
||||||
CYAN='\[\e[1;36m\]'
|
|
||||||
cyanbg='\[\e[46m\]'
|
|
||||||
|
|
||||||
white='\[\e[0;37m\]'
|
|
||||||
WHITE='\[\e[1;37m\]'
|
|
||||||
whitebg='\[\e[47m\]'
|
|
||||||
|
|
||||||
nc='\[\e[0m\]'
|
|
|
@ -13,10 +13,12 @@ export MARKPATH="$HOME/.config/zsh/jump_marks"
|
||||||
|
|
||||||
export NOTMUCH_CONFIG="$HOME/.config/notmuch/config"
|
export NOTMUCH_CONFIG="$HOME/.config/notmuch/config"
|
||||||
|
|
||||||
export PASSWORD_STORE_GENERATED_LENGTH='64'
|
export OSH="$HOME/.config/bash/oh-my-bash"
|
||||||
|
|
||||||
|
export PASSWORD_STORE_GENERATED_LENGTH='64'
|
||||||
export PATH=/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:$HOME/.local/bin:$GOPATH/bin
|
export PATH=/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:$HOME/.local/bin:$GOPATH/bin
|
||||||
|
|
||||||
export VIMINIT="source $HOME/.config/vim/vimrc"
|
export VIMINIT="source $HOME/.config/vim/vimrc"
|
||||||
|
|
||||||
export ZDOTDIR="$HOME/.config/zsh"
|
export ZDOTDIR="$HOME/.config/zsh"
|
||||||
|
export ZSH="$ZDOTDIR/oh-my-zsh"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Path to your oh-my-zsh installation.
|
source "$HOME/.config/environment"
|
||||||
export ZSH="$ZDOTDIR/oh-my-zsh"
|
|
||||||
|
|
||||||
if [ ! -f "$ZSH/oh-my-zsh.sh" ]
|
if [ ! -f "$ZSH/oh-my-zsh.sh" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -2,6 +2,8 @@ export VIMINIT='source ~/.config/vim/vimrc'
|
||||||
export PASSWORD_STORE_GENERATED_LENGTH='64'
|
export PASSWORD_STORE_GENERATED_LENGTH='64'
|
||||||
export ZDOTDIR="$HOME/.config/zsh"
|
export ZDOTDIR="$HOME/.config/zsh"
|
||||||
|
|
||||||
|
source "$HOME/.config/environment"
|
||||||
|
|
||||||
if [ -x "$(command -v gpgconf)" ]; then
|
if [ -x "$(command -v gpgconf)" ]; then
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
gpgconf --launch gpg-agent
|
gpgconf --launch gpg-agent
|
||||||
|
|
Loading…
Reference in a new issue