aboutsummaryrefslogtreecommitdiff
path: root/nofetch
diff options
context:
space:
mode:
authoraxtlos <3alouchi2006@gmail.com>2021-04-24 11:38:35 +0200
committerjnats <dev@jnats.xyz>2021-04-24 11:41:54 +0100
commit9f6f503d940aff829716017f370766162253066f (patch)
treee9b598bbc2afd596761be142699763d5ba35efe8 /nofetch
parent9311c04d6f9332d0cd71aa5fc7346ddee083455c (diff)
downloadnofetch-9f6f503d940aff829716017f370766162253066f.tar.gz
nofetch-9f6f503d940aff829716017f370766162253066f.tar.bz2
added option to choose phrase by just typing the number of that phrase ('nofetch 11' for example) and added another phrase
Diffstat (limited to '')
-rwxr-xr-x[-rw-r--r--]nofetch15
1 files changed, 14 insertions, 1 deletions
diff --git a/nofetch b/nofetch
index db61f55..0dc22b3 100644..100755
--- a/nofetch
+++ b/nofetch
@@ -1,6 +1,11 @@
#!/bin/bash
-rng=$((1 + $RANDOM % 10 ))
+if [[ $1 == "" ]];
+then
+ rng=$((1 + $RANDOM % 11 ))
+else
+ rng=$1
+fi
if [ $rng -eq 1 ]
then
@@ -32,6 +37,14 @@ then
elif [ $rng -eq 10 ]
then
nofetch="plan 4 from the front door"
+elif [ $rng -eq 11 ]
+then
+ if [[ $osname == "Arch Linux" ]];
+ then
+ nofetch="I use arch btw"
+ else
+ nofetch="I use "$osname "btw"
+ fi
else
nofetch="something has gone terribly wrong"
fi