#!/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