aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnats <jnats@salyut.one>2021-05-27 00:33:16 +0100
committerjnats <jnats@salyut.one>2021-05-27 00:33:16 +0100
commit100f6e7416c0237f244ad2677fc68c3df0437f60 (patch)
tree0f1eb17072072d6b15b54bd2c648f962d14ceadb
parenta484b38c4d3684e9270801ca0edeccc28e6221fa (diff)
downloadnofetch-100f6e7416c0237f244ad2677fc68c3df0437f60.tar.gz
nofetch-100f6e7416c0237f244ad2677fc68c3df0437f60.tar.bz2
simplified random messages a LOT
-rwxr-xr-xnofetch67
1 files changed, 16 insertions, 51 deletions
diff --git a/nofetch b/nofetch
index 0861f6c..f7a1a06 100755
--- a/nofetch
+++ b/nofetch
@@ -1,17 +1,5 @@
#!/usr/bin/env bash
-if [[ $1 == "" ]];
-then
- rng=$((1 + $RANDOM % 12 ))
-else
- if [[ $1 -lt 13 ]];
- then
- rng=$1
- else
- rng=$((1 + $RANDOM % 12 ))
- fi
-fi
-
uname -o &> /dev/null
if [ $(uname -s) == "Darwin" ]
@@ -27,45 +15,22 @@ else
osname="Unknown"
fi
-if [ $rng -eq 1 ] &> /dev/null
-then
- nofetch="probably a computer"
-elif [ $rng -eq 2 ] &> /dev/null
-then
- nofetch="there's probably some ram in there"
-elif [ $rng -eq 3 ] &> /dev/null
-then
- nofetch="init should ideally be running"
-elif [ $rng -eq 4 ] &> /dev/null
-then
- nofetch="yeah"
-elif [ $rng -eq 5 ] &> /dev/null
-then
- nofetch="you should probably go outside"
-elif [ $rng -eq 6 ] &> /dev/null
-then
- nofetch="i would be lead to believe that / is mounted"
-elif [ $rng -eq 7 ] &> /dev/null
-then
- nofetch="hey, what's this knob do ?"
-elif [ $rng -eq 8 ] &> /dev/null
-then
- nofetch="do you have games on your phone ?"
-elif [ $rng -eq 9 ] &> /dev/null
-then
- nofetch="you mean to tell me there aren't little men in this box?"
-elif [ $rng -eq 10 ] &> /dev/null
-then
- nofetch="plan 4 from the front door"
-elif [ $rng -eq 11 ] &> /dev/null
-then
- nofetch="i use "$osname" btw"
-elif [ $rng -eq 12 ] &> /dev/null
-then
- nofetch="if you're reading this, it's already too late"
-else
- nofetch="something has gone terribly wrong"
-fi
+array="probably a computer
+there's probably some ram in there
+init should ideally be running
+yeah
+you should probably go outside
+i would be lead to believe that / is mounted
+hey, what's this knob do ?
+do you have games on your phone ?
+you mean to tell me there aren't little men in this box?
+plan 4 from the front door
+i use $osname btw
+if you're reading this, it's already too late"
+
+nofetch=$(echo "$array" | shuf -n 1)
+
+echo $nofetch
if [ $1 == "-o" ] &> /dev/null || [ $2 == "-o" ] &> /dev/null
then