summaryrefslogtreecommitdiff
path: root/files/shell
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-10-17 12:22:00 -0400
committerAndrew Opalach <andrew@akon.city> 2025-10-17 12:32:42 -0400
commit544da1ba50d9cbf51a18ca0abf1db66b3baa7460 (patch)
tree1caa87664ea4937c5f4e6e8dc83c49b3132ddd70 /files/shell
parent85a47287e56ba9100420246531ebea5996cc0486 (diff)
downloaddotfiles-544da1ba50d9cbf51a18ca0abf1db66b3baa7460.tar.gz
dotfiles-544da1ba50d9cbf51a18ca0abf1db66b3baa7460.tar.bz2
dotfiles-544da1ba50d9cbf51a18ca0abf1db66b3baa7460.zip
Gentoo desktop
Diffstat (limited to 'files/shell')
-rw-r--r--files/shell/bashrc69
-rw-r--r--files/shell/profile7
2 files changed, 76 insertions, 0 deletions
diff --git a/files/shell/bashrc b/files/shell/bashrc
new file mode 100644
index 0000000..443501d
--- /dev/null
+++ b/files/shell/bashrc
@@ -0,0 +1,69 @@
+source ~/.profile
+
+gpgconf --launch gpg-agent
+
+if [ -v $NIX_SHELL ]; then
+ complete -cf doas
+else
+ complete -F _root_command doas
+fi
+
+export HISTCONTROL=erasedups
+export HISTFILE=$HOME/.bash_history
+export HISTFILESIZE=100000
+export HISTSIZE=1000
+
+bind 'set completion-query-items 0'
+bind 'set show-all-if-ambiguous on'
+bind 'set show-all-if-unmodified on'
+bind 'set menu-complete-display-prefix on'
+bind '"\t": menu-complete'
+bind '"\e[Z": menu-complete-backward'
+# Clear screen and set return code to 0.
+# Caveat: The text 'clear' will flash in the command line as
+# if it was pasted and sent extremely fast.
+bind '"\C-l":"\C-a\C-kclear\n"'
+
+alias ls='ls --ignore=lost+found --color=auto'
+alias cp='rsync -av'
+alias gdb='gdb -q'
+alias top='htop'
+alias pgrep='pgrep -f'
+alias python='python -q'
+alias bc='bc -l'
+alias make='make -j6'
+alias diff='diff -u'
+alias mail='mutt'
+alias iroha='ssh andrew@iroha'
+alias moyo='ssh andrew@moyo'
+alias station='ssh moyo -t "ssh 192.168.122.89"'
+alias rod='ssh -p 1738 rod'
+alias bmrg='ssh boomerang'
+alias cmv-add='$HOME/c/camu/scripts/cmv_add.sh'
+alias cmv-pause='cmv-add PAUSE'
+alias cmv-next='cmv-add NEXT'
+alias cmv-prev='cmv-add PREV'
+alias cmv-shuffle='cmv-add SHUFFLE'
+alias cmv-sort='cmv-add SORT'
+alias cmv-reverse='cmv-add REVERSE'
+alias cmv-clear='cmv-add CLEAR'
+
+RESET="\001\017\002"
+NORMAL="\001\033[0m\002"
+GREEN="\001\033[0;32m\002"
+RED="\001\033[0;31m\002"
+IROHA="\001\033[38;5;214m\002"
+export HOSTCOLOR=$IROHA
+exit_code_guy()
+{
+ retcode=$?
+ if [ $retcode -eq 0 ]; then
+ printf "(・_・) >$RED"
+ else
+ printf "(″ロ゛) >$RED *$retcode"
+ fi
+}
+export PS1="$RESET$GREEN\u@$HOSTCOLOR\H$GREEN:\w\$(exit_code_guy)$NORMAL "
+
+# Nix-specific.
+LOCALE_ARCHIVE=$HOME/.nix-profile/lib/locale/locale-archive
diff --git a/files/shell/profile b/files/shell/profile
new file mode 100644
index 0000000..fc677a7
--- /dev/null
+++ b/files/shell/profile
@@ -0,0 +1,7 @@
+export PATH="$PATH:$HOME/.local/bin"
+#export GPG_TTY=$(tty)
+unset SSH_AGENT_PID
+if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
+ export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
+fi
+export MAIN_MONITOR=DP-1