Compare commits

..

39 Commits

Author SHA1 Message Date
Azalea Gui 2fda114552 [U] Release 1.4.6 2023-01-14 22:06:01 -05:00
Azalea Gui 8ee516e640 [U] Update release script 2023-01-14 22:03:56 -05:00
Azalea Gui d4c8472991 [U] Changelog 2023-01-14 16:36:43 -05:00
Azalea Gui 7960624185 [+] Compatibility with fastfetch < 1.8.0
#62
2023-01-14 16:36:37 -05:00
Azalea Gui 4fe39b405b [O] Filter states better 2023-01-14 16:25:02 -05:00
Hykilpikonna d017b6066c [PR] #62 from soopyc/patch-fastfetch 2023-01-14 16:24:32 -05:00
Azalea Gui 6cd2bf4b41 [+] Issue content moderation bot 2023-01-14 16:02:37 -05:00
Mizuki Cheung 56976cdfdd fix: fix fastfetch raw mode 2023-01-15 03:52:33 +08:00
Azalea Gui 3535dd3fcf [+] Sync Aperture to neofetch
#61
2023-01-08 21:55:15 -05:00
Azalea Gui 2ffa75f567 [U] Changelog 2023-01-08 21:51:43 -05:00
Hykilpikonna de97821341 [PR] #61 from juliavdkris/master
Add aperture science ASCII art
2023-01-08 21:40:42 -05:00
Hykilpikonna 139b89204e [PR] #60 from aaronfranke/riscv-isa
Add support for displaying the ISA string on RISC-V CPUs
2023-01-08 21:38:15 -05:00
Julia van der Kris 1aaeae1197 Add aperture science ASCII art 2023-01-09 00:04:29 +01:00
Aaron Franke 70690c50df Add support for displaying the ISA string on RISC-V CPUs 2023-01-08 00:14:25 -06:00
Hykilpikonna 117bc7738c [PR] #59 from ivabus/patch-1
LICENSE: change year from 2021 to 2023
2023-01-07 14:59:03 -05:00
Ivan Bushchik 36d6ada646 LICENSE: change year from 2021 to 2023 2023-01-07 22:56:34 +03:00
Azalea Gui e1f65895db [F] Fix terminal detection with new get_process_name method 2023-01-06 01:32:40 -05:00
Azalea Gui e5c227119f [PR] dylanaraps/neofetch#2277 from rohandebsarkar - Add terminal
Upstream PR: https://github.com/dylanaraps/neofetch/pull/2277
Thanks to @rohandebsarkar

Co-authored-by: Rohan Deb Sarkar <rohandebsarkar@protonmail.com>
2023-01-06 01:18:34 -05:00
Rohan Deb Sarkar 2f84ef0160 fix gnome-console 2023-01-05 22:39:30 +05:30
Hykilpikonna 0538e02eee [PR] #58 from lilyinstarlight/fix/empty-pkg-dirs
fix: assume no pkgs when dir is empty or does not exist
2023-01-04 10:29:42 -05:00
Lily Foster 9a52096c91 fix: assume no pkgs when dir is empty or does not exist 2023-01-04 09:59:23 -05:00
Azalea Gui 426a242c94 [F] Fix semicolon for RhaymOS
https://github.com/dylanaraps/neofetch/pull/2274
2023-01-01 12:38:40 -05:00
Azalea Gui 1b19c63d53 [PR] dylanaraps/neofetch#2274 from rhaym-tech - added RhaymOS distro
Upstream PR: https://github.com/dylanaraps/neofetch/pull/2274
Thanks to @rhaym-tech

Co-authored-by: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com>
2023-01-01 12:32:42 -05:00
Ghellab Abderrahmane c0125cb632 added RhaymOS distro 2023-01-01 00:41:21 +01:00
Azalea d7ecefa051 [O] Ignore shellcheck 2317 2022-12-28 21:44:26 -05:00
Azalea 2330b159ca [U] Changelog 2022-12-28 21:42:49 -05:00
Azalea 51ed5be11e [PR] dylanaraps/neofetch#2271 from m-ildefons - feat: display editor setting
Upstream PR: https://github.com/dylanaraps/neofetch/pull/2271
Thanks to @m-ildefons

Co-authored-by: Moritz Röhrich <moritz@ildefons.de>
2022-12-28 21:35:53 -05:00
Moritz Röhrich d6f16601a8 feat: display editor setting
Display the configured editor, version and path using the $EDITOR
environment variable similar to the way the shell version is displayed
from the $SHELL variable.

