fix: instantly spawn bar
This commit is contained in:
@@ -22,6 +22,7 @@ pkgs.mkShell {
|
||||
gobject-introspection
|
||||
libdbusmenu-gtk3
|
||||
gdk-pixbuf
|
||||
librsvg
|
||||
gnome-bluetooth
|
||||
cinnamon-desktop
|
||||
wayland-scanner
|
||||
@@ -46,4 +47,8 @@ pkgs.mkShell {
|
||||
]
|
||||
))
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
|
||||
'';
|
||||
}
|
||||
|
||||
10
sims/main.py
10
sims/main.py
@@ -31,7 +31,7 @@ from .services.screenrec import ScreenrecService
|
||||
|
||||
|
||||
tray = SystemTray(name="system-tray", spacing=4)
|
||||
i3 = get_i3_connection()
|
||||
get_i3_connection()
|
||||
|
||||
dummy = Window(visible=False)
|
||||
finder = FuzzyWindowFinder()
|
||||
@@ -147,15 +147,9 @@ def spawn_bars():
|
||||
if i == 0 and bar.notmuch:
|
||||
notmuch_widget = bar.notmuch
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def main():
|
||||
if i3.ready:
|
||||
spawn_bars()
|
||||
else:
|
||||
i3.connect("notify::ready", lambda *_: spawn_bars())
|
||||
|
||||
spawn_bars()
|
||||
app.run()
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ class Battery(Box):
|
||||
level = max(10, min(100, round(bat / 10) * 10))
|
||||
|
||||
if charging:
|
||||
return f"battery-level-{level}-charging-symbolic"
|
||||
# Adwaita ships battery-level-100-charged-symbolic, not -charging.
|
||||
suffix = "charged" if level == 100 else "charging"
|
||||
return f"battery-level-{level}-{suffix}-symbolic"
|
||||
else:
|
||||
return f"battery-level-{level}-symbolic"
|
||||
|
||||
|
||||
@@ -167,12 +167,12 @@ class NotmuchWidget(Button):
|
||||
if count > 0:
|
||||
self.label.set_text(str(count))
|
||||
self.label.set_visible(True)
|
||||
self.icon.set_from_icon_name("mail-unread-symbolic", 16)
|
||||
self.icon.set_property("icon-name", "mail-unread-symbolic")
|
||||
self.set_style_classes(["notmuch-widget", "has-unread"])
|
||||
else:
|
||||
self.label.set_text("")
|
||||
self.label.set_visible(False)
|
||||
self.icon.set_from_icon_name("mail-read-symbolic", 16)
|
||||
self.icon.set_property("icon-name", "mail-read-symbolic")
|
||||
self.set_style_classes(["notmuch-widget", "no-unread"])
|
||||
|
||||
logger.info(f"[Notmuch] Updated display: {count} unread emails")
|
||||
@@ -111,7 +111,8 @@ class FensterWorkspaces(Box):
|
||||
)
|
||||
|
||||
if self._i3.ready:
|
||||
self._schedule_refresh()
|
||||
# Initial state is already current — no need to defer.
|
||||
self._refresh_workspaces()
|
||||
else:
|
||||
self._i3.connect("notify::ready", lambda *_: self._schedule_refresh())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user