Added delete of command; added initial special key handling in commands
This commit is contained in:
@@ -6,6 +6,8 @@ import threading
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
from libs.logger import Logger
|
||||
|
||||
from libs.pyautogui_control import ControlMixin
|
||||
from libs.endpoint_registry import EndpointRegistry
|
||||
from libs.event_system import EventSystem
|
||||
@@ -73,24 +75,25 @@ builtins.debug = False
|
||||
builtins.app_settings = None
|
||||
builtins.get_clipboard = ['xclip','-selection', 'clipboard', '-o']
|
||||
builtins.set_clipboard = ['xclip','-selection','clipboard']
|
||||
builtins.endpoint_registry = EndpointRegistry()
|
||||
builtins.event_system = EventSystem()
|
||||
builtins.typwriter = Pyautogui_Controller()
|
||||
builtins.FKEYS = [ f"F{i}" for i in range(1, 13) ]
|
||||
builtins.LSIDE_KEYS = ["<Ctrl>", "<Shift>", "<Alt>"]
|
||||
builtins.RSIDE_KEYS = ["</Ctrl>", "</Shift>", "</Alt>"]
|
||||
|
||||
|
||||
|
||||
_USER_HOME = os.path.expanduser('~')
|
||||
_USR_PATH = f"/usr/share/{app_name.lower()}"
|
||||
_CONFIG_PATH = f"{_USER_HOME}/.config/{app_name.lower()}"
|
||||
_ICON_FILE = f"{_CONFIG_PATH}/icons/{app_name.lower()}.png"
|
||||
_CSS_FILE = f"{_CONFIG_PATH}/stylesheet.css"
|
||||
_EMOJI_FILE = f"{_CONFIG_PATH}/emoji.json"
|
||||
_USER_HOME = os.path.expanduser('~')
|
||||
_USR_PATH = f"/usr/share/{app_name.lower()}"
|
||||
_CONFIG_PATH = f"{_USER_HOME}/.config/{app_name.lower()}"
|
||||
_ICON_FILE = f"{_CONFIG_PATH}/icons/{app_name.lower()}.png"
|
||||
_CSS_FILE = f"{_CONFIG_PATH}/stylesheet.css"
|
||||
_EMOJI_FILE = f"{_CONFIG_PATH}/emoji.json"
|
||||
_LOG_FILE = f"{_CONFIG_PATH}/application.log"
|
||||
ch_log_lvl: int = 10
|
||||
fh_log_lvl: int = 20
|
||||
|
||||
|
||||
if not os.path.exists(_ICON_FILE):
|
||||
_ICON_FILE = f"{_USR_PATH}/icons/{app_name.lower()}.png"
|
||||
if not os.path.exists(_ICON_FILE):
|
||||
print(_ICON_FILE)
|
||||
raise MissingConfigError("Unable to find the application icon.")
|
||||
|
||||
if not os.path.exists(_CSS_FILE):
|
||||
@@ -104,8 +107,13 @@ if not os.path.exists(_EMOJI_FILE):
|
||||
raise MissingConfigError("Unable to find the stylesheet.")
|
||||
|
||||
|
||||
|
||||
builtins.CONFIG_PATH = _CONFIG_PATH
|
||||
builtins.ICON_FILE = _ICON_FILE
|
||||
builtins.CSS_FILE = _CSS_FILE
|
||||
builtins.EMOJI_FILE = _EMOJI_FILE
|
||||
|
||||
|
||||
builtins.logger = Logger(_LOG_FILE, ch_log_lvl, fh_log_lvl).get_logger()
|
||||
builtins.endpoint_registry = EndpointRegistry()
|
||||
builtins.event_system = EventSystem()
|
||||
builtins.typwriter = Pyautogui_Controller()
|
||||
Reference in New Issue
Block a user