feat(root): add application switcher
This commit is contained in:
4 files changed
+55
-7
No files matched your search
@@ -7,6 +7,7 @@ from modules.launcher.main import Launcher
|
||||
from modules.notification.notification import ModusNoti
|
||||
from modules.osd import OSD
|
||||
from modules.panel.main import Panel
|
||||
from modules.switcher import ApplicationSwitcher
|
||||
from utils.functions import set_process_name
|
||||
|
||||
for log in [
|
||||
@@ -26,7 +27,7 @@ if __name__ == "__main__":
|
||||
|
||||
# About().toggle(None)
|
||||
config = load_config()
|
||||
|
||||
switcher = ApplicationSwitcher()
|
||||
panel = Panel()
|
||||
modusnoti = ModusNoti()
|
||||
launcher = Launcher()
|
||||
@@ -36,7 +37,15 @@ if __name__ == "__main__":
|
||||
css_file = monitor_file(get_relative_path("styles"))
|
||||
_ = css_file.connect("changed", lambda *_: set_css())
|
||||
|
||||
app = Application(f"{APP_NAME}", panel, modusnoti, deskwidget, osd, launcher)
|
||||
app = Application(
|
||||
f"{APP_NAME}",
|
||||
panel,
|
||||
modusnoti,
|
||||
deskwidget,
|
||||
osd,
|
||||
launcher,
|
||||
switcher,
|
||||
)
|
||||
|
||||
def set_css():
|
||||
app.set_stylesheet_from_file(
|
||||
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
import json
|
||||
|
||||
import gi
|
||||
from gi.repository import Gdk, Glace
|
||||
|
||||
import config.data as data
|
||||
from fabric.hyprland.widgets import get_hyprland_connection
|
||||
from fabric.widgets.box import Box
|
||||
from fabric.widgets.eventbox import EventBox
|
||||
from fabric.widgets.image import Image
|
||||
from fabric.widgets.label import Label
|
||||
from fabric.widgets.wayland import WaylandWindow as Window
|
||||
from gi.repository import Gdk, Glace
|
||||
|
||||
import config.data as data
|
||||
from utils.functions import is_special_workspace
|
||||
from utils.icon_resolver import IconResolver
|
||||
from utils.occlusion import get_screen_dimensions
|
||||
from utils.functions import is_special_workspace
|
||||
from widgets.wayland import WaylandWindow as Window
|
||||
|
||||
gi.require_version("Glace", "0.1")
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
@import url("./lock.css");
|
||||
@import url("./todo.css");
|
||||
@import url("./launcher.css");
|
||||
@import url("./switcher.css");
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#application-switcher-container {
|
||||
background: var(--shadow);
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
#application-switcher-view {
|
||||
min-height: 120px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#switcher-button {
|
||||
padding: 4px;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#window-button {
|
||||
background-color: var(--surface);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#switcher-button:hover {
|
||||
background-color: var(--surface);
|
||||
}
|
||||
|
||||
#window-button.active {
|
||||
background-color: var(--surface-bright);
|
||||
border: 3px solid var(--surface-bright);
|
||||
}
|
||||
|
||||
#switcher-button label {
|
||||
color: var(--foreground);
|
||||
font-size: 10px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
#window-row {
|
||||
padding: 18px;
|
||||
}
|
||||
Reference in new issue
Block a user