diff --git a/modules/controlcenter/player.py b/modules/controlcenter/player.py index 9c65c42..0a1c6d8 100644 --- a/modules/controlcenter/player.py +++ b/modules/controlcenter/player.py @@ -318,7 +318,9 @@ class Player(Box): f"https://img.youtube.com/vi/{video_id}/hqdefault.jpg" ) logger.debug( - f"Found YouTube thumbnail for {player_name}: {new_thumbnail}" + f"Found YouTube thumbnail for {player_name}: { + new_thumbnail + }" ) # Only update if thumbnail has changed diff --git a/modules/panel/components/recording_indicator.py b/modules/panel/components/recording_indicator.py index 4eb0b86..ab318e3 100644 --- a/modules/panel/components/recording_indicator.py +++ b/modules/panel/components/recording_indicator.py @@ -12,7 +12,7 @@ from gi.repository import GLib class RecordingIndicator(Button): def __init__(self, **kwargs): - super().__init__(name="panel-button", visible=False, **kwargs) + super().__init__(name="panel-button", visible=True, **kwargs) self.script_path = get_relative_path("../../../scripts/screen-capture.sh") self.recording_start_time = None @@ -58,14 +58,20 @@ class RecordingIndicator(Button): return False def is_recorder_running(self): + # add more process names if needed + recorder_processes = ["wf-recorder", "gpu-screen-recorder"] + try: - result = subprocess.run( - ["pgrep", "-x", "wf-recorder", "-x", "gpu-screen-recorder"], - capture_output=True, - text=True, - timeout=1, - ) - return result.returncode == 0 + for proc in recorder_processes: + result = subprocess.run( + ["pgrep", "-x", proc], + capture_output=True, + text=True, + timeout=1, + ) + if result.returncode == 0: + return True # Found a running recorder process + return False # None found running except Exception: return False