diff options
| author | mitsuo <[email protected]> | 2021-11-22 04:42:22 -0500 |
|---|---|---|
| committer | mitsuo <[email protected]> | 2021-11-22 04:42:22 -0500 |
| commit | f13815efce733d23ba7dc1003d0decde09fccd4c (patch) | |
| tree | 174d05a6120bc0a32fae7913e5d0fe7e440563c6 | |
| parent | b0f6f00e8e29e320b345faecd24de4e8c0640703 (diff) | |
| download | dotfiles-f13815efce733d23ba7dc1003d0decde09fccd4c.tar.gz dotfiles-f13815efce733d23ba7dc1003d0decde09fccd4c.tar.bz2 dotfiles-f13815efce733d23ba7dc1003d0decde09fccd4c.zip | |
General cleanup, make bashrc safer
- Add "if-fi wrappers" before executing some commands in bashrc
- Attempt in organizing things better in bashrc, profile and
bash_aliases. (Like moving some env. var. exports to bashrc
| -rw-r--r-- | README.md (renamed from readme.md) | 0 | ||||
| -rw-r--r-- | bash_aliases | 16 | ||||
| -rw-r--r-- | bashrc | 61 | ||||
| -rw-r--r-- | profile | 4 | ||||
| -rw-r--r-- | vimrc | 2 |
5 files changed, 43 insertions, 40 deletions
diff --git a/bash_aliases b/bash_aliases index e78483c..89ea6e0 100644 --- a/bash_aliases +++ b/bash_aliases @@ -16,17 +16,7 @@ alias la='ls -A' alias ll='ls -l -h' alias lla='ll -A' alias ls='ls --color=auto --group-directories-first --classify' -#alias less='less -Ri' # make less's searches case insensitive and - # colorized -# TODO move to an appropiate place: -LESS="-i --RAW-CONTROL-CHARS"; -export LESS - -LINDOAPI_HOME=/home/mitsuo/code/LINDO/lindoapi -export LINDOAPI_HOME -LINDOAPI_LICENSE_FILE="$LINDOAPI_HOME/license/lndapi130.lic" -export LINDOAPI_LICENSE_FILE alias gcc='gcc -g -std=c99 -lm' alias ed='ed -p "* "' alias diff='diff -s' @@ -60,8 +50,8 @@ alias mpv_nhk_720p='mpv "https://nhkwlive-ojp.akamaized.net/hls/live/2003459/nhk alias scan_dpto_europa='hp-scan --mode=color --device=hpaio:/net/OfficeJet_Pro_6970?ip=192.168.0.7' #alias java8='~/code/openjdk8/jdk8u265-b01/bin/java' #alias javac8='~/code/openjdk8/jdk8u265-b01/bin/javac' -alias inf265_jupyterlab='cd "/home/mitsuo/docs/courses/2021-1/INF265"; \ - jupyter lab' +#alias inf265_jupyterlab='cd /home/mitsuo/docs/courses/2021-1/INF265; \ +# jupyter lab' # Cosmetic @@ -71,5 +61,3 @@ alias :q='cowsay -d "this isn'\''t Vim"' # To scape single quotes in single # string and add the scaped quote # (\'). alias :w="cowsay -b \"this isn't Vim\"" -alias miola='cowsay -e ^^ "te extraΓ±o, mi galletita"' -alias miola2='cowsay -e ^^ "πNandita π bonita π"' @@ -121,34 +121,43 @@ if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi -# Bash completition for pandoc -eval "$(pandoc --bash-completion)" +# My shit +# ======= -# Greeting or salute -# TODO: randomly select one of the following greeting commands -#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) -#fortune ascii-art - -# Some environmental variables. +# Custom prompt: +# Blue timestamp and italic green pwd +PS1='\[\033[34m\]|\D{%H:%M:%S}| \[\033[3;32m\][\w]\[\033[00m\]\n\$ ' + +# Environmental variables: +# less(1) config (ignore case in searchs and display raw control characters) +export LESS="-i --RAW-CONTROL-CHARS"; +# Needed for tldr(1) export TLDR_CONFIG_DIR="$XDG_CONFIG_HOME" +# Needed for gpg(1)? export GPG=TTY=$(tty) -# Disable this shit that broke many things in my system ( RIP hplip :( ) -## >>> conda initialize >>> -## !! Contents within this block are managed by 'conda init' !! -#__conda_setup="$('/home/mitsuo/code/Anaconda/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" -#if [ $? -eq 0 ]; then -# eval "$__conda_setup" -#else -# if [ -f "/home/mitsuo/code/Anaconda/anaconda3/etc/profile.d/conda.sh" ]; then -# . "/home/mitsuo/code/Anaconda/anaconda3/etc/profile.d/conda.sh" -# else -# export PATH="/home/mitsuo/code/Anaconda/anaconda3/bin:$PATH" -# fi -#fi -#unset __conda_setup -## <<< conda initialize <<< +# Bash completition for pandoc +if [ -f /usr/bin/pandoc ]; then + eval "$(pandoc --bash-completion)" +fi + +# Greeting or salute +if [ -f /usr/games/cowsay ]; then + # TODO: randomly select one of the following greeting commands + #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) + #fortune ascii-art +fi +# Homebrew (linuxbrew) + +if [ -f /usr/bin/brew ]; then + # for elf executables + export PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}" + # for manpages + export MANPATH="/home/linuxbrew/.linuxbrew/share/man:${MANPATH}" + # for info pages + export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH}" +fi @@ -1,3 +1,7 @@ +# On Debian this file is loaded when the user first logs in login(1) +# If you want something that loads everytime a new terminal emulator is launched +# then put it inside .bashrc + if [ "$SHELL" = "/bin/bash" ]; then . ~/.bashrc fi @@ -9,6 +9,8 @@ " βββ΄ββ΄ββ΄ββ΄ββ΄ββ γ γ " XDG compliant REMOVED :D (what a pain) +" - For new installs just copy (or link) this file into ~/.vimrc and create +" the ~/.vim directory " TODO: - sort sections |
