00:00 - introduction to Neofetch 01:50 - setup 02:44 - imports 05:00 - implementing a function that calculates uptime 05:15 - boot_time function from psutil module to get the time of the booting 06:17 - safely parsing the number of days, hours, minutes and seconds from a timestamp using divmod function 08:10 - implementing a function to get the shell 10:10 - writing a function to get desktop info 11:15 - writing a function to get the resolution 11:25 - get_monitors function from screeninfo library 12:45 - writing a function to get all packages 12:53 - using run function from subprocess module to run a command 12:55 - using dpkg command 14:22 - using name function from distro library to get the name of linux distribution 15:02 - using processor function from platform library to get info about CPU 15:25 - using virtual_memory function from psutil library to get the total RAM capacity in bytes 16:32 - writing a function to get info about GPU 16:50 - using lspci command 20:18 - using gethostname function from socket module 20:40 - using release function from platform library to get the kernel 22:07 - implementing the formatting using rich library
To get cpu we can use "lscpu" utility to get info and then grep its "Model name" def get_cpu(): _, cpu = subprocess.check_output('lscpu | grep "Model name"', shell=True).decode().split(":") return cpu.strip()
00:00 - introduction to Neofetch
01:50 - setup
02:44 - imports
05:00 - implementing a function that calculates uptime
05:15 - boot_time function from psutil module to get the time of the booting
06:17 - safely parsing the number of days, hours, minutes and seconds from a timestamp using divmod function
08:10 - implementing a function to get the shell
10:10 - writing a function to get desktop info
11:15 - writing a function to get the resolution
11:25 - get_monitors function from screeninfo library
12:45 - writing a function to get all packages
12:53 - using run function from subprocess module to run a command
12:55 - using dpkg command
14:22 - using name function from distro library to get the name of linux distribution
15:02 - using processor function from platform library to get info about CPU
15:25 - using virtual_memory function from psutil library to get the total RAM capacity in bytes
16:32 - writing a function to get info about GPU
16:50 - using lspci command
20:18 - using gethostname function from socket module
20:40 - using release function from platform library to get the kernel
22:07 - implementing the formatting using rich library
Watched the whole video, learnt a lot, glad I don't need to rely on Neofetch, Screenfetch or even Fastfetch on Debian now.
"As of December 30, 2024, it’s important to note that Neofetch development was discontinued on April 26, 2024"
Thank you, will take a deep dive later today.
To get cpu we can use "lscpu" utility to get info and then grep its "Model name"
def get_cpu():
_, cpu = subprocess.check_output('lscpu | grep "Model name"', shell=True).decode().split(":")
return cpu.strip()
Caption should be: "Watch me logically organizing bundled C code abstractions and run it with Python shell commands"
Interesting tutorials as always.
awesome