make a function private to a plugin

This commit is contained in:
fdev31 2023-04-27 23:54:10 +02:00
parent 99491dca80
commit ec09db0248
2 changed files with 6 additions and 7 deletions

View file

@ -51,9 +51,3 @@ async def get_focused_monitor_props():
assert isinstance(monitor, dict) assert isinstance(monitor, dict)
if monitor.get("focused") == True: if monitor.get("focused") == True:
return monitor return monitor
async def get_client_props_by_pid(pid: int):
for client in await hyprctlJSON("clients"):
if client.get("pid") == pid:
return client

View file

@ -4,7 +4,6 @@ from ..ipc import (
hyprctl, hyprctl,
hyprctlJSON, hyprctlJSON,
get_focused_monitor_props, get_focused_monitor_props,
get_client_props_by_pid,
) )
import os import os
@ -13,6 +12,12 @@ from .interface import Plugin
DEFAULT_MARGIN = 60 DEFAULT_MARGIN = 60
async def get_client_props_by_pid(pid: int):
for client in await hyprctlJSON("clients"):
if client.get("pid") == pid:
return client
class Scratch: class Scratch:
def __init__(self, uid, opts): def __init__(self, uid, opts):
self.uid = uid self.uid = uid