From b197b7e2bc9448278ceecd30741a93e45c97e9db Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Sat, 1 Aug 2026 17:13:37 +0200 Subject: [PATCH] Normalize indentation to spaces --- .bash_completion | 6 +-- .bashrc | 30 ++++++------- .config/bashrc.d/10_common.sh | 59 +++++++++++++------------ .config/bashrc.d/30_desktop.sh | 2 +- .config/bashrc.d/60_server.sh | 4 +- .config/git/config.inc/common.gitconfig | 10 ++--- .profile | 8 ++-- 7 files changed, 60 insertions(+), 59 deletions(-) diff --git a/.bash_completion b/.bash_completion index 4270820..fd0492e 100644 --- a/.bash_completion +++ b/.bash_completion @@ -2,7 +2,7 @@ # Include all files from ~/.bash_completion.d/ if [[ -d ~/.bash_completion.d ]]; then - for f in ~/.bash_completion.d/*; do - [[ -f "$f" ]] && . "$f" - done + for f in ~/.bash_completion.d/*; do + [[ -f "$f" ]] && . "$f" + done fi diff --git a/.bashrc b/.bashrc index 9ac27dc..9014ba1 100644 --- a/.bashrc +++ b/.bashrc @@ -40,15 +40,15 @@ alias ll='ls -la' # Colored man pages man() { - env \ - LESS_TERMCAP_mb=$(printf "\e[1;31m") \ - LESS_TERMCAP_md=$(printf "\e[1;31m") \ - LESS_TERMCAP_me=$(printf "\e[0m") \ - LESS_TERMCAP_se=$(printf "\e[0m") \ - LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ - LESS_TERMCAP_ue=$(printf "\e[0m") \ - LESS_TERMCAP_us=$(printf "\e[1;32m") \ - man "$@" + env \ + LESS_TERMCAP_mb=$(printf "\e[1;31m") \ + LESS_TERMCAP_md=$(printf "\e[1;31m") \ + LESS_TERMCAP_me=$(printf "\e[0m") \ + LESS_TERMCAP_se=$(printf "\e[0m") \ + LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ + LESS_TERMCAP_ue=$(printf "\e[0m") \ + LESS_TERMCAP_us=$(printf "\e[1;32m") \ + man "$@" } # (Other aliases are defined in .bashrc.d/10_common_aliases.sh etc.) @@ -67,21 +67,21 @@ TWHITEB='\[\e[1;37m\]' # White bold # Set default prompt if [[ ${EUID} == 0 ]] ; then - PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}" + PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}" else - PS1="${TGREEN}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}" + PS1="${TGREEN}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}" fi # Include drop-in files if [[ -d ~/.config/bashrc.d ]]; then - for f in ~/.config/bashrc.d/*; do - [[ -f $f ]] && source "$f" - done + for f in ~/.config/bashrc.d/*; do + [[ -f $f ]] && source "$f" + done fi # Deprecation warning for old drop-in file locations if [[ -e ~/.bashrc.d || -e ~/.bashrc.local ]]; then - echo "WARNING: ~/.bashrc.d and ~/.bashrc.local are ignored, please use ~/.config/bashrc.d/ instead." + echo "WARNING: ~/.bashrc.d and ~/.bashrc.local are ignored, please use ~/.config/bashrc.d/ instead." fi # Clean up environment variables diff --git a/.config/bashrc.d/10_common.sh b/.config/bashrc.d/10_common.sh index b4dc5ec..6bf0b0d 100644 --- a/.config/bashrc.d/10_common.sh +++ b/.config/bashrc.d/10_common.sh @@ -17,64 +17,65 @@ alias suvim='sudo -e' # Stop Ctrl-S from doing terminally things in vim/vimdiff vim() { - local STTYOPTS="$(stty --save)" - stty stop '' -ixoff - command vim "$@" - stty "$STTYOPTS" + local STTYOPTS="$(stty --save)" + stty stop '' -ixoff + command vim "$@" + stty "$STTYOPTS" } vimdiff() { - local STTYOPTS="$(stty --save)" - stty stop '' -ixoff - command vimdiff "$@" - stty "$STTYOPTS" + local STTYOPTS="$(stty --save)" + stty stop '' -ixoff + command vimdiff "$@" + stty "$STTYOPTS" } # yay without parameters does "pacman -Syu" but I don't want it to do this yay() { - [[ $# -gt 0 ]] || { echo "error: no operation specified (use -h for help)"; return 1; } - command yay "$@" + [[ $# -gt 0 ]] || { echo "error: no operation specified (use -h for help)"; return 1; } + command yay "$@" } # Create and cd to temporary directory ~/tmp/tmp.YYYYMMDD.XXXXXX or ~/tmp/tmp.$1.XXXXXX if an argument is given function cdtmp() { - cd $(mktemp -d -p ~/tmp tmp.${1:-$(date +%Y%m%d)}.XXXXXX) + cd $(mktemp -d -p ~/tmp tmp.${1:-$(date +%Y%m%d)}.XXXXXX) } # Make dir and cd into it (from Mara) function mkcd() { - mkdir -p "$1" - cd "$1" + mkdir -p "$1" + cd "$1" } # cd into dir + ll (ls -la) function cdll() { - cd "$1" - ls -la + cd "$1" + ls -la } # Show content of something, `ls` for dirs (and special files), `cat` for files +# TODO: actually `highlight` for fancy colors function lscat() { - [[ $# -eq 0 ]] && ls -la && return - printnewline="" - for f in "$@"; do - [[ $printnewline ]] && echo - printnewline=1 - if [[ -f $f ]]; then - [[ $# -gt 1 ]] && echo "-- cat \"$f\"" - cat "$f" - else - [[ $# -gt 1 ]] && echo "-- ls \"$f\"" - ls -la "$f" - fi - done + [[ $# -eq 0 ]] && ls -la && return + printnewline="" + for f in "$@"; do + [[ $printnewline ]] && echo + printnewline=1 + if [[ -f $f ]]; then + [[ $# -gt 1 ]] && echo "-- cat \"$f\"" + cat "$f" + else + [[ $# -gt 1 ]] && echo "-- ls \"$f\"" + ls -la "$f" + fi + done } # Shortcut for lscat (either c for cat or c for "see") alias c='lscat' function calc() { - echo "$@" | bc + echo "$@" | bc } # termbin.com: terminal pastebin diff --git a/.config/bashrc.d/30_desktop.sh b/.config/bashrc.d/30_desktop.sh index c0d556e..a7c5649 100644 --- a/.config/bashrc.d/30_desktop.sh +++ b/.config/bashrc.d/30_desktop.sh @@ -4,7 +4,7 @@ # Open files according to MIME type xo() { - (nohup mimeopen "$@" 2>/dev/null 1>&2 &) + (nohup mimeopen "$@" 2>/dev/null 1>&2 &) } # X application aliases diff --git a/.config/bashrc.d/60_server.sh b/.config/bashrc.d/60_server.sh index 9e41ec4..2fdb984 100644 --- a/.config/bashrc.d/60_server.sh +++ b/.config/bashrc.d/60_server.sh @@ -12,7 +12,7 @@ fi # Set prompt: highlight hostname in red to signalize "you're on a server, be careful" if [[ ${EUID} == 0 ]] ; then - PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}" + PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}" else - PS1="${TGREEN}\u@${TRED}\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}" + PS1="${TGREEN}\u@${TRED}\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}" fi diff --git a/.config/git/config.inc/common.gitconfig b/.config/git/config.inc/common.gitconfig index bfe6e16..7be7d70 100644 --- a/.config/git/config.inc/common.gitconfig +++ b/.config/git/config.inc/common.gitconfig @@ -1,6 +1,6 @@ [core] # Normalize line endings - autocrlf = input + autocrlf = input [advice] detachedHead = false @@ -41,10 +41,10 @@ helper = /usr/lib/git-core/git-credential-libsecret [filter "lfs"] - required = true - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process [pretty] ls = tformat:%C(yellow)%h %Cgreen%ad %Creset%s %Cblue[%an]%C(auto)%d diff --git a/.profile b/.profile index e58d5b9..f68daa6 100644 --- a/.profile +++ b/.profile @@ -22,12 +22,12 @@ export BC_ENV_ARGS="-lq" # Include drop-in files if [[ -d ~/.config/profile.d ]]; then - for f in ~/.config/profile.d/*; do - [[ -f $f ]] && source "$f" - done + for f in ~/.config/profile.d/*; do + [[ -f $f ]] && source "$f" + done fi # Deprecation warning for .profile.local if [[ -e ~/.profile.local ]]; then - echo "WARNING: ~/.profile.local is ignored, please use ~/.config/profile.d/ instead." + echo "WARNING: ~/.profile.local is ignored, please use ~/.config/profile.d/ instead." fi