Commit Graph

903 Commits

Author SHA1 Message Date
0405c00602 Merge branch 'master' of https://github.com/Alexays/Waybar
Some checks failed
clang-format / lint (push) Has been cancelled
freebsd / build (push) Has been cancelled
linux / build (c++20, alpine) (push) Has been cancelled
linux / build (c++20, archlinux) (push) Has been cancelled
linux / build (c++20, debian) (push) Has been cancelled
linux / build (c++20, fedora) (push) Has been cancelled
linux / build (c++20, gentoo) (push) Has been cancelled
linux / build (c++20, opensuse) (push) Has been cancelled
Nix-Tests / nix-flake-check (push) Has been cancelled
2026-04-01 14:57:33 -07:00
Stefan Gründel
c0c1a4223a Fix network bandwidth rate calculation for early updates 2026-03-21 13:17:06 +01:00
ignormies
a05c7bc28f chore: Stop using deprecated/removed Nerdfonts codepoints
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
```
2026-03-19 17:39:57 -07:00
Carlo Teubner
3b1262061d systemd-failed-units: tooltip w/ failed units list 2026-03-17 21:35:20 +00:00
Carlo Teubner
d046c19b85 systemd-failed-units: small tweaks
- Remove unneeded destructor impl
- Rename member variables for consistench with other files
- manpage wording fixes
- updateData(): small logic tweak
2026-03-17 21:34:59 +00:00
Alexis Rouillard
100349a5c7 Merge pull request #4910 from khaneliman/hyprland
fix(hyprland): misc hardening with ipc socket and events
2026-03-08 22:21:40 +01:00
Austin Horstman
f6d92fd708 fix(sni): render attention and overlay tray icon assets
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>
2026-03-08 01:42:31 -06:00
Austin Horstman
2a748f1a56 fix(sni): delay tray item insertion until proxies are ready
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>
2026-03-08 01:20:15 -06:00
Austin Horstman
dd47a2b826 fix(hyprland/workspaces): stabilize reload and event handling
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>
2026-03-07 21:06:30 -06:00
Austin Horstman
b1a87f943c fix(hyprland/window): avoid stale state during IPC refresh
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>
2026-03-07 21:06:30 -06:00
Austin Horstman
790101f824 chore: format
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-06 18:49:02 -06:00
Alexis Rouillard
22b2aff374 Merge pull request #4900 from AlisonB319/ab319/fix-hover-2
fix: sync tooltip updates without resetting hover state
2026-03-04 22:42:16 +01:00
Alexis Rouillard
100d4ec4a4 Merge pull request #4891 from khaneliman/bugfix/stab-003-test-001-hyprland-ipc
fix(hyprland-ipc): harden fd lifecycle and listener loop
2026-03-04 22:41:30 +01:00
Alison
3eb2c7e8f4 sync tooltip updates without resetting hover state 2026-03-03 00:24:04 -08:00
Austin Horstman
4c71b2bf9f perf(memory): optimize C++ string operations to reduce heap fragmentation
- Replaced pass-by-value std::string parameters with const std::string&
or std::string_view to prevent SSO overallocations.

- Refactored static mapping functions in UPower to return
std::string_view instead of constructing std::string literals, enabling
perfect cache locality.

- Optimized string concatenation in hot loops (network IPs, inhibitor
lists, sway window marks) by using std::string::append() and
pre-reserving capacity instead of overloaded operator+ which produces
temporary heap instances.

These optimizations reduce high-frequency memory churn and overall heap
fragmentation within the main rendering loops.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 22:54:07 -06:00
Austin Horstman
8d22d3e07a refactor(sway): use shared ScopedFd for IPC sockets
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 08:23:06 -06:00
Austin Horstman
39e09118f9 refactor(wayfire): replace custom Sock with shared ScopedFd
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 08:21:20 -06:00
Austin Horstman
d0363313b8 fix(hyprland-ipc): harden fd lifecycle and listener loop
Hyprland IPC had fd lifecycle risks on failure/shutdown paths and used a
spin-sleep listener model.

I initialized fd state defensively, tightened connect/close/shutdown handling,
moved to blocking read with newline framing, and added RAII-style fd cleanup in
socket1 reply paths.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 08:09:44 -06:00
267c327db9 Merge upstream/master
Some checks failed
clang-format / lint (push) Has been cancelled
freebsd / build (push) Has been cancelled
linux / build (c++20, alpine) (push) Has been cancelled
linux / build (c++20, archlinux) (push) Has been cancelled
linux / build (c++20, debian) (push) Has been cancelled
linux / build (c++20, fedora) (push) Has been cancelled
linux / build (c++20, gentoo) (push) Has been cancelled
linux / build (c++20, opensuse) (push) Has been cancelled
Nix-Tests / nix-flake-check (push) Has been cancelled
2026-02-27 08:36:07 -08:00
Alex
ef3d55980e fix: some crashes 2026-02-24 00:49:08 +01:00
Alex
e18939210b fix: lint 2026-02-24 00:00:57 +01:00
Alexis Rouillard
64ecdcfa87 Merge pull request #4846 from BlueManCZ/fix-mpris-fallback-player
fix(mpris): fall back to next non-ignored player and prefer playing players
2026-02-23 23:51:04 +01:00
Austin Horstman
ae60ca6233 refactor(niri): declared constructor
Move constructor from hpp to cpp to align with other modules

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-20 08:16:56 -06:00
4d2fb11a05 Merge tag '0.15.0' of https://github.com/Alexays/Waybar
Some checks failed
clang-format / lint (push) Has been cancelled
freebsd / build (push) Has been cancelled
linux / build (c++20, alpine) (push) Has been cancelled
linux / build (c++20, archlinux) (push) Has been cancelled
linux / build (c++20, debian) (push) Has been cancelled
linux / build (c++20, fedora) (push) Has been cancelled
linux / build (c++20, gentoo) (push) Has been cancelled
linux / build (c++20, opensuse) (push) Has been cancelled
Nix-Tests / nix-flake-check (push) Has been cancelled
2026-02-19 20:54:36 -08:00
Alexis Rouillard
e4e47cad5c Merge pull request #3088 from VAWVAW/hyprland-bar-scroll
hyprland/workspaces: Add `enable-bar-scroll` option
2026-02-13 23:43:12 +01:00
Alexis Rouillard
01628dda85 Merge pull request #4852 from tobixen/fix/keyboard-state-hotplug-crash
fix(keyboard-state): fix segfault on device hotplug removal
2026-02-13 23:27:05 +01:00
vawvaw
5b595a4dfe hyprland/workspaces: Add enable-bar-scroll option 2026-02-13 20:48:59 +01:00
Sami Liedes
a70651ed05 fix: use SafeSignal in ipc 2026-02-12 18:11:30 +01:00
Tobias Brox
13469a8847 fix(keyboard-state): fix segfault on device hotplug
The keyboard-state module crashes with SIGSEGV in libinput_device_ref
when a new input device appears in /dev/input/.

Three bugs fixed:

1. Missing NULL check: tryAddDevice() calls libinput_path_add_device()
   which returns NULL on failure, then immediately passes the result to
   libinput_device_ref() without checking.  On laptops, virtual input
   devices (power buttons, lid switch, etc.) appear and disappear in
   /dev/input/ triggering the hotplug handler; if libinput can't open
   one of these, the NULL return causes the segfault.

2. Missing cleanup on device removal: The IN_DELETE handler erased
   devices from the map without calling libinput_path_remove_device(),
   leaving dangling pointers in the libinput context.

3. Thread safety: libinput_devices_ was accessed from 3 threads
   (main/GTK, libinput_thread_, hotplug_thread_) without any mutex.

Fixes #4851

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:57:23 +01:00
BlueManCZ
a871d90161 Fix button action handling to consistently use the active player 2026-02-11 12:09:20 +01:00
Hannes Braun
f373ebfcbb Fix include of poll.h 2026-02-08 13:32:41 +01:00
copilot-swe-agent[bot]
330c77c87a Fix thread safety in Hyprland modules to prevent corrupted double-linked list crash
- Move GTK operations from IPC thread to GTK main thread in Window module
- Move GTK operations from IPC thread to GTK main thread in WindowCount module
- Move GTK style class operations from IPC thread to GTK main thread in Submap module
- Language and Workspaces modules already safe (only update internal state)

Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
2026-02-04 08:54:36 +00:00
Alex
47fb21a2c1 chore: upgrade to clang-format@21 2026-02-04 09:24:14 +01:00
Xavier Ruiz
e3186abdce fix(cava): handle all output methods in frontend
Default to raw Cava module for non-GLSL output methods.
Fixes "Unknown module" error when no cava_config is specified.
2025-12-27 14:52:28 -05:00
Alexis Rouillard
c3d29b1185 Merge branch 'master' into battery-plugging-instant-updates 2025-12-18 19:04:31 +01:00
Alexis Rouillard
11c4e55376 Merge pull request #4591 from rrrnld/fix/multiple-batteries
Improve multiple battery support
2025-12-18 19:02:31 +01:00
Viktar Lukashonak
e03119fe94 Factory. cava_frontend 2025-12-09 18:13:45 +03:00
Viktar Lukashonak
3773021546 cavaGLSL 2025-12-07 23:08:55 +03:00
Viktar Lukashonak
52f4db1154 Moving GTK dispatcher into frontend 2025-12-05 10:04:52 +03:00
Viktar Lukashonak
13519ca5bf cava. nonsafe thread.= & cava bump 2025-11-26 13:26:32 +03:00
schmop
ce1da5a178 Make udev_deleter not linux-only and fix freebsd build 2025-11-01 10:57:18 +01:00
schmop
4e25871655 Reapply "Make battery module update on plugging/unplugging again (refs #2519)"
This reverts commit bb2c67ebad.
2025-10-31 13:43:36 +01:00
arne
ca62481dc9 fix: default weighted average to true 2025-10-26 06:44:53 +01:00
Viktar Lukashonak
966da11f3b cava bump & fixing memory leaks 2025-10-12 14:53:49 +03:00
cb6bc2f261 Fix some bugs
Some checks failed
clang-format / lint (push) Has been cancelled
freebsd / build (push) Has been cancelled
linux / build (c++20, alpine) (push) Has been cancelled
linux / build (c++20, archlinux) (push) Has been cancelled
linux / build (c++20, debian) (push) Has been cancelled
linux / build (c++20, fedora) (push) Has been cancelled
linux / build (c++20, gentoo) (push) Has been cancelled
linux / build (c++20, opensuse) (push) Has been cancelled
Nix-Tests / nix-flake-check (push) Has been cancelled
2025-10-09 23:02:31 -07:00
c5a7fae1d9 Fork
Some checks failed
clang-format / lint (push) Has been cancelled
freebsd / build (push) Has been cancelled
linux / build (c++20, alpine) (push) Has been cancelled
linux / build (c++20, archlinux) (push) Has been cancelled
linux / build (c++20, debian) (push) Has been cancelled
linux / build (c++20, fedora) (push) Has been cancelled
linux / build (c++20, gentoo) (push) Has been cancelled
linux / build (c++20, opensuse) (push) Has been cancelled
Nix-Tests / nix-flake-check (push) Has been cancelled
2025-10-09 22:05:52 -07:00
Alex
559079e9a6 fix: lint
Some checks failed
clang-format / lint (push) Has been cancelled
freebsd / build (push) Has been cancelled
linux / build (c++20, alpine) (push) Has been cancelled
linux / build (c++20, archlinux) (push) Has been cancelled
linux / build (c++20, debian) (push) Has been cancelled
linux / build (c++20, fedora) (push) Has been cancelled
linux / build (c++20, gentoo) (push) Has been cancelled
linux / build (c++20, opensuse) (push) Has been cancelled
Nix-Tests / nix-flake-check (push) Has been cancelled
2025-10-05 10:56:24 +02:00
Alexis Rouillard
a16d53b30d Merge branch 'master' into fix/zjeffer/thread-sanitizer-warning 2025-10-05 10:51:47 +02:00
Alexis Rouillard
18a9835b7c Merge pull request #4246 from edeustua/master
feat: Add ISO 8601 calendar to clock module
2025-10-01 14:29:37 +02:00
Alexis Rouillard
9dd75d4f6b Merge pull request #4507 from workflow/niri-language-add-css-classes
feat(niri/language): add CSS classes
2025-10-01 14:27:35 +02:00