Skip to content

Commit

Permalink
New : logo for neofetch (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxGuy312 authored Sep 29, 2023
1 parent 86cc94b commit d1e215d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ tgcrypto
ujson
urlextract
validators
vcsi
vcsi==7.0.15
wand
wget

Expand Down
26 changes: 20 additions & 6 deletions userbot/plugins/sysdetails.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import platform
import sys
import re
from datetime import datetime

import psutil
Expand Down Expand Up @@ -99,20 +100,33 @@ async def cpu(event):


@catub.cat_cmd(
pattern="sysd$",
pattern="(sysd|neofetch)$",
command=("sysd", plugin_category),
info={
"header": "Shows system information using neofetch",
"usage": "{tr}cpu",
"usage": "{tr}sysd",
},
)
async def sysdetails(sysd):
"Shows system information using neofetch"
catevent = await edit_or_reply(sysd, "`Fetching system information.`")
cmd = "git clone https://github.com/dylanaraps/neofetch.git"
await _catutils.runcmd(cmd)
neo = "neofetch/neofetch --off --color_blocks off --bold off --cpu_temp C \
--cpu_speed on --cpu_cores physical --kernel_shorthand off --stdout"
neo = "neofetch/neofetch --color_blocks off --bold off --cpu_temp C --cpu_speed on --cpu_cores physical --kernel_shorthand off"
if sysd.pattern_match.group(1) == 'sysd':
neo = neo+" --off"
a, b, c, d = await _catutils.runcmd(neo)
result = str(a) + str(b)
await edit_or_reply(catevent, f"**Neofetch Result:** `{result}`")
ressult = str(a) + str(b)
result = re.sub('\x1B\[[0-9;\?]*[a-zA-Z]', '', ressult)
await edit_or_reply(catevent, f"**Neofetch Result:**\n```{result}```")

@catub.cat_cmd(
pattern='neofetch',
command=('neofetch', plugin_category),
info={
"header":"Shows system info using neoefetch with logo",
"usage":"{tr}neofetch"
}
)
async def neofetch_help(neo):
"Shows System info using neofetch with logo"

0 comments on commit d1e215d

Please sign in to comment.