Select the types of activity you want to include in your feed.
Personal dotfiles for Linux, mostly for Nixpkgs/NixOS-based and Termux setups. Mirrored using GitLab's push mirroring feature.
gitlab.com/andreijiroh-dev/dotfiles
···11+# bashrc configurations
22+33+Host-specifics (including in `~vern`), maybe bash-specific functions.
44+Global configs are at [`~/.bashrc`](../../.bashrc),
55+[`~/.bash_login`](../../.bash_login) and [POSIX-compliant `~/.profile`](../../.profile).
+109
.config/bash/bashrc
···11+# ~/.bashrc: executed by bash(1) for non-login shells.
22+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
33+# for examples
44+55+# If not running interactively, don't do anything
66+case $- in
77+ *i*) ;;
88+ *) return;;
99+esac
1010+1111+# don't put duplicate lines or lines starting with space in the history.
1212+# See bash(1) for more options
1313+HISTCONTROL=ignoreboth
1414+1515+# append to the history file, don't overwrite it
1616+shopt -s histappend
1717+1818+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
1919+HISTSIZE=1000
2020+HISTFILESIZE=2000
2121+2222+# check the window size after each command and, if necessary,
2323+# update the values of LINES and COLUMNS.
2424+shopt -s checkwinsize
2525+2626+# If set, the pattern "**" used in a pathname expansion context will
2727+# match all files and zero or more directories and subdirectories.
2828+#shopt -s globstar
2929+3030+# make less more friendly for non-text input files, see lesspipe(1)
3131+#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
3232+3333+# set variable identifying the chroot you work in (used in the prompt below)
3434+if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
3535+ debian_chroot=$(cat /etc/debian_chroot)
3636+fi
3737+3838+# set a fancy prompt (non-color, unless we know we "want" color)
3939+case "$TERM" in
4040+ xterm-color|*-256color) color_prompt=yes;;
4141+esac
4242+4343+# uncomment for a colored prompt, if the terminal has the capability; turned
4444+# off by default to not distract the user: the focus in a terminal window
4545+# should be on the output of commands, not on the prompt
4646+#force_color_prompt=yes
4747+4848+if [ -n "$force_color_prompt" ]; then
4949+ if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
5050+ # We have color support; assume it's compliant with Ecma-48
5151+ # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
5252+ # a case would tend to support setf rather than setaf.)
5353+ color_prompt=yes
5454+ else
5555+ color_prompt=
5656+ fi
5757+fi
5858+5959+if [ "$color_prompt" = yes ]; then
6060+ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
6161+else
6262+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
6363+fi
6464+unset color_prompt force_color_prompt
6565+6666+# If this is an xterm set the title to user@host:dir
6767+case "$TERM" in
6868+xterm*|rxvt*)
6969+ PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
7070+ ;;
7171+*)
7272+ ;;
7373+esac
7474+7575+# enable color support of ls and also add handy aliases
7676+if [ -x /usr/bin/dircolors ]; then
7777+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
7878+ alias ls='ls --color=auto'
7979+ #alias dir='dir --color=auto'
8080+ #alias vdir='vdir --color=auto'
8181+8282+ #alias grep='grep --color=auto'
8383+ #alias fgrep='fgrep --color=auto'
8484+ #alias egrep='egrep --color=auto'
8585+fi
8686+8787+# colored GCC warnings and errors
8888+#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
8989+9090+# some more ls aliases
9191+#alias ll='ls -l'
9292+#alias la='ls -A'
9393+#alias l='ls -CF'
9494+9595+# Alias definitions.
9696+# You may want to put all your additions into a separate file like
9797+# ~/.bash_aliases, instead of adding them here directly.
9898+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
9999+100100+# enable programmable completion features (you don't need to enable
101101+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
102102+# sources /etc/bash.bashrc).
103103+if ! shopt -oq posix; then
104104+ if [ -f /usr/share/bash-completion/bash_completion ]; then
105105+ . /usr/share/bash-completion/bash_completion
106106+ elif [ -f /etc/bash_completion ]; then
107107+ . /etc/bash_completion
108108+ fi
109109+fi
+171
.config/bash/prompt
···11+#!/bin/bash
22+# shebang for syntax highlighting purposes
33+44+# Colors
55+_NON="\[\033[0m\]"
66+_BLD="\[\033[1m\]" # YEP BALD
77+_BLK="\[\033[30m\]"
88+_RED="\[\033[31m\]"
99+_GRN="\[\033[32m\]"
1010+_YLW="\[\033[33m\]"
1111+_BLU="\[\033[34m\]"
1212+_PRP="\[\033[35m\]"
1313+_CYN="\[\033[36m\]"
1414+_WHT="\[\033[37m\]"
1515+1616+__debug_trap() {
1717+ # Set necessary pre-command variables (PROMPT_COMMAND is a
1818+ # command so its excluded here)
1919+ if [[ "$BASH_COMMAND" != "$PROMPT_COMMAND"
2020+ && "$LAST_BASH_COMMAND" == "$PROMPT_COMMAND" ]]; then
2121+ INC_TIME=1
2222+ LAST_RT="$EPOCHREALTIME" # This should be the last thing done in this function
2323+ fi
2424+ LAST_BASH_COMMAND="$BASH_COMMAND"
2525+}
2626+2727+trap '__debug_trap' DEBUG
2828+2929+__get_cmd_time() {
3030+ # Set hours minutes seconds and remove preceding zeros
3131+ local YEAR=$((10#0$(($(TZ=UTC printf '%(%Y)T' $CMD_TIME)))-1970))
3232+ local DAYS=$((10#0$(TZ=UTC printf '%(%j)T' $CMD_TIME)))
3333+ local HOUR=$((10#0$(TZ=UTC printf '%(%H)T' $CMD_TIME)))
3434+ local MINS=$((10#0$(TZ=UTC printf '%(%M)T' $CMD_TIME)))
3535+ local SECS=$((10#0$(TZ=UTC printf '%(%S)T' $CMD_TIME)))
3636+3737+ # Choose whether or not to print hours minutes and seconds
3838+ [[ $CMD_TIME -ge 31536000 ]] && printf '%sy ' ${YEAR}
3939+ [[ $CMD_TIME -ge 86400 ]] && printf '%sd ' ${DAYS}
4040+ [[ $CMD_TIME -ge 3600 ]] && printf '%sh ' ${HOUR}
4141+ [[ $CMD_TIME -ge 60 ]] && printf '%sm ' ${MINS}
4242+ [[ $CMD_TIME -ge 1 ]] && printf '%ss ' ${SECS}
4343+ # If you want to have a limit uncomment the next line and replace somenum with
4444+ # the minimum microseconds
4545+# [[ $CMD_US -ge somenum ]] &&
4646+ printf '%sμs' ${CMD_US:-0}
4747+}
4848+4949+__sig() {
5050+ # Giant switch case for getting the name of the signal (`kill -l`)
5151+ j=0
5252+ for i in $@; do
5353+ if [[ $j != 0 ]]; then
5454+ printf '%s|%s' "$_WHT" "$_RED"
5555+ fi
5656+ j=$((j+1))
5757+ case $i in
5858+ 126) printf ACCES ;;
5959+ 127) printf NOENT ;;
6060+ 129) printf HUP ;;
6161+ 130) printf INT ;;
6262+ 131) printf QUIT ;;
6363+ 132) printf ILL ;;
6464+ 133) printf TRAP ;;
6565+ 134) printf ABRT ;;
6666+ 135) printf BUS ;;
6767+ 136) printf FPE ;;
6868+ 137) printf KILL ;;
6969+ 138) printf USR1 ;;
7070+ 139) printf SEGV ;;
7171+ 140) printf USR2 ;;
7272+ 141) printf PIPE ;;
7373+ 142) printf ALRM ;;
7474+ 143) printf TERM ;;
7575+ 144) printf STKFLT ;;
7676+ 145) printf CHLD ;;
7777+ 146) printf CONT ;;
7878+ 147) printf STOP ;;
7979+ 148) printf TSTP ;;
8080+ 149) printf TTIN ;;
8181+ 150) printf TTOU ;;
8282+ 151) printf URG ;;
8383+ 152) printf XCPU ;;
8484+ 153) printf XFSZ ;;
8585+ 154) printf VTALRM ;;
8686+ 155) printf PROF ;;
8787+ 156) printf WINCH ;;
8888+ 157) printf IO ;;
8989+ 158) printf PWR ;;
9090+ 159) printf SYS ;;
9191+ 16[3-9]|1[7-8][0-9]|19[0-2]) printf RT$(($i-128)) ;; # Savagery
9292+ *) printf $i ;; # Print exit code if not in list
9393+ esac
9494+ done
9595+}
9696+9797+__ssh() {
9898+ local CON=($SSH_CONNECTION)
9999+ local SRV_IP="${CON[2]}"
100100+ [[ -z "$SRV_IP" ]] && return
101101+ local SRV_PORT="${CON[3]}"
102102+ # 4 chars from startand 4 chars from end
103103+ local SRV_IP_CUT="${_CYN}${SRV_IP}"
104104+ [[ ${#SRV_IP} -gt 8 ]] && local SRV_IP_CUT="${_CYN}${SRV_IP:0:4}${_WHT}*${_CYN}${SRV_IP: -4}"
105105+106106+ printf '%s' "${_GRN}${_BLU}[${SRV_IP_CUT}${_PRP}${_BLD}:${_NON}${_CYN}${SRV_PORT}${_BLU}]${_NON}"
107107+}
108108+109109+__prompt() {
110110+ # Get exit code (must be first)
111111+ local PLC=(${PIPESTATUS[@]})
112112+113113+ # Reset time when prompt was first displayed after command
114114+ # this contributes to the 40 microsecond difference in $CMD_US and the actual time it took
115115+ if [[ "$INC_TIME" != 0 ]]; then
116116+ PROMPT_RT="$EPOCHREALTIME"
117117+ INC_TIME=0
118118+ fi
119119+120120+ # *_RT may not be set
121121+ LAST_RT="${LAST_RT:-$EPOCHREALTIME}"
122122+ PROMPT_RT="${PROMPT_RT:-$EPOCHREALTIME}"
123123+124124+ # Get relative times
125125+126126+ # Remove decimal point, simulating multiplying by 1 million
127127+ PROMPT_RT1M="${PROMPT_RT/.}"
128128+ LAST_RT1M="${LAST_RT/.}"
129129+130130+ CMD_US="$(($PROMPT_RT1M-$LAST_RT1M))"
131131+132132+ CMD_TIME=0
133133+134134+ # Remove last 6 chars, simulating dividing by 1 million to get a more accurate difference
135135+ [[ ${#CMD_US} -lt 6 ]] || CMD_TIME="${CMD_US::-6}"
136136+137137+ [[ ${#CMD_US} -lt 6 ]] || CMD_US="${CMD_US: -6}"
138138+ CMD_US="$((10#0$CMD_US))"
139139+140140+ # Set prompt sections
141141+142142+ # Text
143143+144144+ # ssh detection and indicator
145145+ [[ "$SSH_CONNECTION" ]] && local SSH="$(__ssh) "
146146+147147+ # [INT], [4], etc.
148148+ local i
149149+ for i in ${PLC[@]}; do
150150+ if [[ $i > 0 ]]; then
151151+ local SIG="$(printf '%s[%s%s%s] ' "$_BLU" "$_RED" "$(__sig ${PLC[@]})" "$_BLU")"
152152+ break
153153+ fi
154154+ done
155155+156156+ # [user@homeserver:~]
157157+ local COL="$([[ $UID == 0 ]] && printf '%s' "$_RED" || printf '%s' "$_YLW")"
158158+ local UHD="${_BLD}${_BLU}[${COL}\u${_PRP}@${_CYN}\h${_PRP}:${_GRN}\w${_BLU}]"
159159+160160+ # 2y 351d 12m 43s 382969μs
161161+ local TIME="${_YLW}$(__get_cmd_time)"
162162+163163+ # Random colored $ or #
164164+ _RAND256="\[\033[38;2;$((RANDOM%256));$((RANDOM%256));$((RANDOM%256))m\]"
165165+ local IND="${_RAND256}\\$"
166166+167167+ # Set the prompt
168168+ PS1="${_NON}${SSH}${SIG}${UHD} ${TIME} ${IND} ${_NON}"
169169+}
170170+171171+PROMPT_COMMAND=__prompt
+1
.config/gh/config.yml
···1111 co: pr checkout
1212 clone: repo clone
1313 mr: pr
1414+ fork: repo fork
1415# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
1516http_unix_socket:
1617# What web browser gh should use when opening URLs. If blank, will refer to environment.
+3-3
.config/htop/htoprc
···11# Beware! This file is rewritten by htop when settings are changed in the interface.
22# The parser is also very primitive, and not human-friendly.
33-htop_version=3.2.1
33+htop_version=3.2.0
44config_reader_min_version=3
55fields=0 48 17 18 38 39 40 2 46 47 49 1
66hide_kernel_threads=1
···3838column_meter_modes_1=2 2 2
3939tree_view=1
4040sort_key=46
4141-tree_sort_key=0
4141+tree_sort_key=48
4242sort_direction=-1
4343tree_sort_direction=1
4444tree_view_always_by_pid=0
4545all_branches_collapsed=0
4646screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
4747.sort_key=PERCENT_CPU
4848-.tree_sort_key=PID
4848+.tree_sort_key=USER
4949.tree_view=1
5050.tree_view_always_by_pid=0
5151.sort_direction=-1
+4
.profile
···77 fi
88fi
991010+export PATH="/usr/local/bin${PATH:+:}$PATH" # ~vern specifics, might work on this soon.
1111+mesg n 2> /dev/null || true
1212+1313+# then import the rest
1014source "$HOME/.env"
1115source "$HOME/.config/aliases"