These Nerdfonts codepoints were removed in [3.0.0](https://www.nerdfonts.com/releases#v3.0.0):
> **Breaking 2: Material Design Icons Codepoints**
>
> The old Material Design Icon codepoints are finally dropped. Due to an historic mistake we placed them in between some asiatic glyphs, breaking that script. Since v2.3.0 the (updated and expanded) Material Design Icons have new codepoints in the 5 digit region.
>
> - Dropped codepoints `F500`… and class names `nf-mdi-*`
> - New codepoints `F0001`… and class names `nf-md-*`
> - The whole discussions are here: https://github.com/ryanoasis/nerd-fonts/issues/365
> - A translation table is available here: https://github.com/ryanoasis/nerd-fonts/issues/1059#issuecomment-1404891287
> - There are tools out there that probably can update your configuration.
For the majority of the removed symbols, it was as easy as finding the
replacement with the exact same name. For example, `f76b` (`nf-mdi-format_header_2`)
became `f026c` (`nf-md-format_header_2`).
There was one symbol that was completely removed (it was removed from
Material Design): `f5fc` (`nf-mdi-camcorder_box`). I have substituted it
with `f03d` (`nf-fa-video_camera`) which is not Material Design, but the
closest icon I could find.
Here's some example output from [nerdfix](https://github.com/loichyan/nerdfix)
```
╭─(ignormies)(~/g/fork-waybar) removed-nerdfonts-codepoints
╰──▪ nix-shell -p nerdfix --run "nerdfix check resources/config.jsonc"
INFO Check input from 'resources/config.jsonc'
☞ Found obsolete icon U+F76B
╭─[resources/config.jsonc:131:27]
130 │ "format": "{temperatureC}°C {icon}",
131 │ "format-icons": ["", "", ""]
· ┬
· ╰── Icon 'mdi-format_header_2' is marked as obsolete
132 │ },
╰────
help: You could replace it with:
1. U+F026C md-format_header_2
2. U+F026B md-format_header_1
3. U+F026D md-format_header_3
4. U+F026E md-format_header_4
☞ Found obsolete icon U+F769
╭─[resources/config.jsonc:131:41]
130 │ "format": "{temperatureC}°C {icon}",
131 │ "format-icons": ["", "", ""]
· ┬
· ╰── Icon 'mdi-format_float_right' is marked as obsolete
132 │ },
╰────
help: You could replace it with:
1. U+F026A md-format_float_right
2. U+F0268 md-format_float_left
3. U+F0269 md-format_float_none
4. U+F0263 md-format_align_right
☞ Found obsolete icon U+F5E7
╭─[resources/config.jsonc:146:41]
145 │ "format-full": "{capacity}% {icon}",
146 │ "format-charging": "{capacity}% ",
· ┬
· ╰── Icon 'mdi-cached' is marked as obsolete
147 │ "format-plugged": "{capacity}% ",
╰────
help: You could replace it with:
1. U+F00E8 md-cached
☞ Found obsolete icon U+F796
╭─[resources/config.jsonc:170:45]
169 │ "format-wifi": "{essid} ({signalStrength}%) ",
170 │ "format-ethernet": "{ipaddr}/{cidr} ",
· ┬
· ╰── Icon 'mdi-gamepad_variant' is marked as obsolete
171 │ "tooltip-format": "{ifname} via {gwaddr} ",
╰────
help: You could replace it with:
1. U+F0297 md-gamepad_variant
2. U+F0EB7 md-gamepad_variant_outline
3. U+F0462 md-road_variant
4. U+F025C md-food_variant
☞ Found obsolete icon U+F796
╭─[resources/config.jsonc:171:50]
170 │ "format-ethernet": "{ipaddr}/{cidr} ",
171 │ "tooltip-format": "{ifname} via {gwaddr} ",
· ┬
· ╰── Icon 'mdi-gamepad_variant' is marked as obsolete
172 │ "format-linked": "{ifname} (No IP) ",
╰────
help: You could replace it with:
1. U+F0297 md-gamepad_variant
2. U+F0EB7 md-gamepad_variant_outline
3. U+F0462 md-road_variant
4. U+F025C md-food_variant
☞ Found obsolete icon U+F796
╭─[resources/config.jsonc:172:44]
171 │ "tooltip-format": "{ifname} via {gwaddr} ",
172 │ "format-linked": "{ifname} (No IP) ",
· ┬
· ╰── Icon 'mdi-gamepad_variant' is marked as obsolete
173 │ "format-disconnected": "Disconnected ⚠",
╰────
help: You could replace it with:
1. U+F0297 md-gamepad_variant
2. U+F0EB7 md-gamepad_variant_outline
3. U+F0462 md-road_variant
4. U+F025C md-food_variant
☞ Found obsolete icon U+F6A9
╭─[resources/config.jsonc:180:36]
179 │ "format-bluetooth": "{volume}% {icon} {format_source}",
180 │ "format-bluetooth-muted": " {icon} {format_source}",
· ┬
· ╰── Icon 'mdi-cup' is marked as obsolete
181 │ "format-muted": " {format_source}",
╰────
help: You could replace it with:
1. U+F01AA md-cup
☞ Found obsolete icon U+F6A9
╭─[resources/config.jsonc:181:26]
180 │ "format-bluetooth-muted": " {icon} {format_source}",
181 │ "format-muted": " {format_source}",
· ┬
· ╰── Icon 'mdi-cup' is marked as obsolete
182 │ "format-source": "{volume}% ",
╰────
help: You could replace it with:
1. U+F01AA md-cup
☞ Found obsolete icon U+F590
╭─[resources/config.jsonc:186:28]
185 │ "headphone": "",
186 │ "hands-free": "",
· ┬
· ╰── Icon 'mdi-battery_unknown' is marked as obsolete
187 │ "headset": "",
╰────
help: You could replace it with:
1. U+F0091 md-battery_unknown
2. U+F094A md-battery_unknown_bluetooth
3. U+F17DE md-battery_arrow_down
4. U+F0750 md-microsoft_xbox_controller_battery_unknown
☞ Found obsolete icon U+F590
╭─[resources/config.jsonc:187:25]
186 │ "hands-free": "",
187 │ "headset": "",
· ┬
· ╰── Icon 'mdi-battery_unknown' is marked as obsolete
188 │ "phone": "",
╰────
help: You could replace it with:
1. U+F0091 md-battery_unknown
2. U+F094A md-battery_unknown_bluetooth
3. U+F17DE md-battery_arrow_down
4. U+F0750 md-microsoft_xbox_controller_battery_unknown
```
The window module registers itself with the Hyprland IPC singleton at
the start of its constructor, before calling update(). If update()
throws an exception (e.g. from an invalid format string), the object is
destroyed without the destructor running, leaving a dangling pointer in
the IPC callback list. When the IPC thread receives an event, it
attempts to call onEvent() on this invalid memory, causing a crash.
Moving the update() call before IPC registration ensures that any
initialization errors occur before the pointer is shared. If the
configuration is invalid, the module fails to construct and is
gracefully disabled by the factory without leaving a "landmine" in the
background IPC thread.
Fixes: #4923
Signed-off-by: Emir Baha Yıldırım <jayshozie@gmail.com>
Some tray items re-register the same bus name and object path during normal
operation. Treat that path as an idempotent registration instead of logging a
warning, while still completing the DBus method successfully.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Load attention and overlay pixmaps from item properties, watch the
corresponding update signals, and prefer attention artwork while an item is in
NeedsAttention state.
When an item only exports an attention movie asset, fall back to loading that
asset as a static pixbuf so the tray still shows the alert state.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Return the host registration method correctly on duplicate host registration
and emit HostUnregistered instead of HostRegistered when the last host
vanishes.
Also free the corresponding name watch once the tracked host/item disappears so
the watcher does not leak stale watch records.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Only add tray widgets after the SNI proxy has finished initializing and the
item has a valid id/category pair.
This also removes invalid items through the host teardown path, refreshes the
tray when item status changes, and avoids calling DBus methods through a null
proxy during early clicks or scroll events.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
The language and submap modules assumed their Hyprland payload delimiters were
always present. When that assumption is violated, the old code could perform
invalid iterator math or throw while slicing the event string.
Validate the expected separators up front and bail out with a warning when the
event is malformed so the modules degrade safely instead of crashing the update
path.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Hyprland workspace reloads could stack duplicate scroll-event connections,
causing a single wheel gesture to switch multiple workspaces after repeated
config reloads. The persistent-workspaces monitor-array form also created the
monitor name instead of the configured workspace name.
Disconnect and replace the scroll handler on reinit, fix the persistent
workspace name selection, normalize urgent-window address matching, and reject
malformed workspace payloads before they corrupt the local state machine.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
The window module re-entered the same shared_mutex while refreshing IPC state:
update() took the lock and then called queryActiveWorkspace(), which tried to
lock it again. That is undefined behavior for std::shared_mutex and could
manifest as a deadlock.
Remove the recursive lock path and reset the derived window state before each
IPC refresh. That keeps solo/floating/swallowing/fullscreen classes from
sticking around when the client lookup fails or a workspace becomes empty.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
The Hyprland IPC helper cached the socket folder with the first instance
signature already appended, so later calls ignored their instanceSig argument
and always reused the first path. That made the helper violate its own API even
though most real Waybar sessions only talk to a single Hyprland instance.
Cache only the base socket directory and append the requested signature per
lookup. This fixes correctness for tests, nested or debug multi-instance
setups, and future code that needs to resolve a different signature, without
claiming support for one Waybar process managing multiple Hyprland sessions.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
The popup menu was retrieved from GtkBuilder and stored in menu_, but the builder was unref'd immediately after construction. That left the later popup path operating on a builder-owned GtkMenu whose lifetime was no longer guaranteed, which matches the GTK_IS_WIDGET and GTK_IS_MENU assertions from the regression report.
Take an owned reference to the built menu and release it in AModule teardown so popup menus stay valid without extending the lifetime of the whole builder.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Waybar SEGVs in Glib::DispatchNotifier::pipe_io_handler when the MPRIS
module is enabled. The crash is intermittent because it requires a race
between signal emission and object destruction: a playerctl GLib signal
callback (e.g. onPlayerPlay) calls dp.emit(), which writes a pointer to
the Dispatcher into an internal pipe. If the Mpris object is destroyed
before the GLib main loop reads that pipe entry, pipe_io_handler
dereferences a dangling pointer. This typically occurs when a media
player appears or vanishes on D-Bus (browser closing, player quitting)
or during waybar shutdown/config reload.
The root cause is that ~Mpris() calls g_object_unref() on the manager
and player GObjects without first disconnecting the signal handlers that
hold raw `this` pointers. If playerctl holds additional references to
these GObjects, they survive the unref and can still fire signals
targeting the already-destroyed Mpris instance.
Adopt the same cleanup pattern used by the Wireplumber module: call
g_signal_handlers_disconnect_by_data() to sever all signal connections
referencing `this` before releasing the GObjects with g_clear_object().
This guarantees no callbacks can enqueue stale Dispatcher notifications
after teardown begins.
Additionally:
- Clean up old player in onPlayerNameAppeared before replacing it,
fixing a GObject leak and accumulation of dangling signal connections
- Remove duplicate onPlayerStop signal registration (copy-paste bug)
This commit addresses memory churn caused by implicit deep copies during traversal and allocation of complex structures:
- Replaced pass-by-value 'Json::Value' in std::ranges and range-based for loops with 'const auto&' or 'const Json::Value&' in Hyprland modules, preventing large JSON tree duplications on every update.
- Fixed implicit string and pair copies in UPower and CPU Frequency loops by converting 'auto' to 'const auto&' where possible.
- Added 'std::vector::reserve' calls before 'push_back' loops in MPRIS, Niri, and CFFI modules to prevent exponential vector reallocation during initialization.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Valgrind Massif profiling revealed that invoking Gtk::IconTheme::rescan_if_needed() inside SNI updateImage() and getIconByName() loops caused considerable memory churn and potential filesystem stat overhead whenever a system tray app pushed a metadata update.
This commit removes the rescan polling from the SNI proxy callback pipeline and the DefaultGtkIconThemeWrapper, restricting icon theme caching to load boundaries.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>