-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the mitch wiki!
This is WIP and will be a manpage in the future.
The ASCII art of logos can be found in src/assets/logos.nim
.
The logos are generated using the command
figlet -f slant "Text"
You can then take the output of the command and put it into a raw string literal in src/assets/logos.nim
newLogo* = r"""
_ __ __
/ | / /__ _ __/ /___ ____ _____
/ |/ / _ \ | /| / / / __ \/ __ `/ __ \
/ /| / __/ |/ |/ / / /_/ / /_/ / /_/ /
/_/ |_/\___/|__/|__/_/\____/\__, /\____/
/____/
"""
Notice the:
-
*
after the logo name, which should be in pascal case - empty line between the
r"""
and the actual first line of the logo - two space indentation before the name of the logo (required by Nim)
Then you need to add the distro to the getLogo()
procedure located in src/nitches/getLogo.nim
.
You first add the logo into the array of logos called coloredLogos
.
Each logo is defined with a foreground color in the Nim std/terminal
module and the name that you gave it in the previous step.
Following the previous step, we'll add our new logo to the array like this
const
coloredLogos = [
# All the logos from before
(fgRed, newLogo),
]
To add your distro to the actual "distro determiner", you need to get the ID of your distro, which can be found by running this:
cat /etc/os-release | grep "^ID"
Then you scroll to the bottom of the file and add your logo to the switch statement like so:
of "distroID":
result = coloredLogos[x] # x is the number from the previous case but incremented by one