mirror of
https://github.com/SpyHoodle/PrideFetch.git
synced 2024-09-19 14:53:38 +01:00
parent
ec82eb613c
commit
f9f9b94d67
@ -24,7 +24,7 @@ Originally forked from [megabytesofrem/pridefetch](https://github.com/megabyteso
|
||||
|
||||
## Quickstart
|
||||
|
||||
**Requirements:** `Python 3.7` or higher and `python-distro`
|
||||
**Requirements:** `Python 3.7` or higher, `python-distro` and `python-psutil`
|
||||
```bash
|
||||
git clone https://github.com/SpyHoodle/pridefetch.git
|
||||
cd pridefetch/src
|
||||
|
@ -14,7 +14,8 @@ from socket import gethostname
|
||||
# System info modules
|
||||
from platform import platform as system
|
||||
from platform import release as kernel
|
||||
from time import clock_gettime, CLOCK_BOOTTIME
|
||||
from time import time
|
||||
from psutil import boot_time
|
||||
from platform import machine as architecture
|
||||
from distro import name as distribution
|
||||
from modules.packages import get_num_packages as packages
|
||||
@ -45,7 +46,7 @@ stats = {
|
||||
"arch": lambda: architecture() or 'N/A',
|
||||
"pkgs": lambda: packages() or 'N/A',
|
||||
"kernel": lambda: kernel() or system() or 'N/A',
|
||||
"uptime": lambda: str(timedelta(seconds=clock_gettime(CLOCK_BOOTTIME))).split('.', 1)[0]
|
||||
"uptime": lambda: str(timedelta(seconds=time() - boot_time())).split('.', 1)[0]
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,6 +12,7 @@ class PackagesCommand:
|
||||
|
||||
packages_commands: list[PackagesCommand] = [
|
||||
PackagesCommand("pacman -Qq --color never"), # Arch Linux
|
||||
PackagesCommand("brew list"), # macOS
|
||||
PackagesCommand("dpkg-query -f '.\n' -W"), # Debian, Ubuntu, Mint
|
||||
PackagesCommand("dnf list installed -q", -1), # Fedora, RHEL
|
||||
PackagesCommand("yum list installed -q", -1), # RHEL, Fedora Core, CentOS
|
||||
|
Loading…
Reference in New Issue
Block a user