git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.config/flake8
diff options
context:
space:
mode:
Diffstat (limited to '.config/flake8')
0 files changed, 0 insertions, 0 deletions
8 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
#!/usr/bin/env bash
# vim:syntax=sh
# shellcheck disable=SC2034,SC1091

# default Byobu session name
export BSNAME="CHANGEME"
# default screenshot target. Feel free to override in .local.
export SCRSHDIR="${HOME}/Pictures"
# variables for SSH, override in .local:
export SSHHOME="${HOME}/.ssh"
# 1. key files, array:
SSHKEYS=( "${SSHHOME}/id_ed25519" "${SSHHOME}/id_rsa" )
# 3. Hosts on which ssh-agent should run, FQDN. Array.
# Typically, "hosts" will equal your workstations. See ssh_config(5) (esp. ForwardAgent)
# Interpreted by fgrep / grep -F.
SSHAGH=( "riesling.example.com" "schorle.example.com" )
SSHAGH+=( "woschd.example.com" )
export SSHAGH

# ----- SHELL ----- #
for pa in "/usr/local/bin" "${HOME}/bin" "${HOME}/.local/bin" "${HOME}/go/bin";do
	if [ -x "$pa" ]; then
		if ! printf "%b" "$PATH"|grep -E "^${pa}:|:${pa}:" >/dev/null;then
			export PATH="${pa}:${PATH}"
		fi
	fi
done
# $OSNAME
if [ -r "/etc/os-release" ];then
    OSNAME="$(grep ^ID /etc/os-release|awk -F= '{print $NF}'|head -n1|sed 's/"//g')"
    if grep '^DEBIAN_VERSION_FULL' /etc/os-release >/dev/null 2>&1; then
    	OSVER="$(grep '^DEBIAN_VERSION_FULL' /etc/os-release|awk -F= '{print $NF}'|head -n1|sed 's/"//g')"
    elif grep '^BUILD_ID' /etc/os-release >/dev/null 2>&1; then
    	OSVER="$(grep '^BUILD_ID' /etc/os-release|awk -F= '{print $NF}'|head -n1|sed 's/"//g')"
    else
    	OSVER="$(grep '^VERSION_ID' /etc/os-release|awk -F= '{print $NF}'|head -n1|sed 's/"//g')"
    fi
elif [ "$(uname -s)" == 'SunOS' ]; then OSNAME="sunos"
elif [ -r "/etc/redhat-release" ];then
    grep -E "^Red[\ ]?[Hh]at" /etc/redhat-release >/dev/null 2>&1 && OSNAME="redhat"
    grep -E "^[Ff]edora" /etc/redhat-release >/dev/null 2>&1 && OSNAME="fedora"
    grep -E "^[Cc]ent[Oo][Ss]" /etc/redhat-release >/dev/null 2>&1 && OSNAME="centos"
    [ -z "$OSNAME" ]&&OSNAME="obsolete"
elif [ -r "/etc/SuSE-release" ];then
    OSNAME="oldsuse"
elif [ -r "/etc/release" ];then
    head -n1 /etc/release 2> /dev/null|grep -i solaris > /dev/null && OSNAME="solaris"
    [ -z "$OSNAME" ]&&OSNAME="obsolete"
else
	[ "$(oslevel -s >/dev/null 2>&1|wc -l)" -gt 0 ]&&OSNAME="aix"
    [ -z "$OSNAME" ]&&OSNAME="obsolete"
fi
declare -x GPG_TTY
GPG_TTY="$(tty)"
export e='2.718281828459045'
if command -v bc >/dev/null;then
	declare -x pi
	pi="$(echo "scale=64; 4*a(1)" | bc -l)"
fi

# ----- GIT ----- #
# git on the command line
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1

# ----- LESS FOR EVERYTHING ----- #
if command -v less >/dev/null;then
	# coloured mapages
	export LESS_TERMCAP_mb=$'\E[01;31m'
	export LESS_TERMCAP_md=$'\E[01;31m'
	export LESS_TERMCAP_me=$'\E[0m'
	export LESS_TERMCAP_se=$'\E[0m'
	export LESS_TERMCAP_so=$'\E[01;44;33m'
	export LESS_TERMCAP_ue=$'\E[0m'
	export LESS_TERMCAP_us=$'\E[01;32m'
	# make less more friendly for non-text input files, see lesspipe(1)
	[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
	export SYSTEMD_PAGER="less"
	export LESSANSIENDCHARS="m"
	export LESSANSIMIDCHARS="0123456789:;[?!\"'#%()*+ "
fi

# ----- RUBY ----- #
# Include local gems' binary path from those gems matching /usr/bin/ruby:
if [ -x '/usr/bin/ruby' ]; then
	rubymajmin="$(/usr/bin/ruby -e 'print(RUBY_VERSION.gsub(%r{\.[0-9]+$}, '\'\''))')"
	rubypath="${HOME}/.gem/ruby/${rubymajmin}.0/bin"
	unset rubymajmin
	if [ -d "$rubypath" ]; then
		if ! printf '%b' "$PATH" | grep -P "(^|:)${rubypath}(:|$)" > /dev/null; then
			PATH="${PATH}:$rubypath"
		fi
	fi
fi

# ----- RUST ----- #
# Include local crates' binary path:
cargopath="${HOME}/.cargo/bin"
if [ -d "$cargopath" ]; then
	if ! printf '%b' "$PATH" | grep -P "(^|:)${cargopath}(:|$)" > /dev/null; then
		PATH="${PATH}:$cargopath"
	fi
fi

# ----- MISC ----- #
# nopaste
export NOPASTE_SERVICES='pastebin nopaste'
export NOPASTE_NICK='CHANGEME'
# libvirt
export LIBVIRT_DEFAULT_URI="qemu:///system"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

if [ -r "vars.bash.local" ];then
	source vars.bash.local
fi
export SSHENVFILE="${HOME}/.ssh/sshenv"
export BAT_THEME="OneHalfDark"
export BAT_STYLE="changes,header,grid,numbers,snip"
export GIT_CLIFF_CONFIG="${HOME}/.config/git-cliff.toml"
# Browsers in order of enshittification / potential data espionage, least to most
export BROWSER="librewolf:brave:vivaldi:firefox:chromium"