Merge branch 'master' into master
This commit is contained in:
commit
f815d2bdd6
19 changed files with 822 additions and 118 deletions
121
hyfetch/data/font_logos.json
Normal file
121
hyfetch/data/font_logos.json
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"Alma": "",
|
||||
"Alpine": "",
|
||||
"AOSC OS": "",
|
||||
"Apple": "",
|
||||
"Archcraft": "",
|
||||
"ArchLabs": "",
|
||||
"Arch": "",
|
||||
"Arco": "",
|
||||
"Arduino": "",
|
||||
"Artix": "",
|
||||
"Awesome WM": "",
|
||||
"Big": "",
|
||||
"bspwm": "",
|
||||
"Budgie": "",
|
||||
"CentOS": "",
|
||||
"Cinnamon": "",
|
||||
"Codeberg": "",
|
||||
"CoreOS": "",
|
||||
"Crystal": "",
|
||||
"Debian": "",
|
||||
"Deepin": "",
|
||||
"Devuan": "",
|
||||
"Docker": "",
|
||||
"dwm": "",
|
||||
"elementary OS": "",
|
||||
"Endeavour OS": "",
|
||||
"Enlightenment": "",
|
||||
"F-droid": "",
|
||||
"Fedora": "",
|
||||
"Fedora (inverse)": "",
|
||||
"Ferris": "",
|
||||
"Flathub": "",
|
||||
"Fluxbox": "",
|
||||
"Forgejo": "",
|
||||
"FOSDEM": "",
|
||||
"FreeBSD": "",
|
||||
"FreeCAD": "",
|
||||
"freedesktop.org": "",
|
||||
"Garuda": "",
|
||||
"Gentoo": "",
|
||||
"GIMP": "",
|
||||
"Gitea": "",
|
||||
"GNOME": "",
|
||||
"GNU Guix": "",
|
||||
"GTK": "",
|
||||
"Hyperbola -libre": "",
|
||||
"Hyprland": "",
|
||||
"i3": "",
|
||||
"illumos": "",
|
||||
"Inkscape": "",
|
||||
"JWM": "",
|
||||
"Kali": "",
|
||||
"KDE": "",
|
||||
"KDE Neon": "",
|
||||
"KDE Plasma": "",
|
||||
"Kdenlive": "",
|
||||
"KiCad": "",
|
||||
"Krita": "",
|
||||
"Kubuntu": "",
|
||||
"Kubuntu (inverse)": "",
|
||||
"Mint": "",
|
||||
"Mint (inverse)": "",
|
||||
"Loc-OS": "",
|
||||
"LXDE": "",
|
||||
"LXLE": "",
|
||||
"LXQt": "",
|
||||
"Mageia": "",
|
||||
"Mandriva": "",
|
||||
"Manjaro": "",
|
||||
"MATE": "",
|
||||
"mpv": "",
|
||||
"MX": "",
|
||||
"Neovim": "",
|
||||
"NixOS": "",
|
||||
"Octoprint": "",
|
||||
"OpenBSD": "",
|
||||
"OpenSCAD": "",
|
||||
"OpenSUSE": "",
|
||||
"OSH": "",
|
||||
"OSHWA": "",
|
||||
"OSI": "",
|
||||
"Parabola -libre": "",
|
||||
"Parrot OS": "",
|
||||
"Pop!_OS": "",
|
||||
"PostmarketOS": "",
|
||||
"Prusa Slicer": "",
|
||||
"Puppy": "",
|
||||
"Qt": "",
|
||||
"Qtile": "",
|
||||
"QubesOS": "",
|
||||
"Raspberry pi": "",
|
||||
"Red Hat": "",
|
||||
"RepRap": "",
|
||||
"RISC-V": "",
|
||||
"Rocky": "",
|
||||
"Sabayon": "",
|
||||
"Slackware": "",
|
||||
"Slackware (inverse)": "",
|
||||
"Snappy": "",
|
||||
"Solus": "",
|
||||
"Sway": "",
|
||||
"Tails": "",
|
||||
"Thunderbird": "",
|
||||
"Tor Browser": "",
|
||||
"Trisquel": "",
|
||||
"Tux": "",
|
||||
"Ubuntu": "",
|
||||
"Ubuntu (inverse)": "",
|
||||
"Vanilla OS": "",
|
||||
"Void": "",
|
||||
"VS Codium": "",
|
||||
"Wayland": "",
|
||||
"Wikimedia": "",
|
||||
"Xero": "",
|
||||
"XFCE": "",
|
||||
"Xmonad": "",
|
||||
"Xorg": "",
|
||||
"Zorin OS": "",
|
||||
"Windows": "\uE62A"
|
||||
}
|
||||
|
|
@ -2,25 +2,30 @@
|
|||
|
||||
from . import AsciiArt
|
||||
|
||||
biglinux = AsciiArt(match=r'''"BigLinux"*''', color='6 11 4', ascii=r"""
|
||||
${c1} ...
|
||||
:OWMMMNd.
|
||||
:NMMMMMMMMWc
|
||||
okkl. kMMMMMW0xdOWMl
|
||||
: xMMMMMW. kMMMMNc lW.
|
||||
:x NMMMMMO ,MMMM0. 'l
|
||||
Xx "lkk" kMMMX .okx,
|
||||
${c2}.MX .cc;. .xXKx. KMMM: .OMMMMMl
|
||||
:MM' 'KMMMMWK: 0MMMMk xMMM. lWMMMMMMM'
|
||||
cMMN:;xMMMMk::MMO oMMMMX .XMM. .KMMMWOOMMMd
|
||||
'MMMMMMMMN, NMMx OMMMMl .kM0OMMMMk. ;MMd
|
||||
xMMMMMMd .MMMW :NMMMd .ckKKx' KMc
|
||||
dWMNd. oMMMN lkNMX, oM.
|
||||
;. ;MMMMx "MM:. cO
|
||||
${c3} .X. oMMMMW. l.
|
||||
dMk:..;xWMMMMW,
|
||||
kMMMMMMMMMMX.
|
||||
:XMMMMMMK:
|
||||
':MM:" Made in Brazil
|
||||
biglinux = AsciiArt(match=r'''"BigLinux"*''', color='2 3 4 7', ascii=r"""
|
||||
|
||||
${c4}
|
||||
${c3}.cd0KXXX${c4}0${c3}x;
|
||||
${c3}.oXM${c4}M${c3}MMMMMMMMMWo
|
||||
${c2}... ${c3}dWMMMM${c4}M${c3}MMMMMMMMMMN,
|
||||
${c2}c0WMMMW0: ${c3}.XMMMM${c4}M${c3}MMMKdc;,;cxNMM:
|
||||
${c1}x, ${c2}.XMMMMMMMMM: ${c3}'W${c3}MMMMMMWo. ;KW.
|
||||
${c1}dM. ${c2}.WMMMMMMMM0 ${c3}N${c3}MMMM${c4}M${c3}Mk. dd
|
||||
${c1}.MM. ${c2}.lOKXKOl. ${c3}oMMMMMMd .l${c4}x${c3}kd: .
|
||||
${c1}kMM: .'.. ${c2}:xOOxc. ${c3}O${c4}M${c3}MMMM0 lXMMMMM${c4}M${c3}N;
|
||||
${c1}WMM0 lKMMMMMW0o. ${c2}KMMMMMMN. ${c3}xMM${c4}M${c3}M, .dWMMMMMMMMMM;
|
||||
${c1}.MMMMx .oWMMMMMMOl0MMX; ${c2}NMMMMMMM; ${c3}.NMMMM. .dWMMMM${c4}M${c3}MMMMMMMN
|
||||
${c1}.MMMMMNOKMMMMMMMk. 'MMMMx ${c2};MMMMMMMO ${c3}.KMMMl .oWMMMMMWk:,lWMMMM.
|
||||
${c1}xMMMMMMMMMMMMk. .MMMMMc ${c2}'XMMMMMMx ${c3}:0MMNMMMM${c4}M${c3}MWx. .WM${c4}M${c3}M.
|
||||
${c1}0MMMMMMMMWx. :MMMMMK ${c2}cKMMMMMX: ${c3},ok0K0x:. oMMN
|
||||
${c1}oNMMMM0c. .NMMMMMO ${c2}.lOWMMMX: ${c3}.M${c4}M${c3}o
|
||||
${c1}c. .'. .KMMMMMM: ${c2}.';clc. ${c3}MN
|
||||
${c1}:N; cWMMMMMMO ${c3}.W;
|
||||
${c1}0M0: 'dNMMMMMMM0 ${c3}',
|
||||
${c1}0MMMX0O0XMMMMMMMMMMo
|
||||
${c1}oWMMMMMMMMMMMMMMk.
|
||||
${c1}.oXMMMMMMMMW0c.
|
||||
${c1}.;ccc:,.
|
||||
|
||||
""")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -884,6 +884,10 @@ def detect(name: str) -> AsciiArt | None:
|
|||
from .nixos_old import nixos_old
|
||||
return nixos_old
|
||||
|
||||
if name.startswith('nixos_colorful'):
|
||||
from .nixos_colorful import nixos_colorful
|
||||
return nixos_colorful
|
||||
|
||||
if name.startswith('nixos'):
|
||||
from .nixos import nixos
|
||||
return nixos
|
||||
|
|
|
|||
26
hyfetch/distros/magix.py
Normal file
26
hyfetch/distros/magix.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# This file is automatically generated. Please do not modify.
|
||||
|
||||
from . import AsciiArt
|
||||
|
||||
magix = AsciiArt(match=r'''"Magix"*''', color='206 39', ascii=r"""
|
||||
${c2} @
|
||||
@@--=====@@
|
||||
@@--==@@ @@====+@
|
||||
@-@@ @==@
|
||||
@=@
|
||||
@=@${c1} @=@ @-==== @=@${c2}
|
||||
@=@${c1} @-===@==++@===+@${c2}
|
||||
@=@${c1} @--====@@=====+@${c2}
|
||||
-=@${c1} @--==========++@${c2}
|
||||
==${c1} @--==========++@${c2} @=@
|
||||
@==${c1} @--=======@==++@${c2} @=+@
|
||||
@==${c1} @-==========++${c2} @=@
|
||||
@==${c1} @-=======@=%${c2} @=@
|
||||
@==${c1} @@@@@@${c2} @=@
|
||||
@====@@@ @@===+%
|
||||
@@=====@@==++++@@
|
||||
=#@=@
|
||||
@==@++@
|
||||
@@@
|
||||
""")
|
||||
|
||||
27
hyfetch/distros/nixos_colorful.py
Normal file
27
hyfetch/distros/nixos_colorful.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# This file is automatically generated. Please do not modify.
|
||||
|
||||
from . import AsciiArt
|
||||
|
||||
nixos_colorful = AsciiArt(match=r'''"nixos_colorful"*''', color='4 6 4 6 4 6', ascii=r"""
|
||||
${c1} ▗▄▄▄ ${c2}▗▄▄▄▄ ▄▄▄▖
|
||||
${c1} ▜███▙ ${c2}▜███▙ ▟███▛
|
||||
${c1} ▜███▙ ${c2}▜███▙▟███▛
|
||||
${c1} ▜███▙ ${c2}▜██████▛
|
||||
${c1} ▟█████████████████▙ ${c2}▜████▛ ${c3}▟▙
|
||||
${c1} ▟███████████████████▙ ${c2}▜███▙ ${c3}▟██▙
|
||||
${c6} ▄▄▄▄▖ ${c2}▜███▙ ${c3}▟███▛
|
||||
${c6} ▟███▛ ${c2}▜██▛ ${c3}▟███▛
|
||||
${c6} ▟███▛ ${c2}▜▛ ${c3}▟███▛
|
||||
${c6}▟███████████▛ ${c3}▟██████████▙
|
||||
${c6}▜██████████▛ ${c3}▟███████████▛
|
||||
${c6} ▟███▛ ${c5}▟▙ ${c3}▟███▛
|
||||
${c6} ▟███▛ ${c5}▟██▙ ${c3}▟███▛
|
||||
${c6} ▟███▛ ${c5}▜███▙ ${c3}▝▀▀▀▀
|
||||
${c6} ▜██▛ ${c5}▜███▙ ${c4}▜██████████████████▛
|
||||
${c6} ▜▛ ${c5}▟████▙ ${c4}▜████████████████▛
|
||||
${c5} ▟██████▙ ${c4}▜███▙
|
||||
${c5} ▟███▛▜███▙ ${c4}▜███▙
|
||||
${c5} ▟███▛ ▜███▙ ${c4}▜███▙
|
||||
${c5} ▝▀▀▀ ▀▀▀▀▘ ${c4}▀▀▀▘
|
||||
""")
|
||||
|
||||
37
hyfetch/font_logo.py
Normal file
37
hyfetch/font_logo.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from hyfetch.constants import CACHE_PATH
|
||||
from hyfetch.neofetch_util import get_distro_name
|
||||
|
||||
|
||||
def get_font_logo() -> str:
|
||||
cache = CACHE_PATH / 'font_logo_cache.txt'
|
||||
if cache.exists():
|
||||
return cache.read_text('utf-8')
|
||||
|
||||
font_logos: dict[str, str] = json.loads((Path(__file__).parent / 'data/font_logos.json').read_text('utf-8'))
|
||||
font_logos = {k.lower(): v for k, v in font_logos.items()}
|
||||
|
||||
# Get the distro
|
||||
distro = get_distro_name().lower()
|
||||
|
||||
# Find most likely distro by containing string
|
||||
for k in font_logos.keys():
|
||||
if k in distro:
|
||||
distro = k
|
||||
# If not found, try matching partial string (by splitting with " ")
|
||||
if not distro:
|
||||
for k in font_logos.keys():
|
||||
if any(x in distro for x in k.split(' ')):
|
||||
distro = k
|
||||
# If still not found, give up
|
||||
if not distro:
|
||||
raise ValueError(f'No font logo found for distro: {distro}. The supported logos are in https://github.com/Lukas-W/font-logos')
|
||||
|
||||
logo = font_logos[distro]
|
||||
cache.parent.mkdir(parents=True, exist_ok=True)
|
||||
cache.write_text(logo)
|
||||
|
||||
return logo
|
||||
|
||||
|
|
@ -14,6 +14,7 @@ from . import termenv, neofetch_util, pride_month
|
|||
from .color_scale import Scale
|
||||
from .color_util import clear_screen
|
||||
from .constants import *
|
||||
from .font_logo import get_font_logo
|
||||
from .models import Config
|
||||
from .neofetch_util import *
|
||||
from .presets import PRESETS
|
||||
|
|
@ -210,12 +211,15 @@ def create_config() -> Config:
|
|||
return def_lightness
|
||||
|
||||
try:
|
||||
lightness = int(lightness[:-1]) / 100 if lightness.endswith('%') else float(lightness)
|
||||
if lightness.endswith('%') or int(lightness) > 1:
|
||||
lightness = int(lightness[:-1]) / 100 if lightness.endswith('%') else int(lightness) / 100
|
||||
else:
|
||||
lightness = float(lightness)
|
||||
assert 0 <= lightness <= 1
|
||||
return lightness
|
||||
|
||||
except Exception:
|
||||
printc('&cUnable to parse lightness value, please input it as a decimal or percentage (e.g. 0.5 or 50%)')
|
||||
printc('&cUnable to parse lightness value, please enter a lightness value such as 45%, .45, or 45')
|
||||
|
||||
lightness = select_lightness()
|
||||
_prs = _prs.set_light_dl(lightness, light_dark)
|
||||
|
|
@ -244,7 +248,7 @@ def create_config() -> Config:
|
|||
|
||||
# Random color schemes
|
||||
pis = list(range(len(_prs.unique_colors().colors)))
|
||||
slots = list(set(re.findall('(?<=\\${c)[0-9](?=})', asc)))
|
||||
slots = list(set(map(int, re.findall('(?<=\\${c)[0-9](?=})', asc))))
|
||||
while len(pis) < len(slots):
|
||||
pis += pis
|
||||
perm = {p[:len(slots)] for p in permutations(pis)}
|
||||
|
|
@ -344,6 +348,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|||
|
||||
parser.add_argument('--distro', '--test-distro', dest='distro', help=f'Test for a specific distro')
|
||||
parser.add_argument('--ascii-file', help='Use a specific file for the ascii art')
|
||||
parser.add_argument('--print-font-logo', action='store_true', help='Print the Font Logo / Nerd Font icon of your distro and exit')
|
||||
|
||||
# Hidden debug arguments
|
||||
# --test-print: Print the ascii distro and exit
|
||||
|
|
@ -388,6 +393,10 @@ def run():
|
|||
print(get_distro_ascii())
|
||||
return
|
||||
|
||||
if args.print_font_logo:
|
||||
print(get_font_logo())
|
||||
return
|
||||
|
||||
# Check if user provided alternative config path
|
||||
if not args.config_file == CONFIG_PATH:
|
||||
args.config_file = Path(os.path.abspath(args.config_file))
|
||||
|
|
|
|||
|
|
@ -129,7 +129,10 @@ class ColorAlignment:
|
|||
|
||||
@classmethod
|
||||
def from_dict(cls, d: dict):
|
||||
return from_dict(cls, d)
|
||||
ca = from_dict(cls, d)
|
||||
# Fixup: Keys must json serialize as str, so we convert them back to int.
|
||||
ca.custom_colors = {int(k): v for k, v in ca.custom_colors.items()}
|
||||
return ca
|
||||
|
||||
def recolor_ascii(self, asc: str, preset: ColorProfile) -> str:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -189,6 +189,17 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
'#282828'
|
||||
]),
|
||||
|
||||
# xenogender sourced from https://commons.wikimedia.org/wiki/File:Xenogender_pride_flag.svg
|
||||
'xenogender': ColorProfile([
|
||||
'#FF6692',
|
||||
'#FF9A98',
|
||||
'#FFB883',
|
||||
'#FBFFA8',
|
||||
'#85BCFF',
|
||||
'#9D85FF',
|
||||
'#A510FF'
|
||||
]),
|
||||
|
||||
'agender': ColorProfile([
|
||||
'#000000',
|
||||
'#BABABA',
|
||||
|
|
@ -499,7 +510,7 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
'#740194',
|
||||
]),
|
||||
|
||||
'autoromantic': ColorProfile([ # symbol interpreted
|
||||
'autoromantic': ColorProfile([ # symbol interpreted
|
||||
'#99D9EA',
|
||||
'#99D9EA',
|
||||
'#3DA542',
|
||||
|
|
@ -574,6 +585,16 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
'#FFF798',
|
||||
]),
|
||||
|
||||
'pangender.contrast': ColorProfile([
|
||||
'#ffe87f',
|
||||
'#fcbaa6',
|
||||
'#fbc9f3',
|
||||
'#FFFFFF',
|
||||
'#fbc9f3',
|
||||
'#fcbaa6',
|
||||
'#ffe87f',
|
||||
]),
|
||||
|
||||
'gendernonconforming1': ColorProfile(
|
||||
ColorProfile([
|
||||
'#50284d',
|
||||
|
|
@ -584,7 +605,7 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
'#96467b',
|
||||
'#50284d'
|
||||
]).with_weights([
|
||||
4,1,1,1,1,1,4
|
||||
4, 1, 1, 1, 1, 1, 4
|
||||
])
|
||||
),
|
||||
|
||||
|
|
@ -631,7 +652,7 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
]),
|
||||
|
||||
# gendervoid and related flags sourced from: https://gender.fandom.com/wiki/Gendervoid
|
||||
'gendervoid' : ColorProfile([
|
||||
'gendervoid': ColorProfile([
|
||||
"#081149",
|
||||
"#4B484B",
|
||||
"#000000",
|
||||
|
|
@ -639,7 +660,7 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
"#081149"
|
||||
]),
|
||||
|
||||
'voidgirl' : ColorProfile([
|
||||
'voidgirl': ColorProfile([
|
||||
"#180827",
|
||||
"#7A5A8B",
|
||||
"#E09BED",
|
||||
|
|
@ -647,7 +668,7 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
"#180827"
|
||||
]),
|
||||
|
||||
'voidboy' : ColorProfile([
|
||||
'voidboy': ColorProfile([
|
||||
"#0B130C",
|
||||
"#547655",
|
||||
"#66B969",
|
||||
|
|
@ -656,21 +677,21 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
]),
|
||||
|
||||
# used https://twitter.com/foxbrained/status/1667621855518236674/photo/1 as source and colorpicked
|
||||
'nonhuman-unity' : ColorProfile([
|
||||
'nonhuman-unity': ColorProfile([
|
||||
"#177B49",
|
||||
"#FFFFFF",
|
||||
"#593C90"
|
||||
]),
|
||||
|
||||
# used https://pluralpedia.org/w/Plurality#/media/File:Plural-Flag-1.jpg as source and colorpicked
|
||||
'plural' : ColorProfile([
|
||||
'plural': ColorProfile([
|
||||
"#2D0625",
|
||||
"#543475",
|
||||
"#7675C3",
|
||||
"#89C7B0",
|
||||
"#F3EDBD",
|
||||
"#543475",
|
||||
"#7675C3",
|
||||
"#89C7B0",
|
||||
"#F3EDBD",
|
||||
]),
|
||||
|
||||
|
||||
# sampled from https://es.m.wikipedia.org/wiki/Archivo:Fraysexual_flag.jpg
|
||||
'fraysexual': ColorProfile([
|
||||
'#226CB5',
|
||||
|
|
@ -730,7 +751,179 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
'#FFFFFF',
|
||||
'#FFFF81',
|
||||
]),
|
||||
|
||||
|
||||
'kenochoric': ColorProfile([
|
||||
'#000000',
|
||||
'#2E1569',
|
||||
'#824DB7',
|
||||
'#C7A1D6',
|
||||
]),
|
||||
|
||||
'veldian': ColorProfile([
|
||||
'#D182A8',
|
||||
'#FAF6E0',
|
||||
'#69ACBE',
|
||||
'#5D448F',
|
||||
'#3A113E',
|
||||
]),
|
||||
|
||||
'solian': ColorProfile([
|
||||
'#FFF8ED',
|
||||
'#FFE7A8',
|
||||
'#F1B870',
|
||||
'#A56058',
|
||||
'#46281E',
|
||||
]),
|
||||
|
||||
'lunian': ColorProfile([
|
||||
'#2F0E62',
|
||||
'#6F41B1',
|
||||
'#889FDF',
|
||||
'#7DDFD5',
|
||||
'#D2F2E2',
|
||||
]),
|
||||
|
||||
# Start of Extras by Jaida Corvera
|
||||
# polyamorous flag colors pulled from https://polyamproud.com/flag
|
||||
'polyam': ColorProfile([
|
||||
"#FFFFFF",
|
||||
"#FCBF00",
|
||||
"#009FE3",
|
||||
"#E50051",
|
||||
"#340C46",
|
||||
]),
|
||||
|
||||
'sapphic': ColorProfile([
|
||||
"#FD8BA8",
|
||||
"#FBF2FF",
|
||||
"#C76BC5",
|
||||
"#FDD768",
|
||||
"#C76BC5",
|
||||
"#FBF2FF",
|
||||
"#FD8BA8"
|
||||
]),
|
||||
|
||||
'androgyne': ColorProfile([
|
||||
"#FE007F",
|
||||
"#9832FF",
|
||||
"#00B8E7",
|
||||
]),
|
||||
|
||||
'interprogress': ColorProfile([
|
||||
"#FFD800",
|
||||
"#7902AA",
|
||||
"#FFFFFF",
|
||||
"#FFAFC8",
|
||||
"#74D7EE",
|
||||
"#613915",
|
||||
"#000000",
|
||||
'#E50000',
|
||||
'#FF8D00',
|
||||
'#FFEE00',
|
||||
'#028121',
|
||||
'#004CFF',
|
||||
'#770088'
|
||||
]),
|
||||
|
||||
'progress': ColorProfile([
|
||||
"#FFFFFF",
|
||||
"#FFAFC8",
|
||||
"#74D7EE",
|
||||
"#613915",
|
||||
"#000000",
|
||||
'#E50000',
|
||||
'#FF8D00',
|
||||
'#FFEE00',
|
||||
'#028121',
|
||||
'#004CFF',
|
||||
'#770088'
|
||||
]),
|
||||
|
||||
'intersex': ColorProfile([
|
||||
"#FFD800",
|
||||
"#FFD800",
|
||||
"#7902AA",
|
||||
"#FFD800",
|
||||
"#FFD800"
|
||||
]),
|
||||
|
||||
'old-polyam': ColorProfile([
|
||||
"#0000FF",
|
||||
"#FF0000",
|
||||
"#FFFF00",
|
||||
"#FF0000",
|
||||
"#000000"
|
||||
]),
|
||||
|
||||
'equal-rights': ColorProfile([
|
||||
"#0000FF",
|
||||
"#0000FF",
|
||||
"#FFFF00",
|
||||
"#0000FF",
|
||||
"#0000FF",
|
||||
"#FFFF00",
|
||||
"#0000FF",
|
||||
"#0000FF"
|
||||
]),
|
||||
|
||||
'drag': ColorProfile([
|
||||
"#CC67FF",
|
||||
"#FFFFFF",
|
||||
"#FFA3E3",
|
||||
"#FFFFFF",
|
||||
"#3366FF"
|
||||
]),
|
||||
|
||||
# Pronoun Flags
|
||||
|
||||
'pronounfluid': ColorProfile([
|
||||
"#ffb3f9",
|
||||
"#ffffff",
|
||||
"#d1fdcb",
|
||||
"#c7b0ff",
|
||||
"#000000",
|
||||
"#b8ccff"
|
||||
]),
|
||||
|
||||
'pronounflux': ColorProfile([
|
||||
"#fdb3f8",
|
||||
"#b6ccfa",
|
||||
"#18ddd3",
|
||||
"#64ff89",
|
||||
"#ff7690",
|
||||
"#ffffff"
|
||||
]),
|
||||
|
||||
'exipronoun': ColorProfile([
|
||||
"#1c3d34",
|
||||
"#ffffff",
|
||||
"#321848",
|
||||
"#000000"
|
||||
]),
|
||||
|
||||
'neopronoun': ColorProfile([
|
||||
"#bcec64",
|
||||
"#ffffff",
|
||||
"#38077a"
|
||||
]),
|
||||
|
||||
'neofluid': ColorProfile([
|
||||
"#ffeca0",
|
||||
"#ffffff",
|
||||
"#ffeca0",
|
||||
"#38087a",
|
||||
"#bcec64"
|
||||
]),
|
||||
|
||||
'genderqueer': ColorProfile([
|
||||
"#b57edc",
|
||||
"#b57edc",
|
||||
"#ffffff",
|
||||
"#ffffff",
|
||||
"#4a8123",
|
||||
"#4a8123"
|
||||
]),
|
||||
|
||||
# Meme flags
|
||||
'beiyang': ColorProfile([
|
||||
'#DF1B12',
|
||||
|
|
@ -760,4 +953,15 @@ PRESETS: dict[str, ColorProfile] = {
|
|||
'#243897',
|
||||
'#6F0A82',
|
||||
]),
|
||||
|
||||
# this is 4 all the dogs, from zombpawcoins on tumblr!
|
||||
'caninekin': ColorProfile([
|
||||
'#2d2822',
|
||||
'#543d25',
|
||||
'#9c754d',
|
||||
'#e8dac2',
|
||||
'#cfad8c',
|
||||
'#b77b55',
|
||||
'#954e31'
|
||||
])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ _shtab_hyfetch_option_strings=('-h' '--help' '-c' '--config' '-C' '--config-file
|
|||
|
||||
|
||||
|
||||
_shtab_hyfetch__p_choices=('rainbow' 'transgender' 'nonbinary' 'agender' 'queer' 'genderfluid' 'bisexual' 'pansexual' 'polysexual' 'omnisexual' 'omniromantic' 'gay-men' 'lesbian' 'abrosexual' 'asexual' 'aromantic' 'aroace1' 'aroace2' 'aroace3' 'autosexual' 'intergender' 'greygender' 'akiosexual' 'bigender' 'demigender' 'demiboy' 'demigirl' 'transmasculine' 'transfeminine' 'genderfaun' 'demifaun' 'genderfae' 'demifae' 'neutrois' 'biromantic1' 'biromantic2' 'autoromantic' 'boyflux2' 'finsexual' 'unlabeled1' 'unlabeled2' 'pangender' 'gendernonconforming1' 'gendernonconforming2' 'femboy' 'tomboy' 'gendervoid' 'voidgirl' 'voidboy' 'plural' 'beiyang' 'burger')
|
||||
_shtab_hyfetch___preset_choices=('rainbow' 'transgender' 'nonbinary' 'agender' 'queer' 'genderfluid' 'bisexual' 'pansexual' 'polysexual' 'omnisexual' 'omniromantic' 'gay-men' 'lesbian' 'abrosexual' 'asexual' 'aromantic' 'aroace1' 'aroace2' 'aroace3' 'autosexual' 'intergender' 'greygender' 'akiosexual' 'bigender' 'demigender' 'demiboy' 'demigirl' 'transmasculine' 'transfeminine' 'genderfaun' 'demifaun' 'genderfae' 'demifae' 'neutrois' 'biromantic1' 'biromantic2' 'autoromantic' 'boyflux2' 'finsexual' 'unlabeled1' 'unlabeled2' 'pangender' 'gendernonconforming1' 'gendernonconforming2' 'femboy' 'tomboy' 'gendervoid' 'voidgirl' 'voidboy' 'plural' 'beiyang' 'burger')
|
||||
_shtab_hyfetch__p_choices=('rainbow' 'transgender' 'nonbinary' 'agender' 'queer' 'genderfluid' 'bisexual' 'pansexual' 'polysexual' 'omnisexual' 'omniromantic' 'gay-men' 'lesbian' 'abrosexual' 'asexual' 'aromantic' 'aroace1' 'aroace2' 'aroace3' 'autosexual' 'intergender' 'greygender' 'akiosexual' 'bigender' 'demigender' 'demiboy' 'demigirl' 'transmasculine' 'transfeminine' 'genderfaun' 'demifaun' 'genderfae' 'demifae' 'neutrois' 'biromantic1' 'biromantic2' 'autoromantic' 'boyflux2' 'finsexual' 'unlabeled1' 'unlabeled2' 'pangender' 'gendernonconforming1' 'gendernonconforming2' 'femboy' 'tomboy' 'gendervoid' 'voidgirl' 'voidboy' 'plural' 'beiyang' 'burger' 'caninekin')
|
||||
_shtab_hyfetch___preset_choices=('rainbow' 'transgender' 'nonbinary' 'agender' 'queer' 'genderfluid' 'bisexual' 'pansexual' 'polysexual' 'omnisexual' 'omniromantic' 'gay-men' 'lesbian' 'abrosexual' 'asexual' 'aromantic' 'aroace1' 'aroace2' 'aroace3' 'autosexual' 'intergender' 'greygender' 'akiosexual' 'bigender' 'demigender' 'demiboy' 'demigirl' 'transmasculine' 'transfeminine' 'genderfaun' 'demifaun' 'genderfae' 'demifae' 'neutrois' 'biromantic1' 'biromantic2' 'autoromantic' 'boyflux2' 'finsexual' 'unlabeled1' 'unlabeled2' 'pangender' 'gendernonconforming1' 'gendernonconforming2' 'femboy' 'tomboy' 'gendervoid' 'voidgirl' 'voidboy' 'plural' 'beiyang' 'burger' 'caninekin')
|
||||
_shtab_hyfetch__m_choices=('8bit' 'rgb')
|
||||
_shtab_hyfetch___mode_choices=('8bit' 'rgb')
|
||||
_shtab_hyfetch__b_choices=('neofetch' 'fastfetch' 'fastfetch-old')
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
complete hyfetch \
|
||||
'c/--/(mode test-distro preset config c-scale c-set-l config-file ascii-file version debug distro help backend)/' \
|
||||
'c/-/(m h V C p b c -)/' \
|
||||
'n/-p/(rainbow transgender nonbinary agender queer genderfluid bisexual pansexual polysexual omnisexual omniromantic gay-men lesbian abrosexual asexual aromantic aroace1 aroace2 aroace3 autosexual intergender greygender akiosexual bigender demigender demiboy demigirl transmasculine transfeminine genderfaun demifaun genderfae demifae neutrois biromantic1 biromantic2 autoromantic boyflux2 finsexual unlabeled1 unlabeled2 pangender gendernonconforming1 gendernonconforming2 femboy tomboy gendervoid voidgirl voidboy plural beiyang burger)/' \
|
||||
'n/--preset/(rainbow transgender nonbinary agender queer genderfluid bisexual pansexual polysexual omnisexual omniromantic gay-men lesbian abrosexual asexual aromantic aroace1 aroace2 aroace3 autosexual intergender greygender akiosexual bigender demigender demiboy demigirl transmasculine transfeminine genderfaun demifaun genderfae demifae neutrois biromantic1 biromantic2 autoromantic boyflux2 finsexual unlabeled1 unlabeled2 pangender gendernonconforming1 gendernonconforming2 femboy tomboy gendervoid voidgirl voidboy plural beiyang burger)/' \
|
||||
'n/-p/(rainbow transgender nonbinary agender queer genderfluid bisexual pansexual polysexual omnisexual omniromantic gay-men lesbian abrosexual asexual aromantic aroace1 aroace2 aroace3 autosexual intergender greygender akiosexual bigender demigender demiboy demigirl transmasculine transfeminine genderfaun demifaun genderfae demifae neutrois biromantic1 biromantic2 autoromantic boyflux2 finsexual unlabeled1 unlabeled2 pangender gendernonconforming1 gendernonconforming2 femboy tomboy gendervoid voidgirl voidboy plural beiyang burger caninekin)/' \
|
||||
'n/--preset/(rainbow transgender nonbinary agender queer genderfluid bisexual pansexual polysexual omnisexual omniromantic gay-men lesbian abrosexual asexual aromantic aroace1 aroace2 aroace3 autosexual intergender greygender akiosexual bigender demigender demiboy demigirl transmasculine transfeminine genderfaun demifaun genderfae demifae neutrois biromantic1 biromantic2 autoromantic boyflux2 finsexual unlabeled1 unlabeled2 pangender gendernonconforming1 gendernonconforming2 femboy tomboy gendervoid voidgirl voidboy plural beiyang burger caninekin)/' \
|
||||
'n/-m/(8bit rgb)/' \
|
||||
'n/--mode/(8bit rgb)/' \
|
||||
'n/-b/(neofetch fastfetch fastfetch-old)/' \
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ _shtab_hyfetch_options=(
|
|||
"(- : *)"{-h,--help}"[show this help message and exit]"
|
||||
{-c,--config}"[Configure hyfetch]"
|
||||
{-C,--config-file}"[Use another config file]:config_file:"
|
||||
{-p,--preset}"[Use preset]:preset:(rainbow transgender nonbinary agender queer genderfluid bisexual pansexual polysexual omnisexual omniromantic gay-men lesbian abrosexual asexual aromantic aroace1 aroace2 aroace3 autosexual intergender greygender akiosexual bigender demigender demiboy demigirl transmasculine transfeminine genderfaun demifaun genderfae demifae neutrois biromantic1 biromantic2 autoromantic boyflux2 finsexual unlabeled1 unlabeled2 pangender gendernonconforming1 gendernonconforming2 femboy tomboy gendervoid voidgirl voidboy plural beiyang burger)"
|
||||
{-p,--preset}"[Use preset]:preset:(rainbow transgender nonbinary agender queer genderfluid bisexual pansexual polysexual omnisexual omniromantic gay-men lesbian abrosexual asexual aromantic aroace1 aroace2 aroace3 autosexual intergender greygender akiosexual bigender demigender demiboy demigirl transmasculine transfeminine genderfaun demifaun genderfae demifae neutrois biromantic1 biromantic2 autoromantic boyflux2 finsexual unlabeled1 unlabeled2 pangender gendernonconforming1 gendernonconforming2 femboy tomboy gendervoid voidgirl voidboy plural beiyang burger caninekin)"
|
||||
{-m,--mode}"[Color mode]:mode:(8bit rgb)"
|
||||
{-b,--backend}"[Choose a \*fetch backend]:backend:(neofetch fastfetch fastfetch-old)"
|
||||
"--c-scale[Lighten colors by a multiplier]:scale:"
|
||||
|
|
|
|||
|
|
@ -134,9 +134,11 @@ def unix_read_osc(seq: int) -> str:
|
|||
# Terminate with sequence terminator [\ or bell ^G
|
||||
if code.endswith('\x1b\\') or code.endswith('\a'):
|
||||
break
|
||||
signal.alarm(0)
|
||||
except IOError:
|
||||
pass
|
||||
finally:
|
||||
# Disable alarm
|
||||
signal.alarm(0)
|
||||
|
||||
# Reset terminal back to normal mode (previously set to raw mode)
|
||||
termios.tcsetattr(fd, termios.TCSADRAIN, settings)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue