only add splash attribute under i3

This commit is contained in:
Alexander Nigl 2025-04-06 18:11:59 +02:00
parent bc57724197
commit a52e4c23f3

View File

@ -3,6 +3,7 @@ import datetime
from tkinter import Tk, CENTER, Label from tkinter import Tk, CENTER, Label
import click import click
import typing as t import typing as t
import os
DELTASECONDS = "+%Ss" DELTASECONDS = "+%Ss"
DELTAMINUTES = "+%Mm" DELTAMINUTES = "+%Mm"
@ -83,6 +84,7 @@ def main(enddate):
root.bind("<Configure>", resize) root.bind("<Configure>", resize)
root.bind("<Escape>", lambda x: root.destroy()) root.bind("<Escape>", lambda x: root.destroy())
root.after(1, update) root.after(1, update)
if os.environ.get("XDG_CURRENT_DESKTOP", "") == "i3":
root.wm_attributes("-type", "splash") root.wm_attributes("-type", "splash")
root.mainloop() root.mainloop()