From 8cd766fc8d496c4b3e9da4d66e9048e5617e6aee Mon Sep 17 00:00:00 2001 From: Dylan De Faoite Date: Wed, 29 Apr 2026 20:13:09 +0100 Subject: [PATCH] refactor(os): rename autostart classes to os classes These perform OS-specific functions --- rewind/cli.py | 2 +- rewind/{autostart/autostart_backend.py => os/backend.py} | 2 +- rewind/{autostart => os}/linux.py | 4 ++-- rewind/{autostart => os}/main.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename rewind/{autostart/autostart_backend.py => os/backend.py} (95%) rename rewind/{autostart => os}/linux.py (96%) rename rewind/{autostart => os}/main.py (94%) diff --git a/rewind/cli.py b/rewind/cli.py index a12da56..0f96eb4 100755 --- a/rewind/cli.py +++ b/rewind/cli.py @@ -3,7 +3,7 @@ import sys import argparse from rewind.core import clip, mark, save, print_markers -from rewind.autostart.main import enable_autostart, disable_autostart, start_daemon, stop_daemon +from rewind.os.main import enable_autostart, disable_autostart, start_daemon, stop_daemon from rewind.config import Config def build_clip_parser(subparsers: argparse._SubParsersAction) -> None: diff --git a/rewind/autostart/autostart_backend.py b/rewind/os/backend.py similarity index 95% rename from rewind/autostart/autostart_backend.py rename to rewind/os/backend.py index 4017554..b8cda5f 100644 --- a/rewind/autostart/autostart_backend.py +++ b/rewind/os/backend.py @@ -1,4 +1,4 @@ -class AutostartBackend: +class OSBackend: def __init__(self, program_path: str): self.program_path = program_path diff --git a/rewind/autostart/linux.py b/rewind/os/linux.py similarity index 96% rename from rewind/autostart/linux.py rename to rewind/os/linux.py index c6ed542..dc29155 100644 --- a/rewind/autostart/linux.py +++ b/rewind/os/linux.py @@ -1,9 +1,9 @@ import subprocess from pathlib import Path -from rewind.autostart.autostart_backend import AutostartBackend +from rewind.os.backend import OSBackend -class LinuxBackend(AutostartBackend): +class LinuxBackend(OSBackend): def __init__(self, program_path: str): super().__init__(program_path) diff --git a/rewind/autostart/main.py b/rewind/os/main.py similarity index 94% rename from rewind/autostart/main.py rename to rewind/os/main.py index 80fa310..1388749 100644 --- a/rewind/autostart/main.py +++ b/rewind/os/main.py @@ -2,7 +2,7 @@ import platform import shutil -from rewind.autostart.linux import LinuxBackend +from rewind.os.linux import LinuxBackend APP_NAME = "rewind-daemon"