added a toggle for tipme command to change between normal and cowsay mode.

This commit is contained in:
2026-06-03 11:08:00 +02:00
parent 31a75ceefa
commit bb38c8714c
3 changed files with 43 additions and 2 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
if [ ! -e ~/.config/tips.state ]; then
echo "standard" > ~/.config/tips.state
fi
SETTING=$(cat ~/.config/tips.state)
INPUT="$1"
case $INPUT in
"")
case $SETTING in
standard)
shuf -n 1 ~/.config/sdgos/tips/tips.list
;;
cow)
cowsay -r $(shuf -n 1 ~/.config/sdgos/tips/tips.list) | lolcat
;;
esac
;;
toggle)
case $SETTING in
standard)
echo "cow" > ~/.config/tips.state
;;
cow)
echo "standard" > ~/.config/tips.state
;;
esac
;;
standard)
echo "standard" > ~/.config/tips.state
shuf -n 1 ~/.config/sdgos/tips/tips.list
;;
cow)
echo "cow" > ~/.config/tips.state
cowsay -r $(shuf -n 1 ~/.config/sdgos/tips/tips.list) | lolcat
;;
esac