This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import annotations | |
import contextlib | |
import math | |
from dataclasses import dataclass | |
from PySide6.QtCore import ( | |
QEasingCurve, | |
QPointF, | |
QRect, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide6.QtGui import QGuiApplication, QPalette | |
from PySide6.QtWidgets import QApplication | |
def get_theme_mode() -> str: | |
"""Return 'dark' or 'light' based on the current system/application theme.""" | |
if QApplication.instance() is None: | |
raise RuntimeError("QApplication instance not found. Initialize it first.") | |
palette = QGuiApplication.palette() | |
bg_color = palette.color(QPalette.ColorRole.Window) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gi # type:ignore | |
import os | |
import csv | |
import time | |
import glob | |
import logging | |
import fractions | |
import subprocess | |
import tkinter as tk |