diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2022-03-22 00:04:49 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2022-03-22 00:04:49 -0600 |
commit | f7a7898c58fac7f90209d020be4755c8948fa9f7 (patch) | |
tree | 6f0f425594b2e45d8345a68e04c0710d16df9c51 /bash/.bash/03-boot.bash | |
parent | 44d79a46e681df48a510629a75ee02165f492392 (diff) | |
download | dotfiles-f7a7898c58fac7f90209d020be4755c8948fa9f7.tar dotfiles-f7a7898c58fac7f90209d020be4755c8948fa9f7.tar.gz dotfiles-f7a7898c58fac7f90209d020be4755c8948fa9f7.tar.bz2 |
reorganized bash configs
Diffstat (limited to 'bash/.bash/03-boot.bash')
-rw-r--r-- | bash/.bash/03-boot.bash | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/bash/.bash/03-boot.bash b/bash/.bash/03-boot.bash new file mode 100644 index 0000000..34f1d9c --- /dev/null +++ b/bash/.bash/03-boot.bash @@ -0,0 +1,31 @@ +#!/bin/sh +# +# 03-boot.bash +# startup scripts for systems +# + +# run startup script if tty +# for dingo +if [[ $TERM == 'linux' && $(hostname) == 'dingo' ]]; then + cat ~/bin/house.txt + printf "\n${CYAN}Welcome back Bryson :)\n\n" + USAGE="${blue}\td:start-docked\n\tn:start-not-docked\n\tq:shutdown\n\tr:reboot\n\tb:bash\n\n${NC}" + printf "${LGREEN}What should dingo do?\n" + printf "%b" $USAGE + + while read -rs -N 1 key; do + case $key in + d) startx ;; + n) nstartx.sh ;; + q) echo "Are you sure you want to shutdown? (y/n)"; + read -rs -N 1 key2; case $key2 in y) shutdown now ;; esac; ;; + r) echo "Are you sure you want to reboot? (y/n)"; + read -rs -N 1 key3; case $key3 in y) reboot ;; esac; ;; + b) break ;; + [h?]) echo "$USAGE";; + esac + printf "${LGREEN}What should dingo do now?\n" + printf "%b" $USAGE + done +fi + |