aboutsummaryrefslogtreecommitdiff
path: root/sh/bash/.bash_profile
diff options
context:
space:
mode:
authorBryson Steck <me@brysonsteck.xyz>2024-04-09 18:29:39 -0600
committerBryson Steck <me@brysonsteck.xyz>2024-04-09 18:29:39 -0600
commitc6cc202ab95e6f199e63d59ea68d4bcb39940945 (patch)
tree5b1c17cfa3eeea20b401b6dcf7b303a1556ab39d /sh/bash/.bash_profile
parentc1e3c46afdcb455175f0bb18b606f61c864d008a (diff)
downloaddotfiles-c6cc202ab95e6f199e63d59ea68d4bcb39940945.tar
dotfiles-c6cc202ab95e6f199e63d59ea68d4bcb39940945.tar.gz
dotfiles-c6cc202ab95e6f199e63d59ea68d4bcb39940945.tar.bz2
redid bash config and update script, experimenting with doom emacsHEADmaster
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