2021-07-21 01:07:46 +03:00
|
|
|
# If not running interactively, don't do anything
|
|
|
|
[[ $- != *i* ]] && return
|
|
|
|
|
2023-10-08 22:07:21 +03:00
|
|
|
# History settings ########################################
|
2024-06-12 20:46:18 +03:00
|
|
|
shopt -s histappend
|
2023-10-08 22:07:21 +03:00
|
|
|
HISTCONTROL=ignoreboth
|
|
|
|
HISTSIZE=1000
|
|
|
|
HISTFILESIZE=2000
|
|
|
|
###########################################################
|
|
|
|
|
2022-07-09 23:08:21 +03:00
|
|
|
export PS1='\[\e[0;33m\][\t] \[\e[0;32m\][\W]\[\e[0m\] \[\e[0;31m\]> \[\e[0m\]'
|
|
|
|
|
2022-03-15 01:46:48 +03:00
|
|
|
export GPG_TTY=$(tty)
|
2023-04-05 12:00:30 +03:00
|
|
|
export PATH="$PATH:$HOME/.local/bin"
|
2024-06-21 22:35:42 +03:00
|
|
|
export PKGEXT=.pkg.tar # disable compress packages (ArchLinux makepkg)
|
2022-08-21 17:54:14 +03:00
|
|
|
|
2023-10-08 22:07:21 +03:00
|
|
|
# PMNG ####################################################
|
2022-08-07 21:53:20 +03:00
|
|
|
export PMNG_PWD_FILE="$HOME/Vault/.password.yml"
|
|
|
|
export PMNG_TIMEOUT=10
|
2023-04-05 12:00:30 +03:00
|
|
|
###########################################################
|
2021-07-21 01:07:46 +03:00
|
|
|
|
2023-04-05 12:00:30 +03:00
|
|
|
# CryFS ###################################################
|
|
|
|
CRYFS_FRONTEND=noninteractive
|
|
|
|
CRYFS_NO_UPDATE_CHECK=true
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
# ALIASES #################################################
|
2021-07-21 01:07:46 +03:00
|
|
|
alias ls='ls --color=auto'
|
|
|
|
alias df='df -h'
|
|
|
|
alias du='du -h'
|
2022-03-15 01:21:55 +03:00
|
|
|
alias ..='cd ..'
|
2023-12-31 02:25:49 +03:00
|
|
|
alias cf="clang-format -i --style=LLVM --sort-includes=false $1"
|
2021-07-21 01:07:46 +03:00
|
|
|
|
2022-08-21 17:54:14 +03:00
|
|
|
alias cfs='cryfs $HOME/.cryfs/ $HOME/Vault' # CryFS mount
|
2022-08-21 17:49:07 +03:00
|
|
|
alias tardir='tar -cJf "../${PWD##*/}.tar.xz"' # tar.xz current dir
|
2021-08-08 10:02:23 +03:00
|
|
|
alias pacman-orphaned='pacman -Rns $(pacman -Qtdq)' # delete orphaned packages (Arch Linux)
|
2023-06-04 00:01:22 +03:00
|
|
|
alias venv-init='python3 -m venv venv' # make python venv
|
2021-08-08 10:02:23 +03:00
|
|
|
|
2023-04-05 12:00:30 +03:00
|
|
|
# Crystal build ###########################################
|
2022-08-13 11:52:58 +03:00
|
|
|
if command -v shards &> /dev/null; then
|
2023-04-05 12:00:30 +03:00
|
|
|
alias crbuild='shards build'
|
2022-08-13 11:52:58 +03:00
|
|
|
fi
|
2023-04-05 12:00:30 +03:00
|
|
|
###########################################################
|
2022-08-13 11:52:58 +03:00
|
|
|
|
2024-06-12 20:46:18 +03:00
|
|
|
# Alias definitions #######################################
|
|
|
|
if [ -f ~/.bash_aliases ]; then
|
|
|
|
source $HOME/.bash_aliases
|
|
|
|
fi
|
|
|
|
###########################################################
|
|
|
|
|
2023-04-05 12:00:30 +03:00
|
|
|
# NVM (Node.js version manager) ###########################
|
2022-06-25 20:30:27 +03:00
|
|
|
if [ -d "$HOME/.nvm" ]; then
|
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
2022-07-08 14:55:13 +03:00
|
|
|
export PATH="$PATH:node_modules/.bin"
|
2022-06-25 20:30:27 +03:00
|
|
|
fi
|
2023-04-05 12:00:30 +03:00
|
|
|
###########################################################
|
2022-08-11 00:30:35 +03:00
|
|
|
|
2023-04-05 12:00:30 +03:00
|
|
|
# Porteus Sulime Text #####################################
|
2022-08-11 00:30:35 +03:00
|
|
|
if [ -d "/opt/sublime_text-4126/" ]; then
|
|
|
|
alias subl='/opt/sublime_text-4126/sublime_text'
|
|
|
|
fi
|
2023-04-05 12:00:30 +03:00
|
|
|
###########################################################
|
2023-10-08 22:07:21 +03:00
|
|
|
|
|
|
|
# Enable programmable completion ##########################
|
|
|
|
if ! shopt -oq posix; then
|
|
|
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
|
|
|
. /usr/share/bash-completion/bash_completion
|
|
|
|
elif [ -f /etc/bash_completion ]; then
|
|
|
|
. /etc/bash_completion
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
###########################################################
|
2024-06-21 22:36:10 +03:00
|
|
|
|
|
|
|
# WakaTime Terminal #######################################
|
|
|
|
source $HOME/Git/bash-wakatime/bash-wakatime.sh
|
|
|
|
###########################################################
|
2024-06-21 22:37:01 +03:00
|
|
|
|
|
|
|
# XMake ###################################################
|
|
|
|
test -f "/home/user/.xmake/profile" && source "/home/user/.xmake/profile"
|
|
|
|
###########################################################
|