Commit 42e69b6
xxwhirlpool
·
2026-03-18 11:28:28 -0400 EDT
parent 4936460
cleanup bashrc_pc
1 files changed,
+12,
-33
+12,
-33
| ... | ... | @@ -3,6 +3,10 @@ | |
| 3 | 3 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| 4 | 4 | # for examples | |
| 5 | 5 | ||
| 6 | + | ###################################### | |
| 7 | + | # default stuff i'm scared to change | |
| 8 | + | ###################################### | |
| 9 | + | ||
| 6 | 10 | # If not running interactively, don't do anything | |
| 7 | 11 | case $- in | |
| 8 | 12 | *i*) ;; |
| ... | ... | @@ -10,7 +14,6 @@ case $- in | |
| 10 | 14 | esac | |
| 11 | 15 | ||
| 12 | 16 | # don't put duplicate lines or lines starting with space in the history. | |
| 13 | - | # See bash(1) for more options | |
| 14 | 17 | HISTCONTROL=ignoreboth | |
| 15 | 18 | ||
| 16 | 19 | # append to the history file, don't overwrite it |
| ... | ... | @@ -24,10 +27,6 @@ HISTFILESIZE=2000 | |
| 24 | 27 | # update the values of LINES and COLUMNS. | |
| 25 | 28 | shopt -s checkwinsize | |
| 26 | 29 | ||
| 27 | - | # If set, the pattern "**" used in a pathname expansion context will | |
| 28 | - | # match all files and zero or more directories and subdirectories. | |
| 29 | - | #shopt -s globstar | |
| 30 | - | ||
| 31 | 30 | # make less more friendly for non-text input files, see lesspipe(1) | |
| 32 | 31 | [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | |
| 33 | 32 |
| ... | ... | @@ -36,21 +35,14 @@ if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | |
| 36 | 35 | debian_chroot=$(cat /etc/debian_chroot) | |
| 37 | 36 | fi | |
| 38 | 37 | ||
| 39 | - | # set a fancy prompt (non-color, unless we know we "want" color) | |
| 40 | 38 | case "$TERM" in | |
| 41 | 39 | xterm-color|*-256color) color_prompt=yes;; | |
| 42 | 40 | esac | |
| 43 | 41 | ||
| 44 | - | # uncomment for a colored prompt, if the terminal has the capability; turned | |
| 45 | - | # off by default to not distract the user: the focus in a terminal window | |
| 46 | - | # should be on the output of commands, not on the prompt | |
| 47 | 42 | #force_color_prompt=yes | |
| 48 | 43 | ||
| 49 | 44 | if [ -n "$force_color_prompt" ]; then | |
| 50 | 45 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
| 51 | - | # We have color support; assume it's compliant with Ecma-48 | |
| 52 | - | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such | |
| 53 | - | # a case would tend to support setf rather than setaf.) | |
| 54 | 46 | color_prompt=yes | |
| 55 | 47 | else | |
| 56 | 48 | color_prompt= |
| ... | ... | @@ -77,34 +69,18 @@ esac | |
| 77 | 69 | if [ -x /usr/bin/dircolors ]; then | |
| 78 | 70 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
| 79 | 71 | alias ls='ls --color=auto' | |
| 80 | - | #alias dir='dir --color=auto' | |
| 81 | - | #alias vdir='vdir --color=auto' | |
| 82 | 72 | ||
| 83 | 73 | alias grep='grep --color=auto' | |
| 84 | 74 | alias fgrep='fgrep --color=auto' | |
| 85 | 75 | alias egrep='egrep --color=auto' | |
| 86 | 76 | fi | |
| 87 | 77 | ||
| 88 | - | # colored GCC warnings and errors | |
| 89 | - | #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | |
| 90 | - | ||
| 91 | - | # some more ls aliases | |
| 92 | - | alias ll='ls -alF' | |
| 93 | - | alias la='ls -A' | |
| 94 | - | alias l='ls -CF' | |
| 95 | - | ||
| 96 | 78 | # Alias definitions. | |
| 97 | - | # You may want to put all your additions into a separate file like | |
| 98 | - | # ~/.bash_aliases, instead of adding them here directly. | |
| 99 | - | # See /usr/share/doc/bash-doc/examples in the bash-doc package. | |
| 100 | - | ||
| 101 | 79 | if [ -f ~/.bash_aliases ]; then | |
| 102 | 80 | . ~/.bash_aliases | |
| 103 | 81 | fi | |
| 104 | 82 | ||
| 105 | - | # enable programmable completion features (you don't need to enable | |
| 106 | - | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile | |
| 107 | - | # sources /etc/bash.bashrc). | |
| 83 | + | # enable programmable completion features | |
| 108 | 84 | if ! shopt -oq posix; then | |
| 109 | 85 | if [ -f /usr/share/bash-completion/bash_completion ]; then | |
| 110 | 86 | . /usr/share/bash-completion/bash_completion |
| ... | ... | @@ -133,7 +109,7 @@ alias freeze="freeze -c user" | |
| 133 | 109 | alias glow="glow -p" | |
| 134 | 110 | alias qrcode="qrencode -t ansiutf8" | |
| 135 | 111 | alias ffmpeg="ffmpeg -hide_banner" | |
| 136 | - | alias open="xdg-open &> /dev/null" | |
| 112 | + | alias c="clear" | |
| 137 | 113 | ||
| 138 | 114 | # weather stuff | |
| 139 | 115 | alias wttr="curl https://wttr.in/nyc?F0ASu" |
| ... | ... | @@ -220,9 +196,12 @@ portfree() { | |
| 220 | 196 | # print internal & external IPs | |
| 221 | 197 | whatip() { | |
| 222 | 198 | # internal | |
| 223 | - | echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}' | |
| 199 | + | echo -n "internal IP: " | lolcat -p 0.7 | |
| 200 | + | hostname -I | awk '{print $1}' | |
| 201 | + | ||
| 224 | 202 | # external | |
| 225 | - | echo -n "external IP: " | lolcat -p 0.7; curl -4 icanhazip.com | |
| 203 | + | echo -n "external IP: " | lolcat -p 0.7 | |
| 204 | + | curl -4 icanhazip.com | |
| 226 | 205 | } | |
| 227 | 206 | ||
| 228 | 207 | # password generator. takes input for password length by number |