fix: formating issues in prompt
Some checks are pending
Continuous Integration / Checks (push) Waiting to run
Some checks are pending
Continuous Integration / Checks (push) Waiting to run
This commit is contained in:
parent
835bd775ae
commit
4e869e2cf0
1 changed files with 13 additions and 3 deletions
16
home/status
16
home/status
|
@ -23,7 +23,7 @@ class Cat(Status):
|
|||
def status(self):
|
||||
cat_width = 200
|
||||
index = self.index
|
||||
catwalk = " " * (cat_width - index) + 1 * "🐈🏳️🌈" + " " * index
|
||||
catwalk = "🐈🏳️🌈" + " " * index
|
||||
self.index = (index + 1) % cat_width
|
||||
|
||||
return {"full_text": catwalk}
|
||||
|
@ -71,7 +71,17 @@ class Battery(Status):
|
|||
|
||||
class Time(Status):
|
||||
def status(self):
|
||||
return {"full_text": datetime.now().strftime("%Vth %A %H:%M") }
|
||||
now = datetime.now()
|
||||
match now.isocalendar().week % 10:
|
||||
case 1:
|
||||
th = "st"
|
||||
case 2:
|
||||
th = "nd"
|
||||
case 3:
|
||||
th = "rd"
|
||||
case _:
|
||||
th = "th"
|
||||
return {"full_text": now.strftime(f"%V{th} %A %H:%M") }
|
||||
|
||||
|
||||
class FailedUnits(Status):
|
||||
|
@ -82,7 +92,7 @@ class FailedUnits(Status):
|
|||
for line in stdout:
|
||||
if 'failed' in line:
|
||||
failed += 1
|
||||
if failed is 0:
|
||||
if failed == 0:
|
||||
return {"full_text": f"No failed units"}
|
||||
else:
|
||||
return {"full_text": f"There are {failed} failed units", "color": "#ff0000"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue