summaryrefslogtreecommitdiffstats
path: root/config/bash
diff options
context:
space:
mode:
Diffstat (limited to 'config/bash')
-rw-r--r--config/bash/bash_aliases66
-rw-r--r--config/bash/bash_profile5
-rw-r--r--config/bash/bashrc158
-rw-r--r--config/bash/inputrc10
-rw-r--r--config/bash/profile12
5 files changed, 0 insertions, 251 deletions
diff --git a/config/bash/bash_aliases b/config/bash/bash_aliases
deleted file mode 100644
index 5ea253d..0000000
--- a/config/bash/bash_aliases
+++ /dev/null
@@ -1,66 +0,0 @@
-# Bash aliases.
-#
-# Aliases are recursive (I.e., an alias inside an alias works).
-
-
-# Shortcuts
-# ======================================================================
-
-alias e="$EDITOR"
-alias aliases="$EDITOR ~/.bash_aliases && source ~/.bash_aliases"
-# wtf error with Code-OSS
-# Ref.: https://stackoverflow.com/a/73317738/7498073
-alias code="code --enable-proposed-api ms-toolsai.jupyter"
-alias echopath='echo "$PATH" | tr ":" "\n"'
-
-
-# Common program's options
-# ======================================================================
-
-# coretools
-alias diff2='diff --color=always -ys' # side by side, tell if file identical
-alias diff='diff --color=always'
-alias dir='dir --color=auto'
-alias grep='grep --color=auto -i' # color case-insensitive
-# Sort files by ASCII value (override current locale)
-alias ls='ls --color=auto --group-directories-first --classify'
-alias la='ls -A'
-alias ll='ls -l -h'
-alias lla='ll -A'
-alias ip='ip --color=auto'
-
-alias gcc='gcc -g -std=c99 -lm'
-alias ed='ed -p "* "'
-
-# https://missing.csail.mit.edu/2020/version-control/
-alias gitlogpretty='git log --all --graph --decorate --abbrev-commit'
-# https://stackoverflow.com/a/15606995/7498073
-alias gitshowtrackedfiles='git ls-tree -r master --name-only'
-
-# Precautionary
-alias rm='rm -I' # Promt before removing more than 3 files
-alias mv='mv -i' # Promt before overwrite
-alias cp='cp -i' # same
-
-#alias sqlite3='sqlite3 --safe' # Disables some really cool dot-commands
-
-
-# Other program's options
-# ======================================================================
-
-alias units='units --verbose'
-alias tty-clock='tty-clock -cs'
-
-# Quick tools
-alias pdfreduce='gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook'
-alias youtube-dl_info='youtube-dl --get-filename --get-format --get-duration --get-description'
-alias youtube-dl_fast='youtube-dl --format "best[height<=720][fps<=?30]" -o '\''%(title)s.%(ext)s'\'
-alias mpv_webcam='mpv av://v4l2:/dev/video0' # retrived from the Archwiki
-alias mpv_nhk_720p='mpv "https://nhkwlive-ojp.akamaized.net/hls/live/2003459/nhkwlive-ojp-en/index_4M.m3u8"'
-
-
-# Cosmetic
-# ======================================================================
-alias :q="cowsay -d \"this isn't Vim\""
-alias :w="cowsay -b \"this isn't Vim\""
-alias sl="sl -de -5"
diff --git a/config/bash/bash_profile b/config/bash/bash_profile
deleted file mode 100644
index 5545f00..0000000
--- a/config/bash/bash_profile
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# ~/.bash_profile
-#
-
-[[ -f ~/.bashrc ]] && . ~/.bashrc
diff --git a/config/bash/bashrc b/config/bash/bashrc
deleted file mode 100644
index 065e12e..0000000
--- a/config/bash/bashrc
+++ /dev/null
@@ -1,158 +0,0 @@
-#
-# ~/.bashrc: executed by bash(1) for interactive shells
-#
-# Tinkerer's guide to a prettier and colorful CLI:
-# https://wiki.archlinux.org/title/Color_output_in_console
-
-# If not running interactively, don't do anything
-[[ $- != *i* ]] && return
-
-# TROUBLESHOOTING
-# ===============
-
-export TERMINAL=st
-export EDITOR=nvim
-export VISUAL=nvim
-export TERM=xterm-256color # Required for AWS VPS work good when SSHing
-
-# https://wiki.archlinux.org/title/GnuPG#Configure_pinentry_to_use_the_correct_TTY
-export GPG_TTY=$(tty)
-gpg-connect-agent updatestartuptty /bye >/dev/null
-
-
-# Bash configuration
-# ==================
-
-# don't put duplicate lines or lines starting with space in the history.
-# See bash(1) for more options
-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. (Isn't this the default behaviour?)
-shopt -s checkwinsize
-
-# If set, the pattern "**" used in a pathname expansion context will
-# match all files and zero or more directories and subdirectories.
-#shopt -s globstar
-
-# make less more friendly for non-text input files, see lesspipe(1)
-#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
-
-# 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
-
-# Don't forget to install bash-completion
-
-# Disable CTRL+S and CTRL+Q keybindings
-# (used to pause and resume output to terminal)
-# See: https://unix.stackexchange.com/a/137846/347754
-# https://unix.stackexchange.com/a/73499/347754
-stty -ixon
-
-
-# Prompt
-# ------
-
-# - user@host pwd (git prompt)
-# Ref.: https://stackoverflow.com/a/15398153/7498073
-source ~/.git-prompt.sh
-PS1='\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$ '
-
-
-# Environment
-# ===========
-
-# Add directories to PATH
-ds=(
- "$HOME/code/tex-live-native/build/bin/x86_64-linux"
- "$HOME/.local/share/gem/ruby/3.0.0/bin"
- "$HOME/.local/bin"
- "$HOME/mahcode/dotfiles/local/bin"
-)
-for d in "${ds[@]}"; do
- if ! echo $PATH | grep -qE "(^|:)$d($|:)"; then
- export PATH="$d:$PATH"
- fi
-done
-
-export MANPATH="$HOME/code/tex-live-native/build/texmf-dist/doc/man:$MANPATH"
-export INFOPATH="$HOME/code/tex-live-native/build/texmf-dist/doc/man:$INFOPATH"
-
-# XDG = Cross-Desktop Group
-# For more info see https://wiki.archlinux.org/index.php/XDG_Base_Directory
-export XDG_CONFIG_HOME="$HOME/.config"
-export XDG_CACHE_HOME="$HOME/.cache"
-export XDG_DATA_HOME="$HOME/.local/share"
-export XDG_STATE_HOME="$HOME/.local/state"
-
-# This is already in .xinitrc
-# fcitx5 (input method)
-#export GTK_IM_MODULE=fcitx
-#export QT_IM_MODULE=fcitx
-#export XMODIFIERS=@im=fcitx
-
-# less
-LESS="-i " # ignore case
-LESS+="-S " # don't chop long lines
-LESS+="--RAW-CONTROL-CHARS"
-export LESS
-
-# better `ls` (and other programs like `tree`) colors
-eval "$(dircolors)"
-
-
-# Extra programs
-# --------------
-
-# tldr
-[ -f /usr/bin/tldr ] && export TLDR_CONFIG_DIR="$XDG_CONFIG_HOME"
-
-# nvm
-#source /usr/share/nvm/init-nvm.sh
-
-# Pandoc: Bash completition for pandoc
-if [ -f /usr/bin/pandoc ]; then
- eval "$(pandoc --bash-completion)"
-fi
-
-# Node.js
-#export NODE_PATH=~/code/nodejs/node-v16.15.1-linux-x64/lib/node_modules
-
-# Rust
-#. "$HOME/.cargo/env"
-
-# Ruby on Rails
-#https://stackoverflow.com/a/19072136/7498073
-#gempath="$HOME/.local/share/gem/ruby/3.0.0/bin"
-#export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
-#if [[ -d $gempath ]]; then
-# export PATH="$PATH:$GEM_HOME/bin"
-#fi
-
-
-# Fun
-# ================
-
-# Greeting or salute
-if [ -f /usr/games/cowsay ] || [ -f /usr/bin/cowsay ]; then
- #cowsay -f flaming-sheep "oh no" # original
- #cowsay $(fortune -e 30% debian-hints 20% linux 20% science \
- #cowsay $(fortune 30% debian-hints 20% linux 20% science \
- # 20% off/linux 10% off/black-humor)
- cowsay $(fortune)
- #fortune ascii-art
-else
- echo "Welcome back $LOGNAME"
-fi
diff --git a/config/bash/inputrc b/config/bash/inputrc
deleted file mode 100644
index f40f4a2..0000000
--- a/config/bash/inputrc
+++ /dev/null
@@ -1,10 +0,0 @@
-# Set up "vi input mode" in bash
-
-set editing-mode vi
-$if mode=vi
-
-set keymap vi-command
-Control-l: clear-screen
-
-set keymap vi-insert
-Control-l: clear-screen
diff --git a/config/bash/profile b/config/bash/profile
deleted file mode 100644
index 956694c..0000000
--- a/config/bash/profile
+++ /dev/null
@@ -1,12 +0,0 @@
-# ~/.profile: executed by the command interpreter for login shells.
-# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
-# exists.
-
-# the default umask is set in /etc/profile; for setting the umask
-# for ssh logins, install and configure the libpam-umask package.
-#umask 022
-
-# if bash
-if [ "$SHELL" = "/bin/bash" ]; then
- . ~/.bashrc
-fi