fixes: #2270
2022-12-28 22:24:48 +01:00
Hykilpikonna 14c7963d88 [PR] #56 from leana8959: Fix macOS network detection
Fix network module on macOS
2022-12-24 02:38:20 -05:00
Dummy c69407345c shellcheck fix 2022-12-24 05:51:03 +01:00
Dummy b30bbf5927 Revert "shellcheck: double quote"
This reverts commit 3938f43134.
2022-12-24 05:46:14 +01:00
Dummy 501c4f5e1f escaped quotes 2022-12-24 05:30:03 +01:00
Dummy 3938f43134 shellcheck: double quote 2022-12-24 05:26:16 +01:00
Léana 江 f3bdeb2d30 fixes 2022-12-24 04:34:28 +01:00
Léana 江 c2bac01778 use awk instead 2022-12-24 04:20:47 +01:00
Léana 江 99a6fc0770 fixed network module for macOS 2022-12-24 04:17:04 +01:00
Hykilpikonna 1c2cee4cf5 [PR] #55 from leana8959: Fix cmus macOS
fixed cmus on macOS
2022-12-22 11:30:22 -05:00
Léana 江 281904948b fixed cmus on macOS 2022-12-22 16:35:41 +01:00
Hykilpikonna 8b14d02f05 [O] Push neofetch tag as well 2022-12-19 11:17:22 -05:00
13 changed files with 373 additions and 131 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015-2021 Dylan Araps
Copyright (c) 2015-2023 Dylan Araps
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+14
View File
@@ -99,6 +99,20 @@ pip install git+https://github.com/hykilpikonna/hyfetch.git@master
<!-- CHANGELOG STARTS HERE --->
### 1.4.6
* 🌈 Add compatibility for FastFetch version `>1.8.0` (#62)
* 🖼 Distro - Add Aperture Science ascii art (#61)
* 🖼 Distro - Add RhaymOS ([dylanaraps#2274](https://github.com/dylanaraps/neofetch/pull/2274))
* 🖼 Editor - Add editor information detection ([dylanaraps#2271](https://github.com/dylanaraps/neofetch/pull/2271))
* 🖼 Packages - Fix empty cargo directory (#58)
* 🖼 Terminal - Display gnome-console instead of kgx ([dylanaraps#2277](https://github.com/dylanaraps/neofetch/pull/2277))
* 🖼 Terminal - Fix terminal detection with new get_process_name function
* 🖼 CPU - Detect ISA string on RISC-V CPUs (#60)
* 🖼 Song - Fix CMUS player song detection on macOS (#55)
* 🖼 Network - Fix macOS network detection (#56)
* 🖼 Misc - Change LICENSE year to 2023 (#59)
### 1.4.5
* 🌈 **Support using FastFetch as a HyFetch backend** (`hyfetch -b fastfetch`)
+1 -1
View File
@@ -6,7 +6,7 @@ from pathlib import Path
from .types import LightDark
CONFIG_PATH = Path.home() / '.config/hyfetch.json'
VERSION = '1.4.5'
VERSION = '1.4.6'
TEST_ASCII = r"""
+26
View File
@@ -0,0 +1,26 @@
from . import AsciiArt
aperture = AsciiArt(match=r'''"Aperture"*''', color='6 6 7 1', ascii=r"""
${c1} .,-:;//;:=,
. :H@@@MM@M#H/.,+%;,
,/X+ +M@@M@MM%=,-%HMMM@X/,
-+@MM; $M@@MH+-,;XMMMM@MMMM@+-
;@M@@M- XM@X;. -+XXXXXHHH@M@M#@/.
,%MM@@MH ,@%= .---=-=:=,.
=@#@@@MX., -%HX$$%%%:;
=-./@M@M$ .;@MMMM@MM:
X@/ -$MM/ . +MM@@@M$
,@M@H: :@: . =X#@@@@-
,@@@MMX, . /H- ;@M@M=
.H@@@@M@+, %MM+..%#$.
/MMMM@MMH/. XM@MH; =;
/%+%$XHH@$= , .H@@@@MX,
.=--------. -%H.,@@@@@MX,
.%MM@@@HHHXX$$$%+- .:$MMX =M@@MM%.
=XMMM@MM@MM#H;,-+HMM@M+ /MMMX=
=%@M@M#@$-.=$@MM@@@M; %M%=
,:+$+-,/H#MMMMMMM@= =,
=++%%%%+/:-.
""")
+8
View File
@@ -17,6 +17,10 @@ def detect(name: str) -> AsciiArt | None:
from .aperio_gnu_linux import aperio_gnu_linux
return aperio_gnu_linux
if name.startswith('aperture'):
from .aperture import aperture
return aperture
if name.startswith('asahi'):
from .asahi import asahi
return asahi
@@ -1017,6 +1021,10 @@ def detect(name: str) -> AsciiArt | None:
from .regolith import regolith
return regolith
if name.startswith('rhaymos'):
from .rhaymos import rhaymos
return rhaymos
if name.startswith('rocky_small'):
from .rocky_small import rocky_small
return rocky_small
+21
View File
@@ -0,0 +1,21 @@
from . import AsciiArt
rhaymos = AsciiArt(match=r'''"RhaymOS"*''', color='1', ascii=r"""
${c1}
###
#####
####### /########
############# ###########
,########### #### ####(..
#### #### ####* ##########
#### ##### ##### (####
#### ########### ###########
#### ######### ##########
###################################
#####################################
#######################################
""")
+1 -1
View File
@@ -356,7 +356,7 @@ def run():
parser.add_argument('-C', '--config-file', dest='config_file', default=CONFIG_PATH, help=f'Use another config file')
parser.add_argument('-p', '--preset', help=f'Use preset', choices=PRESETS.keys())
parser.add_argument('-m', '--mode', help=f'Color mode', choices=['8bit', 'rgb'])
parser.add_argument('-b', '--backend', help=f'Choose a *fetch backend', choices=['neofetch', 'fastfetch'])
parser.add_argument('-b', '--backend', help=f'Choose a *fetch backend', choices=['neofetch', 'fastfetch', 'fastfetch-old'])
parser.add_argument('--c-scale', dest='scale', help=f'Lighten colors by a multiplier', type=float)
parser.add_argument('--c-set-l', dest='light', help=f'Set lightness value of the colors', type=float)
parser.add_argument('-V', '--version', dest='version', action='store_true', help=f'Check version')
+7 -2
View File
@@ -265,6 +265,8 @@ def run(preset: ColorProfile, alignment: ColorAlignment, backend: BackendLiteral
return run_neofetch(preset, alignment)
if backend == "fastfetch":
return run_fastfetch(preset, alignment)
if backend == "fastfetch-old":
return run_fastfetch(preset, alignment, legacy=True)
def run_neofetch(preset: ColorProfile, alignment: ColorAlignment):
@@ -290,12 +292,13 @@ def run_neofetch(preset: ColorProfile, alignment: ColorAlignment):
run_neofetch_cmd(f'--ascii --source {path.absolute()} --ascii-colors')
def run_fastfetch(preset: ColorProfile, alignment: ColorAlignment):
def run_fastfetch(preset: ColorProfile, alignment: ColorAlignment, legacy: bool = False):
"""
Run neofetch with colors
:param preset: Color palette
:param alignment: Color alignment settings
:param legacy: Set true when using fastfetch < 1.8.0
"""
asc = get_distro_ascii()
asc = alignment.recolor_ascii(asc, preset)
@@ -307,7 +310,9 @@ def run_fastfetch(preset: ColorProfile, alignment: ColorAlignment):
path.write_text(asc)
# Call fastfetch with the temp file
subprocess.run(['fastfetch', '--raw', path.absolute()])
proc = subprocess.run(['fastfetch', '--raw' if legacy else '--file-raw', path.absolute()])
if proc.returncode == 144:
printc("&6Error code 144 detected: Please upgrade fastfetch to >=1.8.0 or use the 'fastfetch-old' backend")
def get_fore_back(distro: str | None = None) -> tuple[int, int] | None:
+219 -78
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: noai:ts=4:sw=4:expandtab
# shellcheck source=/dev/null
# shellcheck disable=2009 disable=2153 disable=2154 disable=2243 disable=2244
# shellcheck disable=2009 disable=2153 disable=2154 disable=2243 disable=2244 disable=2317
#
# Neofetch: A command-line system information tool written in bash 3.2+.
# https://github.com/dylanaraps/neofetch
@@ -28,7 +28,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
version=7.3.5
version=7.3.6
# Fallback to a value of '5' for shells which support bash
# but do not set the 'BASH_' shell variables (osh).
@@ -62,6 +62,7 @@ print_info() {
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Editor" editor
info "Resolution" resolution
info "DE" de
info "WM" wm
@@ -237,6 +238,32 @@ shell_path="off"
shell_version="on"
# Editor
# Show path to $EDITOR
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --editor_path
#
# Example:
# on: '/opt/bin/vim'
# off: 'vim'
editor_path="off"
# Show $EDITOR version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: '--editor_version'
#
# Example:
# on: 'vim 9.0'
# off: 'vim'
editor_version="on"
# CPU
@@ -805,34 +832,34 @@ image_source="auto"
# Flag: --ascii_distro
#
# NOTE: AIX, AlmaLinux, Alpine, Alter, Amazon, AmogOS, Anarchy, Android, Antergos, antiX, AOSC OS,
# AOSC OS/Retro, Aperio GNU/Linux, Apricity, Arch, ArchBox, Archcraft, ARCHlabs, ArchMerge,
# ArchStrike, ArcoLinux, Artix, Arya, Asahi, Aster, AsteroidOS, astOS, Bedrock, BigLinux, Bitrig,
# BlackArch, blackPanther, BLAG, BlankOn, BlueLight, Bodhi, bonsai, BSD, BunsenLabs, CachyOS,
# Calculate, CalinixOS, Carbs, CBL-Mariner, CelOS, Center, CentOS, Chakra, ChaletOS, Chapeau,
# ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS, ClearOS, Clover, Cobalt, Condres, Container Linux
# by CoreOS, CRUX, Crystal Linux, Cucumber, CutefishOS, CyberOS, dahlia, DarkOs, Darwin, Debian,
# Deepin, DesaOS, Devuan, DietPi, DracOS, DragonFly, Drauger, Droidian, Elementary, Elive,
# EncryptOS, EndeavourOS, Endless, Enso, EuroLinux, Exherbo, Exodia Predator OS, Fedora, Feren,
# Finnix, FreeBSD, FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, GhostBSD, glaucus,
# gNewSense, GNOME, GNU, GoboLinux, GrapheneOS, Grombyang, Guix, Haiku, HamoniKR, HarDClanZ, Hash,
# Huayra, Hybrid, HydroOS, Hyperbola, iglunix, instantOS, IRIX, Itc, januslinux, Kaisen, Kali, KaOS,
# KDE, Kibojoe, Kogaion, Korora, KrassOS, KSLinux, Kubuntu, LangitKetujuh, LaxerOS, LEDE, LibreELEC,
# Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old, Live Raizo, LMDE, Lubuntu, Lunar, mac,
# Mageia, MagpieOS, Mandriva, Manjaro, MassOS, MatuusOS, Maui, Mer, Minix, MIRACLE LINUX, MX, Namib,
# NekOS, Neptune, NetBSD, Netrunner, Nitrux, NixOS, NomadBSD, Nurunner, NuTyX, Obarun, OBRevenge,
# OmniOS, Open Source Media Center, OpenBSD, openEuler, OpenIndiana, openmamba, OpenMandriva,
# OpenStage, openSUSE, openSUSE Leap, openSUSE Tumbleweed, OpenWrt, OPNsense, Oracle, orchid, OS
# Elbrus, PacBSD, Parabola, parch, Pardus, Parrot, Parsix, PCBSD, PCLinuxOS, pearOS, Pengwin,
# Pentoo, Peppermint, Pisi, PNM Linux, Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX, Proxmox,
# PuffOS, Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian, Radix, Raspbian, ravynOS, Reborn OS, Red Star,
# Redcore, Redhat, Refracted Devuan, Regata, Regolith, rocky, Rosa, Sabayon, sabotage, Sailfish,
# SalentOS, Sasanqua, Scientific, semc, Septor, Serene, SharkLinux, ShastraOS, Siduction, SkiffOS,
# Slackware, SliTaz, SmartOS, Soda, Solus, Source Mage, Sparky, Star, SteamOS, Stock Linux, Sulin,
# SunOS, SwagArch, t2, Tails, TeArch, TorizonCore, Trisquel, Twister, Ubuntu, Ubuntu Budgie, Ubuntu
# Cinnamon, Ubuntu Kylin, Ubuntu MATE, Ubuntu Studio, Ubuntu Sway, Ubuntu Touch, Ubuntu-GNOME,
# ubuntu_old02, Ultramarine Linux, Univalent, Univention, Uos, UrukOS, uwuntu, Vanilla, Venom, VNux,
# Void, VzLinux, wii-linux-ngx, Windows, Windows 10, Windows 11, XFerience, Xubuntu, yiffOS, Zorin
# have ascii logos.
# AOSC OS/Retro, Aperio GNU/Linux, Aperture, Apricity, Arch, ArchBox, Archcraft, ARCHlabs,
# ArchMerge, ArchStrike, ArcoLinux, Artix, Arya, Asahi, Aster, AsteroidOS, astOS, Bedrock, BigLinux,
# Bitrig, BlackArch, blackPanther, BLAG, BlankOn, BlueLight, Bodhi, bonsai, BSD, BunsenLabs,
# CachyOS, Calculate, CalinixOS, Carbs, CBL-Mariner, CelOS, Center, CentOS, Chakra, ChaletOS,
# Chapeau, ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS, ClearOS, Clover, Cobalt, Condres,
# Container Linux by CoreOS, CRUX, Crystal Linux, Cucumber, CutefishOS, CyberOS, dahlia, DarkOs,
# Darwin, Debian, Deepin, DesaOS, Devuan, DietPi, DracOS, DragonFly, Drauger, Droidian, Elementary,
# Elive, EncryptOS, EndeavourOS, Endless, Enso, EuroLinux, Exherbo, Exodia Predator OS, Fedora,
# Feren, Finnix, FreeBSD, FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, GhostBSD,
# glaucus, gNewSense, GNOME, GNU, GoboLinux, GrapheneOS, Grombyang, Guix, Haiku, HamoniKR,
# HarDClanZ, Hash, Huayra, Hybrid, HydroOS, Hyperbola, iglunix, instantOS, IRIX, Itc, januslinux,
# Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora, KrassOS, KSLinux, Kubuntu, LangitKetujuh,
# LaxerOS, LEDE, LibreELEC, Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old, Live Raizo,
# LMDE, Lubuntu, Lunar, mac, Mageia, MagpieOS, Mandriva, Manjaro, MassOS, MatuusOS, Maui, Mer,
# Minix, MIRACLE LINUX, MX, Namib, NekOS, Neptune, NetBSD, Netrunner, Nitrux, NixOS, NomadBSD,
# Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, Open Source Media Center, OpenBSD, openEuler,
# OpenIndiana, openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE Leap, openSUSE Tumbleweed,
# OpenWrt, OPNsense, Oracle, orchid, OS Elbrus, PacBSD, Parabola, parch, Pardus, Parrot, Parsix,
# PCBSD, PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Pisi, PNM Linux, Pop!_OS, Porteus,
# PostMarketOS, Profelis SambaBOX, Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian,
# Radix, Raspbian, ravynOS, Reborn OS, Red Star, Redcore, Redhat, Refracted Devuan, Regata,
# Regolith, RhaymOS, rocky, Rosa, Sabayon, sabotage, Sailfish, SalentOS, Sasanqua, Scientific, semc,
# Septor, Serene, SharkLinux, ShastraOS, Siduction, SkiffOS, Slackware, SliTaz, SmartOS, Soda,
# Solus, Source Mage, Sparky, Star, SteamOS, Stock Linux, Sulin, SunOS, SwagArch, t2, Tails, TeArch,
# TorizonCore, Trisquel, Twister, Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE,
# Ubuntu Studio, Ubuntu Sway, Ubuntu Touch, Ubuntu-GNOME, ubuntu_old02, Ultramarine Linux,
# Univalent, Univention, Uos, UrukOS, uwuntu, Vanilla, Venom, VNux, Void, VzLinux, wii-linux-ngx,
# Windows, Windows 10, Windows 11, XFerience, Xubuntu, yiffOS, Zorin have ascii logos.
# NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu have 'old' logo variants, use
# {distro}_old to use them.
@@ -1780,7 +1807,7 @@ get_packages() {
has() { type -p "$1" >/dev/null && manager=$1; }
# globbing is intentional here
# shellcheck disable=SC2206
dir() { pkgs=($@); ((packages+=${#pkgs[@]})); pac "$((${#pkgs[@]}-pkgs_h))"; }
dir() { pkgs=($@); [[ ! -e ${pkgs[0]} ]] && return; ((packages+=${#pkgs[@]})); pac "$((${#pkgs[@]}-pkgs_h))"; }
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
tot() {
IFS=$'\n' read -d "" -ra pkgs <<< "$("$@")";
@@ -2065,6 +2092,38 @@ get_shell() {
shell=${shell/\(*\)}
}
get_editor() {
local editor_full_path="${VISUAL:-$EDITOR}"
# in case neither is set just return
[[ -z "$editor_full_path" ]] && return
case $editor_path in
on) editor="${editor_full_path} " ;;
off) editor="${editor_full_path##*/} " ;;
esac
# in case editor version is not demanded don't bother parsing it
[[ $editor_version != on ]] && return
case ${editor_name:=${editor_full_path##*/}} in
nano|vim)
editor+=$("$editor_full_path" --version 2>&1)
editor="${editor/$'\n'*}"
editor="${editor/$editor_name }"
;;
*)
editor+=$("$editor_full_path" --version 2>&1)
editor="${editor/$'\n'*}"
;;
esac
# remove some common unwanted info from version strings
editor=${editor/, version}
editor=${editor/options*}
editor=${editor/\(*\)}
}
get_de() {
# If function was run, stop here.
((de_run == 1)) && return
@@ -2528,6 +2587,18 @@ get_cpu() {
[[ -z "$cpu" ]] && cpu="$(awk -F':' '/family/ {printf $2; exit}' "$cpu_file")"
;;
"riscv"* | "rv"*)
cpu_uarch="$(awk -F':' '/uarch/ {print $2; exit}' "$cpu_file")"
# RISC-V ISA string example: "rv64imafdch_zicsr_zifencei".
cpu_isa="$(awk -F':' '/isa/ {print $2; exit}' "$cpu_file")"
# The _z parts are not important for CPU showcasing, so we remove them.
cpu_isa="${cpu_isa%%_*}"
# Then we replace "imafd" with "g" since "g" is a shorthand.
cpu_isa="${cpu_isa/imafd/g}"
# The final ISA output of the above example is "rv64gch".
cpu="$cpu_uarch $cpu_isa"
;;
"arm"* | "aarch64")
if [[ $(trim "$distro") == Android* ]]; then
# Android roms have modified cpuinfo that shows CPU model as a string
@@ -3286,6 +3357,16 @@ get_network() {
fi
done < <(find /sys/class/net/ -type l)
;;
"Mac OS X"|"macOS")
ActiveNetwork=$(route get default | grep interface | awk '{print $2}')
ActiveNetworkName=$(networksetup -listallhardwareports | grep -B 1 "$ActiveNetwork" | awk '/Hardware Port/{print}'| awk '{print $3}')
if [[ $ActiveNetworkName == "Wi-Fi" ]]; then
LinkSpeed="$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/maxRate/{print}' | awk '{print $2}' )Mbps"
else
LinkSpeed="$(ifconfig "$ActiveNetwork" | awk '/media/{print}' | sed -E "s/.*\((.*)\).*/\1/")"
fi
network="$ActiveNetwork: $ActiveNetworkName@$LinkSpeed"
;;
esac
while IFS=' ' read -r n i; do
if [ -n "$i" ]; then
@@ -3385,7 +3466,7 @@ get_song() {
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
"lollypop"*) get_song_dbus "Lollypop" ;;
"clementine"*) get_song_dbus "clementine" ;;
"cmus"*) get_song_dbus "cmus" ;;
"juk"*) get_song_dbus "juk" ;;
"bluemindo"*) get_song_dbus "Bluemindo" ;;
"guayadeque"*) get_song_dbus "guayadeque" ;;
@@ -3422,6 +3503,14 @@ get_song() {
song="$(xmms2 current -f "\${artist}"$' \n'"\${album}"$' \n'"\${title}")"
;;
"cmus"*)
# NOTE: cmus >= 2.8.0 supports mpris2
song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; a=$0}
/tag album / {$1=$2=""; b=$0}
/tag title/ {$1=$2=""; t=$0}
END {print a " \n" b " \n" t}')"
;;
"spotify"*)
case $os in
"Linux") get_song_dbus "spotify" ;;
@@ -3952,7 +4041,7 @@ get_term() {
[[ -z "$parent" ]] && break
name="$(get_process_name "$parent")"
case ${name// } in
case ${name##*/} in
"${SHELL/*\/}"|*"sh"|"screen"|"su"*|"newgrp"|"hyfetch") ;;
"login"*|*"Login"*|"init"|"(init)")
@@ -3968,11 +4057,12 @@ get_term() {
[[ $name =~ \.(.*)-wrap.* ]] && term=${BASH_REMATCH[1]}
;;
"gnome-terminal-") term="gnome-terminal" ;;
"cutefish-termin") term="cutefish-terminal" ;;
"urxvtd") term="urxvt" ;;
*"nvim") term="Neovim Terminal" ;;
*"NeoVimServer"*) term="VimR Terminal" ;;
"gnome-terminal-"*) term="gnome-terminal" ;;
"kgx") term="gnome-console" ;;
"cutefish-terminal"*) term="cutefish-terminal" ;;
"urxvtd") term="urxvt" ;;
*"nvim") term="Neovim Terminal" ;;
*"NeoVimServer"*) term="VimR Terminal" ;;
*)
# Fix issues with long process names on Linux.
@@ -5804,6 +5894,8 @@ INFO:
--gtk3 on/off Enable/Disable gtk3 theme/font/icons output
--shell_path on/off Enable/Disable showing \$SHELL path
--shell_version on/off Enable/Disable showing \$SHELL version
--editor_path on/off Enable/Disable showing \$EDITOR path
--editor_version on/off Enable/Disable showing \$EDITOR version
--disk_show value Which disks to display.
Possible values: '/', '/dev/sdXX', '/path/to/mount point'
@@ -5899,46 +5991,46 @@ ASCII:
NOTE: AIX, AlmaLinux, Alpine, Alter, Amazon, AmogOS, Anarchy,
Android, Antergos, antiX, AOSC OS, AOSC OS/Retro, Aperio GNU/Linux,
Apricity, Arch, ArchBox, Archcraft, ARCHlabs, ArchMerge, ArchStrike,
ArcoLinux, Artix, Arya, Asahi, Aster, AsteroidOS, astOS, Bedrock,
BigLinux, Bitrig, BlackArch, blackPanther, BLAG, BlankOn, BlueLight,
Bodhi, bonsai, BSD, BunsenLabs, CachyOS, Calculate, CalinixOS,
Carbs, CBL-Mariner, CelOS, Center, CentOS, Chakra, ChaletOS,
Chapeau, ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS, ClearOS,
Clover, Cobalt, Condres, Container Linux by CoreOS, CRUX, Crystal
Linux, Cucumber, CutefishOS, CyberOS, dahlia, DarkOs, Darwin,
Debian, Deepin, DesaOS, Devuan, DietPi, DracOS, DragonFly, Drauger,
Droidian, Elementary, Elive, EncryptOS, EndeavourOS, Endless, Enso,
EuroLinux, Exherbo, Exodia Predator OS, Fedora, Feren, Finnix,
FreeBSD, FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo,
GhostBSD, glaucus, gNewSense, GNOME, GNU, GoboLinux, GrapheneOS,
Grombyang, Guix, Haiku, HamoniKR, HarDClanZ, Hash, Huayra, Hybrid,
HydroOS, Hyperbola, iglunix, instantOS, IRIX, Itc, januslinux,
Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora, KrassOS, KSLinux,
Kubuntu, LangitKetujuh, LaxerOS, LEDE, LibreELEC, Linspire, Linux,
Linux Lite, Linux Mint, Linux Mint Old, Live Raizo, LMDE, Lubuntu,
Lunar, mac, Mageia, MagpieOS, Mandriva, Manjaro, MassOS, MatuusOS,
Maui, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS, Neptune, NetBSD,
Netrunner, Nitrux, NixOS, NomadBSD, Nurunner, NuTyX, Obarun,
OBRevenge, OmniOS, Open Source Media Center, OpenBSD, openEuler,
OpenIndiana, openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE
Leap, openSUSE Tumbleweed, OpenWrt, OPNsense, Oracle, orchid, OS
Elbrus, PacBSD, Parabola, parch, Pardus, Parrot, Parsix, PCBSD,
PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Pisi, PNM Linux,
Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX, Proxmox, PuffOS,
Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian, Radix, Raspbian,
ravynOS, Reborn OS, Red Star, Redcore, Redhat, Refracted Devuan,
Regata, Regolith, rocky, Rosa, Sabayon, sabotage, Sailfish,
SalentOS, Sasanqua, Scientific, semc, Septor, Serene, SharkLinux,
ShastraOS, Siduction, SkiffOS, Slackware, SliTaz, SmartOS, Soda,
Solus, Source Mage, Sparky, Star, SteamOS, Stock Linux, Sulin,
SunOS, SwagArch, t2, Tails, TeArch, TorizonCore, Trisquel, Twister,
Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE,
Ubuntu Studio, Ubuntu Sway, Ubuntu Touch, Ubuntu-GNOME,
ubuntu_old02, Ultramarine Linux, Univalent, Univention, Uos, UrukOS,
uwuntu, Vanilla, Venom, VNux, Void, VzLinux, wii-linux-ngx, Windows,
Windows 10, Windows 11, XFerience, Xubuntu, yiffOS, Zorin have ascii
logos.
Aperture, Apricity, Arch, ArchBox, Archcraft, ARCHlabs, ArchMerge,
ArchStrike, ArcoLinux, Artix, Arya, Asahi, Aster, AsteroidOS, astOS,
Bedrock, BigLinux, Bitrig, BlackArch, blackPanther, BLAG, BlankOn,
BlueLight, Bodhi, bonsai, BSD, BunsenLabs, CachyOS, Calculate,
CalinixOS, Carbs, CBL-Mariner, CelOS, Center, CentOS, Chakra,
ChaletOS, Chapeau, ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS,
ClearOS, Clover, Cobalt, Condres, Container Linux by CoreOS, CRUX,
Crystal Linux, Cucumber, CutefishOS, CyberOS, dahlia, DarkOs,
Darwin, Debian, Deepin, DesaOS, Devuan, DietPi, DracOS, DragonFly,
Drauger, Droidian, Elementary, Elive, EncryptOS, EndeavourOS,
Endless, Enso, EuroLinux, Exherbo, Exodia Predator OS, Fedora,
Feren, Finnix, FreeBSD, FreeMiNT, Frugalware, Funtoo, GalliumOS,
Garuda, Gentoo, GhostBSD, glaucus, gNewSense, GNOME, GNU, GoboLinux,
GrapheneOS, Grombyang, Guix, Haiku, HamoniKR, HarDClanZ, Hash,
Huayra, Hybrid, HydroOS, Hyperbola, iglunix, instantOS, IRIX, Itc,
januslinux, Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora,
KrassOS, KSLinux, Kubuntu, LangitKetujuh, LaxerOS, LEDE, LibreELEC,
Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old, Live Raizo,
LMDE, Lubuntu, Lunar, mac, Mageia, MagpieOS, Mandriva, Manjaro,
MassOS, MatuusOS, Maui, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS,
Neptune, NetBSD, Netrunner, Nitrux, NixOS, NomadBSD, Nurunner,
NuTyX, Obarun, OBRevenge, OmniOS, Open Source Media Center, OpenBSD,
openEuler, OpenIndiana, openmamba, OpenMandriva, OpenStage,
openSUSE, openSUSE Leap, openSUSE Tumbleweed, OpenWrt, OPNsense,
Oracle, orchid, OS Elbrus, PacBSD, Parabola, parch, Pardus, Parrot,
Parsix, PCBSD, PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Pisi,
PNM Linux, Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX,
Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian, Radix,
Raspbian, ravynOS, Reborn OS, Red Star, Redcore, Redhat, Refracted
Devuan, Regata, Regolith, RhaymOS, rocky, Rosa, Sabayon, sabotage,
Sailfish, SalentOS, Sasanqua, Scientific, semc, Septor, Serene,
SharkLinux, ShastraOS, Siduction, SkiffOS, Slackware, SliTaz,
SmartOS, Soda, Solus, Source Mage, Sparky, Star, SteamOS, Stock
Linux, Sulin, SunOS, SwagArch, t2, Tails, TeArch, TorizonCore,
Trisquel, Twister, Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu
Kylin, Ubuntu MATE, Ubuntu Studio, Ubuntu Sway, Ubuntu Touch,
Ubuntu-GNOME, ubuntu_old02, Ultramarine Linux, Univalent,
Univention, Uos, UrukOS, uwuntu, Vanilla, Venom, VNux, Void,
VzLinux, wii-linux-ngx, Windows, Windows 10, Windows 11, XFerience,
Xubuntu, yiffOS, Zorin have ascii logos.
NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu
have 'old' logo variants, use {distro}_old to use them.
@@ -6031,6 +6123,8 @@ get_args() {
"--qt") qt="$2" ;;
"--shell_path") shell_path="$2" ;;
"--shell_version") shell_version="$2" ;;
"--editor_path") editor_path="$2" ;;
"--editor_version") editor_version="$2" ;;
"--ip_host") public_ip_host="$2" ;;
"--ip_timeout") public_ip_timeout="$2" ;;
"--ip_interface")
@@ -6335,6 +6429,32 @@ ${c2}
EOF
;;
"Aperture"*)
set_colors 6 6 7 1
read -rd '' ascii_data <<'EOF'
${c1} .,-:;//;:=,
. :H@@@MM@M#H/.,+%;,
,/X+ +M@@M@MM%=,-%HMMM@X/,
-+@MM; $M@@MH+-,;XMMMM@MMMM@+-
;@M@@M- XM@X;. -+XXXXXHHH@M@M#@/.
,%MM@@MH ,@%= .---=-=:=,.
=@#@@@MX., -%HX$$%%%:;
=-./@M@M$ .;@MMMM@MM:
X@/ -$MM/ . +MM@@@M$
,@M@H: :@: . =X#@@@@-
,@@@MMX, . /H- ;@M@M=
.H@@@@M@+, %MM+..%#$.
/MMMM@MMH/. XM@MH; =;
/%+%$XHH@$= , .H@@@@MX,
.=--------. -%H.,@@@@@MX,
.%MM@@@HHHXX$$$%+- .:$MMX =M@@MM%.
=XMMM@MM@MM#H;,-+HMM@M+ /MMMX=
=%@M@M#@$-.=$@MM@@@M; %M%=
,:+$+-,/H#MMMMMMM@= =,
=++%%%%+/:-.
EOF
;;
"Asahi"*)
set_colors 3 2 1 8 7 6 4
read -rd '' ascii_data <<'EOF'
@@ -12003,6 +12123,27 @@ ${c1}
EOF
;;
"RhaymOS"*)
set_colors 1
read -rd '' ascii_data <<'EOF'
${c1}
###
#####
####### /########
############# ###########
,########### #### ####(..
#### #### ####* ##########
#### ##### ##### (####
#### ########### ###########
#### ######### ##########
###################################
#####################################
#######################################
EOF
;;
"rocky_small"*)
set_colors 2
read -rd '' ascii_data <<'EOF'
+49 -43
View File
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
.TH NEOFETCH "1" "December 2022" "Neofetch 7.3.5" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH NEOFETCH "1" "January 2023" "Neofetch 7.3.6" "User Commands"
.SH NAME
Neofetch \- manual page for Neofetch 7.3.5
Neofetch \- manual page for Neofetch 7.3.6
.SH SYNOPSIS
.B neofetch
\fI\,func_name --option "value" --option "value"\/\fR
@@ -125,6 +125,12 @@ Enable/Disable showing $SHELL path
\fB\-\-shell_version\fR on/off
Enable/Disable showing $SHELL version
.TP
\fB\-\-editor_path\fR on/off
Enable/Disable showing $EDITOR path
.TP
\fB\-\-editor_version\fR on/off
Enable/Disable showing $EDITOR version
.TP
\fB\-\-disk_show\fR value
Which disks to display.
Possible values: '/', '/dev/sdXX', '/path/to/mount point'
@@ -306,46 +312,46 @@ Which Distro's ascii art to print
.TP
NOTE: AIX, AlmaLinux, Alpine, Alter, Amazon, AmogOS, Anarchy,
Android, Antergos, antiX, AOSC OS, AOSC OS/Retro, Aperio GNU/Linux,
Apricity, Arch, ArchBox, Archcraft, ARCHlabs, ArchMerge, ArchStrike,
ArcoLinux, Artix, Arya, Asahi, Aster, AsteroidOS, astOS, Bedrock,
BigLinux, Bitrig, BlackArch, blackPanther, BLAG, BlankOn, BlueLight,
Bodhi, bonsai, BSD, BunsenLabs, CachyOS, Calculate, CalinixOS,
Carbs, CBL\-Mariner, CelOS, Center, CentOS, Chakra, ChaletOS,
Chapeau, ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS, ClearOS,
Clover, Cobalt, Condres, Container Linux by CoreOS, CRUX, Crystal
Linux, Cucumber, CutefishOS, CyberOS, dahlia, DarkOs, Darwin,
Debian, Deepin, DesaOS, Devuan, DietPi, DracOS, DragonFly, Drauger,
Droidian, Elementary, Elive, EncryptOS, EndeavourOS, Endless, Enso,
EuroLinux, Exherbo, Exodia Predator OS, Fedora, Feren, Finnix,
FreeBSD, FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo,
GhostBSD, glaucus, gNewSense, GNOME, GNU, GoboLinux, GrapheneOS,
Grombyang, Guix, Haiku, HamoniKR, HarDClanZ, Hash, Huayra, Hybrid,
HydroOS, Hyperbola, iglunix, instantOS, IRIX, Itc, januslinux,
Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora, KrassOS, KSLinux,
Kubuntu, LangitKetujuh, LaxerOS, LEDE, LibreELEC, Linspire, Linux,
Linux Lite, Linux Mint, Linux Mint Old, Live Raizo, LMDE, Lubuntu,
Lunar, mac, Mageia, MagpieOS, Mandriva, Manjaro, MassOS, MatuusOS,
Maui, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS, Neptune, NetBSD,
Netrunner, Nitrux, NixOS, NomadBSD, Nurunner, NuTyX, Obarun,
OBRevenge, OmniOS, Open Source Media Center, OpenBSD, openEuler,
OpenIndiana, openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE
Leap, openSUSE Tumbleweed, OpenWrt, OPNsense, Oracle, orchid, OS
Elbrus, PacBSD, Parabola, parch, Pardus, Parrot, Parsix, PCBSD,
PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Pisi, PNM Linux,
Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX, Proxmox, PuffOS,
Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian, Radix, Raspbian,
ravynOS, Reborn OS, Red Star, Redcore, Redhat, Refracted Devuan,
Regata, Regolith, rocky, Rosa, Sabayon, sabotage, Sailfish,
SalentOS, Sasanqua, Scientific, semc, Septor, Serene, SharkLinux,
ShastraOS, Siduction, SkiffOS, Slackware, SliTaz, SmartOS, Soda,
Solus, Source Mage, Sparky, Star, SteamOS, Stock Linux, Sulin,
SunOS, SwagArch, t2, Tails, TeArch, TorizonCore, Trisquel, Twister,
Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE,
Ubuntu Studio, Ubuntu Sway, Ubuntu Touch, Ubuntu\-GNOME,
ubuntu_old02, Ultramarine Linux, Univalent, Univention, Uos, UrukOS,
uwuntu, Vanilla, Venom, VNux, Void, VzLinux, wii\-linux\-ngx, Windows,
Windows 10, Windows 11, XFerience, Xubuntu, yiffOS, Zorin have ascii
logos.
Aperture, Apricity, Arch, ArchBox, Archcraft, ARCHlabs, ArchMerge,
ArchStrike, ArcoLinux, Artix, Arya, Asahi, Aster, AsteroidOS, astOS,
Bedrock, BigLinux, Bitrig, BlackArch, blackPanther, BLAG, BlankOn,
BlueLight, Bodhi, bonsai, BSD, BunsenLabs, CachyOS, Calculate,
CalinixOS, Carbs, CBL\-Mariner, CelOS, Center, CentOS, Chakra,
ChaletOS, Chapeau, ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS,
ClearOS, Clover, Cobalt, Condres, Container Linux by CoreOS, CRUX,
Crystal Linux, Cucumber, CutefishOS, CyberOS, dahlia, DarkOs,
Darwin, Debian, Deepin, DesaOS, Devuan, DietPi, DracOS, DragonFly,
Drauger, Droidian, Elementary, Elive, EncryptOS, EndeavourOS,
Endless, Enso, EuroLinux, Exherbo, Exodia Predator OS, Fedora,
Feren, Finnix, FreeBSD, FreeMiNT, Frugalware, Funtoo, GalliumOS,
Garuda, Gentoo, GhostBSD, glaucus, gNewSense, GNOME, GNU, GoboLinux,
GrapheneOS, Grombyang, Guix, Haiku, HamoniKR, HarDClanZ, Hash,
Huayra, Hybrid, HydroOS, Hyperbola, iglunix, instantOS, IRIX, Itc,
januslinux, Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora,
KrassOS, KSLinux, Kubuntu, LangitKetujuh, LaxerOS, LEDE, LibreELEC,
Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old, Live Raizo,
LMDE, Lubuntu, Lunar, mac, Mageia, MagpieOS, Mandriva, Manjaro,
MassOS, MatuusOS, Maui, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS,
Neptune, NetBSD, Netrunner, Nitrux, NixOS, NomadBSD, Nurunner,
NuTyX, Obarun, OBRevenge, OmniOS, Open Source Media Center, OpenBSD,
openEuler, OpenIndiana, openmamba, OpenMandriva, OpenStage,
openSUSE, openSUSE Leap, openSUSE Tumbleweed, OpenWrt, OPNsense,
Oracle, orchid, OS Elbrus, PacBSD, Parabola, parch, Pardus, Parrot,
Parsix, PCBSD, PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Pisi,
PNM Linux, Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX,
Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian, Radix,
Raspbian, ravynOS, Reborn OS, Red Star, Redcore, Redhat, Refracted
Devuan, Regata, Regolith, RhaymOS, rocky, Rosa, Sabayon, sabotage,
Sailfish, SalentOS, Sasanqua, Scientific, semc, Septor, Serene,
SharkLinux, ShastraOS, Siduction, SkiffOS, Slackware, SliTaz,
SmartOS, Soda, Solus, Source Mage, Sparky, Star, SteamOS, Stock
Linux, Sulin, SunOS, SwagArch, t2, Tails, TeArch, TorizonCore,
Trisquel, Twister, Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu
Kylin, Ubuntu MATE, Ubuntu Studio, Ubuntu Sway, Ubuntu Touch,
Ubuntu\-GNOME, ubuntu_old02, Ultramarine Linux, Univalent,
Univention, Uos, UrukOS, uwuntu, Vanilla, Venom, VNux, Void,
VzLinux, wii\-linux\-ngx, Windows, Windows 10, Windows 11, XFerience,
Xubuntu, yiffOS, Zorin have ascii logos.
.TP
NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu
have 'old' logo variants, use {distro}_old to use them.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "neowofetch",
"version": "1.4.5",
"version": "1.4.6",
"description": "Updated neofetch",
"repository": {
"type": "git",
+4 -4
View File
@@ -55,10 +55,9 @@ def edit_versions(version: str):
print('Editing README.md...')
path = Path('README.md')
content = path.read_text()
changelog_i = content.index('<!-- CHANGELOG STARTS HERE --->')
version_i = content.index('###', changelog_i)
version_end = content.index('\n', version_i)
content = content[:version_i] + f'### {version}' + content[version_end:]
changelog_token = '<!-- CHANGELOG STARTS HERE --->'
changelog_i = content.index(changelog_token) + len(changelog_token)
content = content[:changelog_i] + f'\n\n### {version}' + content[changelog_i:]
path.write_text(content)
# 4. neofetch script
@@ -130,6 +129,7 @@ def create_release(v: str):
print('Pushing commits...')
subprocess.check_call(['git', 'push'])
subprocess.check_call(['git', 'push', 'origin', v])
subprocess.check_call(['git', 'push', 'origin', f'neofetch-{NEOFETCH_NEW_VERSION}'])
def deploy():
+21
View File
@@ -0,0 +1,21 @@
import os
import time
from github import Github
if __name__ == '__main__':
gh = Github(per_page=100, login_or_token=os.environ.get('GH_TOKEN'))
repo = gh.get_repo("hykilpikonna/hyfetch")
while True:
iss = repo.get_issues(state='open')
for i in iss:
if i.user.login in ['Symbolic11']:
i.edit(title="[Redacted]", body="[Redacted by Content Moderation Bot]", state="closed")
i.create_comment("Issue closed by bot for offensive content.")
print(f"Closed {i.number}")
time.sleep(2)