+3
-2
@@ -379,13 +379,14 @@ def run():
|
||||
if now.month == 6 and now.year not in config.pride_month_shown and os.isatty(sys.stdout.fileno()):
|
||||
args.june = True
|
||||
|
||||
if args.june:
|
||||
if args.june and not config.pride_month_disable:
|
||||
pride_month.start_animation()
|
||||
print()
|
||||
print("Happy pride month!")
|
||||
print("(You can always view the animation again with `hyfetch --june`)")
|
||||
print()
|
||||
config.pride_month_shown.append(now.year)
|
||||
if now.year not in config.pride_month_shown:
|
||||
config.pride_month_shown.append(now.year)
|
||||
config.save()
|
||||
|
||||
# Use a custom distro
|
||||
|
||||
+2
-1
@@ -18,6 +18,7 @@ class Config:
|
||||
backend: BackendLiteral = "neofetch"
|
||||
distro: str | None = None
|
||||
pride_month_shown: list[int] = field(default_factory=list)
|
||||
pride_month_disable: bool = False
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, d: dict):
|
||||
@@ -26,4 +27,4 @@ class Config:
|
||||
|
||||
def save(self):
|
||||
CONFIG_PATH.parent.mkdir(exist_ok=True, parents=True)
|
||||
CONFIG_PATH.write_text(json_stringify(self), 'utf-8')
|
||||
CONFIG_PATH.write_text(json_stringify(self, indent=4), 'utf-8')
|
||||
|
||||
Reference in New Issue
Block a user