Open sudofox opened 1 year ago
In order to facilitate more configs and allow changing of those easily, the configs could reside in a subdirectory, along with matching other variables, DEFs and whatnot, and user could either change config or load a new one with a switch.
# choose random from different configs
variant_name=$(find variants/ -mindepth 1 -maxdepth 1 -type d | shuf -n 1 | grep -Eio [a-z]*$)'
# or define hardcoded
variant_name="samueljackson"'
# Define files for the different configurations
config_file="variants/${variant_name}/config"
res_pos_file="variants/${variant_name}/res_pos"
res_neg_file="variants/${variant_name}/res_neg"
config=$(printf "${config_file}")
res_pos=$(printf "${res_pos_file}" | shuf -n 1)
res_neg=$(printf "${res_neg_file}" | shuf -n 1)
Asked ChatGPT to generate some Stallman like quotes/replies
export SHELL_MOMMYS_POSITIVE_RESPONSES=( "Your effort to improve your privacy and security is a step towards a better world." "By taking control of your technology, you are empowering yourself and those around you." "Keep up the good work! You are contributing to a world where privacy and security are the norm." "You are making a positive difference in the world by prioritizing your privacy and security." "Remember, every action you take towards protecting your privacy and security is a meaningful one." "Your dedication to protecting your privacy and security is admirable and will pay off in the long run." "Your commitment to privacy and security is a valuable contribution to society and will inspire others." "Well done! You are setting an example for others by taking control of your technology." "You are on the right track towards a more secure and private digital life." "Keep going! Your efforts to improve your privacy and security are making a difference." ) export SHELL_MOMMYS_NEGATIVE_RESPONSES=( "Don't give up! The fight for privacy and security is more important than ever." "Remember, setbacks are temporary. Keep pushing forward in your efforts to protect your privacy and security." "Stay strong! Every challenge you face in protecting your privacy and security is an opportunity for growth." "Keep your head up! The pursuit of privacy and security is a constant struggle, but it's worth it." "Take a deep breath and remember why you're working so hard to protect your privacy and security." "Don't be discouraged. Your efforts towards privacy and security are important, even in the face of obstacles." "Remember that every failure is a learning opportunity. Use it to your advantage in your quest for privacy and security." "Stay focused on your goal of protecting your privacy and security, even when faced with difficulties." "Don't give up hope! Your efforts towards privacy and security are making a positive difference in the world." "You are not alone in your fight for privacy and security. Keep going, and know that others are with you." )
I misread that as "Stalin like quotes/replies" and was very confused for a variety of reasons
I've wrote this script to de/activate the mommy's prompt messages by un/comment the lines of the .zshrc file
#!/bin/bash
if [[ $(head -n 2 ~/.zshrc | grep "^#" | wc -l) -eq 2 ]]; then
sed -i '1,2 s/^#//' ~/.zshrc
notify-send "mommy turn on uwu~ ❤"
else
sed -i '1,2 s/^/#/' ~/.zshrc
notify-send "mommy turn off~"
fi
Assuming the the 2 first lines of .zshrc goes like this.
source /path/to/script/shell-mommy.sh
precmd() { mommy "$PROMPT_COMMAND" }
(Optional) Set a keybindings to execute this script.
part of my .kshrc, definitely could use some more customization
export SHELL_MOMMYS_LITTLE="Adeptus Mechanicus"
export PS1="\$PWD \$(date +%F-%T) > "
export PS1="\$(mommy \$\(exit \$?\))$PS1"
I'll start us off with Samuel L Jackson. This example uses no substitutions, but you could replace
son
if you wanted to.