Skip to content

Commit

Permalink
feat(logging): log 'Happy New Year!'
Browse files Browse the repository at this point in the history
  • Loading branch information
linkfrg committed Dec 30, 2024
1 parent fd057ed commit 1321854
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ignis/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations
import os
import sys
import datetime
from ignis.dbus import DBusService
from ignis.utils import Utils
from loguru import logger
Expand Down Expand Up @@ -339,6 +340,16 @@ def do_activate(self) -> None:
self.emit("ready")
logger.info("Ready.")

date = datetime.datetime.now()

if date.month == 12 and date.day in [30, 31]:
self.__happy_new_year()
elif date.month == 1 and date.day in [1, 2]:
self.__happy_new_year()

def __happy_new_year(self) -> None:
logger.success("Happy New Year!")

def get_window(self, window_name: str) -> Gtk.Window:
"""
Get a window by name.
Expand Down

0 comments on commit 1321854

Please sign in to comment.