From c6cc202ab95e6f199e63d59ea68d4bcb39940945 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Tue, 9 Apr 2024 18:29:39 -0600 Subject: redid bash config and update script, experimenting with doom emacs --- sh/bash/.bash_profile | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sh/bash/.bash_profile (limited to 'sh/bash/.bash_profile') diff --git a/sh/bash/.bash_profile b/sh/bash/.bash_profile new file mode 100644 index 0000000..d2d4cc3 --- /dev/null +++ b/sh/bash/.bash_profile @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# +# bryson's bash profile +# + +# import shell-agnostic profile +if [ -f ~/.profile ]; then + . ~/.profile +fi + +# import global bashrc +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# if login shell, run tty menu +if [[ $TERM == 'linux' ]]; then + while true; do + echo -e "\e[0;35m***** MAIN MENU *****\e[0m" + echo "1: Start XMonad" + echo "2: Exit to Bash" + echo -e "\e[0;35m---\e[0m" + echo "8: Logout" + echo "9: Reboot" + echo "0: Shutdown" + read -rs -N 1 key + case $key in + 1) startx ;; + 2) break ;; + 8) logout ;; + 9) echo "Are you sure you want to reboot? (y will reboot)"; + read -rs -N 1 confirm; [ "$confirm" = 'y' ] && (doas reboot; break) ;; + 0) echo "Are you sure you want to shutdown? (y will shutdown)"; + read -rs -N 1 confirm; [ "$confirm" = 'y' ] && (doas reboot; break) ;; + esac + done +fi +# end tty menu + +# bash specific variables +HISTSIZE=100000 + +# enable command completion for doas +complete -cf doas +shopt -s expand_aliases + +# export variables +export HISTSIZE black BLACK dgray DGRAY red RED lred LRED green GREEN lgreen LGREEN yellow LYELLOW blue BLUE lblue LBLUE magenta MAGENTA lmagenta LMAGENTA cyan CYAN lcyan LCYAN lgray LGRAY NC + +# import bashrc +# if [ -f ~/.bashrc ]; then +# . ~/.bashrc +# fi -- cgit v1.2.3