sorted imports
This commit is contained in:
parent
895e24b368
commit
2eafea9862
12 changed files with 27 additions and 32 deletions
|
@ -1,16 +1,15 @@
|
|||
#!/bin/env python
|
||||
" Pyprland - an Hyprland companion app "
|
||||
import asyncio
|
||||
from typing import cast
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
import importlib
|
||||
import itertools
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from typing import cast
|
||||
|
||||
|
||||
from .ipc import get_event_stream, init as ipc_init
|
||||
from .common import init_logger, get_logger, PyprError
|
||||
from .common import PyprError, get_logger, init_logger
|
||||
from .ipc import get_event_stream
|
||||
from .ipc import init as ipc_init
|
||||
from .plugins.interface import Plugin
|
||||
|
||||
CONTROL = f'/tmp/hypr/{ os.environ["HYPRLAND_INSTANCE_SIGNATURE"] }/.pyprland.sock'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
""" Shared utilities: logging """
|
||||
import os
|
||||
import logging
|
||||
import os
|
||||
|
||||
__all__ = ["DEBUG", "get_logger", "init_logger"]
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/bin/env python
|
||||
""" Interact with hyprland using sockets """
|
||||
import asyncio
|
||||
from logging import Logger
|
||||
from typing import Any
|
||||
import json
|
||||
import os
|
||||
from logging import Logger
|
||||
from typing import Any
|
||||
|
||||
from .common import get_logger, PyprError
|
||||
from .common import PyprError, get_logger
|
||||
|
||||
log: Logger | None = None
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
toggle_minimized allows having an "expose" like selection of minimized windows
|
||||
"""
|
||||
from typing import Any, cast
|
||||
from .interface import Plugin
|
||||
|
||||
from ..ipc import hyprctlJSON, hyprctl
|
||||
from ..ipc import hyprctl, hyprctlJSON
|
||||
from .interface import Plugin
|
||||
|
||||
|
||||
class Extension(Plugin): # pylint: disable=missing-class-docstring
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
" Common plugin interface "
|
||||
from typing import Any
|
||||
|
||||
from ..common import get_logger
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
" Moves unreachable client windows to the currently focused workspace"
|
||||
from typing import Any, cast
|
||||
from .interface import Plugin
|
||||
|
||||
from ..ipc import hyprctlJSON, hyprctl
|
||||
from ..ipc import hyprctl, hyprctlJSON
|
||||
from .interface import Plugin
|
||||
|
||||
|
||||
def contains(monitor, window):
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
" Toggles workspace zooming "
|
||||
from .interface import Plugin
|
||||
|
||||
from ..ipc import hyprctl
|
||||
from .interface import Plugin
|
||||
|
||||
|
||||
class Extension(Plugin): # pylint: disable=missing-class-docstring
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
" The monitors plugin "
|
||||
import subprocess
|
||||
from typing import Any, cast
|
||||
from .interface import Plugin
|
||||
|
||||
from ..ipc import hyprctlJSON
|
||||
from .interface import Plugin
|
||||
|
||||
|
||||
def configure_monitors(monitors, screenid: str, pos_x: int, pos_y: int) -> None:
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
" Scratchpads addon "
|
||||
import os
|
||||
import asyncio
|
||||
import os
|
||||
import subprocess
|
||||
from typing import Any, cast
|
||||
|
||||
from ..ipc import (
|
||||
hyprctl,
|
||||
hyprctlJSON,
|
||||
get_focused_monitor_props,
|
||||
)
|
||||
|
||||
from ..ipc import get_focused_monitor_props, hyprctl, hyprctlJSON
|
||||
from .interface import Plugin
|
||||
|
||||
DEFAULT_MARGIN = 60
|
||||
|
@ -230,6 +225,7 @@ class Extension(Plugin): # pylint: disable=missing-class-docstring
|
|||
if not class_lookup_hack:
|
||||
return False
|
||||
self.log.debug("Lookup hack triggered")
|
||||
# hack to update the client info from the provided class
|
||||
for client in await hyprctlJSON("clients"):
|
||||
assert isinstance(client, dict)
|
||||
for pending_scratch in class_lookup_hack:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
" shift workspaces across monitors "
|
||||
from typing import cast
|
||||
from .interface import Plugin
|
||||
|
||||
from ..ipc import hyprctlJSON, hyprctl
|
||||
from ..ipc import hyprctl, hyprctlJSON
|
||||
from .interface import Plugin
|
||||
|
||||
|
||||
class Extension(Plugin): # pylint: disable=missing-class-docstring
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
" Toggle monitors on or off "
|
||||
from typing import Any, cast
|
||||
from .interface import Plugin
|
||||
|
||||
from ..ipc import hyprctlJSON, hyprctl
|
||||
from ..ipc import hyprctl, hyprctlJSON
|
||||
from .interface import Plugin
|
||||
|
||||
|
||||
class Extension(Plugin): # pylint: disable=missing-class-docstring
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
""" Force workspaces to follow the focus / mouse """
|
||||
from typing import cast
|
||||
from .interface import Plugin
|
||||
|
||||
from ..ipc import hyprctlJSON, hyprctl
|
||||
from ..ipc import hyprctl, hyprctlJSON
|
||||
from .interface import Plugin
|
||||
|
||||
|
||||
class Extension(Plugin): # pylint: disable=missing-class-docstring
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue