From 9f6f503d940aff829716017f370766162253066f Mon Sep 17 00:00:00 2001 From: axtlos <3alouchi2006@gmail.com> Date: Sat, 24 Apr 2021 11:38:35 +0200 Subject: added option to choose phrase by just typing the number of that phrase ('nofetch 11' for example) and added another phrase --- nofetch | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) mode change 100644 => 100755 nofetch (limited to 'nofetch') diff --git a/nofetch b/nofetch old mode 100644 new mode 100755 index db61f55..0dc22b3 --- 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 -- cgit v1.2.3