added launcher and fixes some error in config.py and in applications.py
This commit is contained in:
30 files changed
+3459
-214
No files matched your search
@@ -10,7 +10,8 @@ from config.data import APP_NAME, APP_NAME_CAP, CONFIG_FILE
|
||||
from modules.corners import Corners
|
||||
from modules.dock.main import Dock
|
||||
from modules.switcher import ApplicationSwitcher
|
||||
from modules.osd import OSD
|
||||
from modules.osd import OSD
|
||||
from modules.launcher import Launcher
|
||||
|
||||
gi.require_version("GLib", "2.0")
|
||||
|
||||
@@ -46,6 +47,7 @@ if __name__ == "__main__":
|
||||
dock = Dock()
|
||||
switcher = ApplicationSwitcher()
|
||||
osd = OSD()
|
||||
launcher = Launcher()
|
||||
# Set corners visibility based on config
|
||||
corners_visible = config.get("corners_visible", True)
|
||||
corners.set_visible(corners_visible)
|
||||
@@ -63,6 +65,7 @@ if __name__ == "__main__":
|
||||
corners,
|
||||
switcher,
|
||||
osd,
|
||||
launcher,
|
||||
) # Make sure corners is added to the app
|
||||
|
||||
def set_css():
|
||||
@@ -74,4 +77,23 @@ if __name__ == "__main__":
|
||||
|
||||
app.set_css()
|
||||
|
||||
# Register launcher actions
|
||||
@Application.action("show-launcher")
|
||||
def show_launcher():
|
||||
"""Show the launcher window."""
|
||||
launcher.show_launcher()
|
||||
|
||||
@Application.action("hide-launcher")
|
||||
def hide_launcher():
|
||||
"""Hide the launcher window."""
|
||||
launcher.hide_launcher()
|
||||
|
||||
@Application.action("toggle-launcher")
|
||||
def toggle_launcher():
|
||||
"""Toggle the launcher window visibility."""
|
||||
if launcher.visible:
|
||||
launcher.hide_launcher()
|
||||
else:
|
||||
launcher.show_launcher()
|
||||
|
||||
app.run()
|
||||
Reference in new issue
Block a user