Files
FastAnime/fastanime/libs/selectors/rofi/selector.py
2025-07-06 22:23:14 +03:00

30 lines
960 B
Python

import shutil
import subprocess
from ....core.config import RofiConfig
from ..base import BaseSelector
class RofiSelector(BaseSelector):
def __init__(self, config: RofiConfig):
self.config = config
self.executable = shutil.which("rofi")
if not self.executable:
raise FileNotFoundError("rofi executable not found in PATH.")
def choose(self, prompt, choices, *, preview=None, header=None):
# This maps directly to your existing `run` method
# ... (logic from your `Rofi.run` method) ...
# It should use self.config.theme_main, etc.
pass
def confirm(self, prompt, *, default=False):
# Maps directly to your existing `confirm` method
# ... (logic from your `Rofi.confirm` method) ...
pass
def ask(self, prompt, *, default=None):
# Maps directly to your existing `ask` method
# ... (logic from your `Rofi.ask` method) ...
pass