diff --git a/pyprland/command.py b/pyprland/command.py index aa6df13..ad20d9f 100755 --- a/pyprland/command.py +++ b/pyprland/command.py @@ -33,7 +33,7 @@ class Pyprland: if name not in self.plugins: modname = name if "." in name else f"pyprland.plugins.{name}" try: - plug = importlib.import_module(modname).Exported(name) + plug = importlib.import_module(modname).Extension(name) await plug.init() self.plugins[name] = plug except Exception as e: diff --git a/pyprland/plugins/experimental.py b/pyprland/plugins/experimental.py index c0f09ad..02d6f39 100644 --- a/pyprland/plugins/experimental.py +++ b/pyprland/plugins/experimental.py @@ -1,10 +1,7 @@ from .interface import Plugin -from ..ipc import hyprctlJSON, hyprctl, get_workspaces +from ..ipc import hyprctlJSON, hyprctl -class Experimental(Plugin): +class Extension(Plugin): pass - - -Exported = Experimental diff --git a/pyprland/plugins/monitors.py b/pyprland/plugins/monitors.py index 6300e17..f8e0918 100644 --- a/pyprland/plugins/monitors.py +++ b/pyprland/plugins/monitors.py @@ -5,7 +5,7 @@ import subprocess from ..ipc import hyprctlJSON -class MonitorLayout(Plugin): +class Extension(Plugin): async def event_monitoradded(self, screenid): screenid = screenid.strip() @@ -43,6 +43,3 @@ class MonitorLayout(Plugin): subprocess.call( ["wlr-randr", "--output", screenid, "--pos", f"{x},{y}"] ) - - -Exported = MonitorLayout diff --git a/pyprland/plugins/scratchpads.py b/pyprland/plugins/scratchpads.py index 72ab8f0..2edb10b 100644 --- a/pyprland/plugins/scratchpads.py +++ b/pyprland/plugins/scratchpads.py @@ -48,7 +48,7 @@ class Scratch: self.clientInfo.update(clientInfo) -class ScratchpadManager(Plugin): +class Extension(Plugin): async def init(self): self.procs: dict[str, subprocess.Popen] = {} self.scratches: dict[str, Scratch] = {} @@ -288,6 +288,3 @@ class ScratchpadManager(Plugin): await hyprctl(f"focuswindow {pid}") await asyncio.sleep(0.2) # ensure some time for events to propagate self.transitioning_scratches.discard(uid) - - -Exported = ScratchpadManager diff --git a/pyprland/plugins/workspaces_follow_focus.py b/pyprland/plugins/workspaces_follow_focus.py index 86a0677..69deebd 100644 --- a/pyprland/plugins/workspaces_follow_focus.py +++ b/pyprland/plugins/workspaces_follow_focus.py @@ -54,6 +54,3 @@ class Extension(Plugin): ] await hyprctl(f"moveworkspacetomonitor {next_workspace},{monitor['name']}") await hyprctl(f"workspace {next_workspace}") - - -Exported = Extension