huge updates
This commit is contained in:
14 files changed
+553
-612
No files matched your search
@@ -1,8 +1,6 @@
|
||||
from fabric.widgets.centerbox import CenterBox
|
||||
from fabric.widgets.stack import Stack
|
||||
from fabric.widgets.box import Box
|
||||
from fabric.widgets.wayland import WaylandWindow as Window
|
||||
from gi.repository import Gtk
|
||||
from modules.launcher.components import (
|
||||
AppLauncher,
|
||||
BluetoothConnections,
|
||||
@@ -13,6 +11,7 @@ from modules.launcher.components import (
|
||||
TodoManager,
|
||||
WallpaperSelector,
|
||||
WifiManager,
|
||||
Calendar,
|
||||
)
|
||||
|
||||
|
||||
@@ -35,6 +34,7 @@ class Launcher(Window):
|
||||
self.bluetooth = BluetoothConnections()
|
||||
self.sh = Sh(launcher=self)
|
||||
self.wifi = WifiManager()
|
||||
self.calendar = Calendar()
|
||||
|
||||
self.stack = Stack(
|
||||
name="launcher-content",
|
||||
@@ -52,6 +52,7 @@ class Launcher(Window):
|
||||
self.bluetooth,
|
||||
self.sh,
|
||||
self.wifi,
|
||||
self.calendar,
|
||||
],
|
||||
)
|
||||
|
||||
@@ -64,7 +65,6 @@ class Launcher(Window):
|
||||
self.add(self.launcher_box)
|
||||
self.show_all()
|
||||
self.hide()
|
||||
self.wallpapers.viewport.hide()
|
||||
self.add_keybinding("Escape", lambda *_: self.close())
|
||||
|
||||
def close(self):
|
||||
@@ -81,11 +81,8 @@ class Launcher(Window):
|
||||
self.bluetooth,
|
||||
self.sh,
|
||||
self.wifi,
|
||||
self.calendar,
|
||||
]:
|
||||
if widget == self.wallpapers:
|
||||
self.wallpapers.viewport.hide()
|
||||
self.wallpapers.viewport.set_property("name", None)
|
||||
|
||||
if hasattr(widget, "viewport") and widget.viewport:
|
||||
widget.viewport.hide()
|
||||
|
||||
@@ -99,6 +96,7 @@ class Launcher(Window):
|
||||
"bluetooth",
|
||||
"sh",
|
||||
"wifi",
|
||||
"calendar",
|
||||
]:
|
||||
self.stack.remove_style_class(style)
|
||||
|
||||
@@ -118,6 +116,7 @@ class Launcher(Window):
|
||||
"bluetooth": self.bluetooth,
|
||||
"sh": self.sh,
|
||||
"wifi": self.wifi,
|
||||
"calendar": self.calendar,
|
||||
}
|
||||
|
||||
for w in widgets.values():
|
||||
@@ -130,13 +129,6 @@ class Launcher(Window):
|
||||
self.stack.set_visible_child(widgets[widget])
|
||||
widgets[widget].show()
|
||||
|
||||
# if widget != "launcher":
|
||||
# self.launcher.hide()
|
||||
|
||||
if widget != "wallpapers":
|
||||
self.wallpapers.viewport.hide()
|
||||
self.wallpapers.viewport.set_property("name", None)
|
||||
|
||||
if widget == "launcher":
|
||||
self.launcher.open_launcher()
|
||||
self.launcher.search_entry.set_text("")
|
||||
@@ -146,7 +138,6 @@ class Launcher(Window):
|
||||
self.wallpapers.search_entry.set_text("")
|
||||
self.wallpapers.search_entry.grab_focus()
|
||||
self.wallpapers.viewport.show()
|
||||
self.wallpapers.viewport.set_property("name", "wallpaper-icons")
|
||||
|
||||
elif widget == "emoji":
|
||||
self.emoji.open_launcher()
|
||||
|
||||
Reference in new issue
Block a user