aboutsummaryrefslogtreecommitdiff
path: root/sh/bash/.bash_profile
diff options
context:
space:
mode:
Diffstat (limited to 'sh/bash/.bash_profile')
-rw-r--r--sh/bash/.bash_profile53
1 files changed, 53 insertions, 0 deletions
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