Clean up code

This commit is contained in:
Maddie H 2022-04-20 17:48:59 +01:00
parent a89093c4f1
commit ea999d37ab
3 changed files with 16 additions and 3 deletions

View File

@ -1,32 +1,43 @@
# pridefetch 🏳️‍⚧️
Python fetch script for showing your favourite pride flags & system info!<br>
Forked from [megabytesofrem/pridefetch](https://github.com/megabytesofrem/pridefetch).<br>
**Note:** Minimum `Python 3.7` required
## Examples
#### Display a trans flag
`pridefetch -f trans`
#### Display either a trans or lesbian flag, with a 50/50 chance
`pridefetch -r trans,lesbian`
#### List all the available flags
`pridefetch -l`
#### Display help with pridefetch
`pridefetch -h`
## Quickstart
```bash
git clone https://github.com/SpyHoodle/pridefetch.git
cd pridefetch
chmod +x pridefetch
```
Then, run pridefetch
```bash
./pridefetch
```
You can also add pridefetch to your `$PATH` to run it anywhere<br>
```bash
mv pridefetch /usr/bin/
```

View File

@ -25,4 +25,4 @@ def get_num_packages() -> (int, bool):
try:
return len(check_output(["rpm", "-qa"]).decode("utf-8").split("\n")) - 1
except FileNotFoundError:
return False
return False

View File

@ -2,7 +2,6 @@
from argparse import ArgumentParser
from datetime import timedelta
from packages import get_num_packages as packages
from getpass import getuser
# from platform import machine as architecture
from platform import platform as system
@ -10,8 +9,11 @@ from platform import release as kernel
from random import choice as random_choice
from socket import gethostname
from time import clock_gettime, CLOCK_BOOTTIME
from distro import name as distribution
from packages import get_num_packages as packages
# Define a dictionary of all the flags and their colors
# Each color is the color for an individual row in the flag
flags = {
@ -20,7 +22,7 @@ flags = {
"lesbian": [202, 209, 255, 255, 168, 161],
"pansexual": [198, 220, 39],
"trans": [81, 211, 255, 211, 81],
"nonbinary": [226, 255, 98, 237,],
"nonbinary": [226, 255, 98, 237, ],
"demiboy": [244, 249, 117, 255, 117, 249, 244],
"demigirl": [244, 249, 218, 255, 218, 249, 244],
"genderfluid": [211, 255, 128, 0, 63],