#!/usr/bin/env python3
"""
HSRename - Native Linux GUI for mass renaming files.
Inspired by Bulk Rename Utility (Windows); supports preview and flexible rules.
"""
import sys
from pathlib import Path

# Ensure project root is on path when run as script or module
_root = Path(__file__).resolve().parent
if str(_root) not in sys.path:
    sys.path.insert(0, str(_root))

from PyQt6.QtWidgets import QApplication
from PyQt6.QtCore import Qt
from gui.main_window import MainWindow


def main():
    QApplication.setHighDpiScaleFactorRoundingPolicy(
        Qt.HighDpiScaleFactorRoundingPolicy.PassThrough
    )
    app = QApplication(sys.argv)
    app.setApplicationName("HSRename")
    win = MainWindow()
    win.show()
    sys.exit(app.exec())


if __name__ == "__main__":
    main()
