Commit Graph
4620 Commits
Author SHA1 Message Date
Alexis Rouillard 279aa67206 Merge branch 'master' into fix/hyprland-workspaces-scroll 2026-07-03 20:45:08 +02:00
Alexis Rouillard 5fce3926e0 Merge branch 'master' into master 2026-07-03 20:45:06 +02:00
Alexis Rouillard 9b016d8158 Merge branch 'master' into fix/hyprland-workspaces-taskbar-hover 2026-07-03 20:45:03 +02:00
Alexis Rouillard fa79b931e9 Merge branch 'master' into sayrus-gh/sway-workspaces-quotes 2026-07-03 20:45:01 +02:00
Alexis Rouillard 555dcb1776 Merge branch 'master' into master 2026-07-03 20:44:58 +02:00
Alexis Rouillard 0445607fb6 Merge branch 'master' into mpd-duration 2026-07-03 20:44:45 +02:00
Alexis Rouillard 0116808f4b Merge pull request #5079
Fix (memory): Fix tooltip showing incorrect unit and add proper unit initialization
2026-07-03 20:43:20 +02:00
Alexis Rouillard e20864991c Merge pull request #5043
fix(hyprland/workspaces): fix IPC call when using move-to-monitor
2026-07-03 20:43:17 +02:00
Alexis Rouillard 3d64071bab Merge pull request #5108 from SaveTheRbtz/codex-json-parser-buffer
perf(json): parse directly from string buffers
2026-07-03 19:56:40 +02:00
Alexis Rouillard 260a68cf58 Merge pull request #5100 from SaveTheRbtz/codex-mpd-playing-update
perf(mpd): avoid duplicate playing-state updates
2026-07-03 19:55:23 +02:00
Alexis Rouillard c166d98b0d Merge pull request #5010 from Neltharion01/master
Fix connection loop in pulseaudio
2026-07-03 19:54:51 +02:00
Alexis Rouillard 2ece13775e Merge pull request #5058 from typedrifter/fix-cursor-crash
fix(amodule): prevent crash when cursor timeout fires after destruction
2026-07-03 19:54:25 +02:00
Alexis Rouillard 91b0b30aac Merge pull request #5101 from SaveTheRbtz/codex-mpd-song-warning
fix(mpd): avoid false no-song warning when stopped
2026-07-03 19:52:58 +02:00
Alexis Rouillard 9dd927e8da Merge pull request #5076 from muratyalcin-ce/master
Fix (wayfire/backend): Fixed unhandled exception (out_of_range) after…
2026-07-03 19:52:25 +02:00
Alexis Rouillard 6df22ab348 Merge pull request #5154 from JuustKiwi/feature/dpms-suspend
feat(modules): pause background threads when display is asleep
2026-07-03 19:49:56 +02:00
Alexis Rouillard 48e9dd3b64 Merge pull request #5123 from martuscellifaria/master
fix(delayWorker): stop loop for static modules with no exec command
2026-07-03 19:45:40 +02:00
Alexis Rouillard 44ec750b76 Merge pull request #5121 from InetAddress/fix-battery-hotplug-crash-1
fix(battery): prevent crash when removing a hot-plugged device
2026-07-03 19:44:01 +02:00
Ibrahim Issa 4d1a561cdc feat(modules): pause background threads when display is asleep
Currently, modules polling hardware nodes continuously wake up kernel drivers even when the monitor is asleep (e.g., DPMS off), flooding dmesg.

- Adds 'disable-on-sleep' config flag
- Hooks GTK window map/unmap signals to track DPMS state
- Propagates suspend/resume calls to AModule worker threads
2026-07-03 18:44:03 +02:00
Runxi Yu e37fcee35d fix(sni): ignore name/pixmap updates for custom icons 2026-06-19 05:51:00 +00:00
martuscellifaria 0bc664a99e Readded the whitespace from the original code 2026-06-12 09:52:03 +02:00
martuscellifaria eb3669decc Rearranging code in a non-redundant way. 2026-06-12 09:48:44 +02:00
martuscellifaria 4ef828f712 Fixing CPU usage spike on Waybar 2026-06-12 09:14:04 +02:00
InetAddress 61178f7b0e Change error handling to warning
Fixes a bug where removing a hot-plugged device mid-loop causes a filesystem error that turns into a fatal runtime error that crashes waybar entirely, changed to warning instead of runtime error.
2026-06-12 04:38:10 +00:00
Jason Chiu 2d9fee144e Update privacy.cpp 2026-06-09 06:51:14 +00:00
Jason Chiu 2506196274 Update privacy.hpp 2026-06-09 06:49:41 +00:00
Jason Chiu fb829c8a8e ## fix(niri/workspaces): crash (segfault) when setting workspace button markup
### Problem
Waybar segfaults on startup when `niri/workspaces` is the only configured
module (default options). Right after the first `WorkspacesChanged` event:
 
    Thread 1 "waybar" received signal SIGSEGV
    #0 gtk_label_set_markup ()
    #1 waybar::modules::niri::Workspaces::doUpdate () at src/modules/niri/workspaces.cpp:106
 
### Root cause
[doUpdate()](cci:1://file:///home/lj/Downloads/Waybar/src/modules/niri/window.cpp:27:0-90:1) set the label markup via:
 
    static_cast<Gtk::Label*>(button.get_children()[0])->set_markup(name);
 
The button's child *is* a valid `GtkLabel`, but gtkmm's `get_children()`
returns it wrapped as a generic `Gtk::Widget` (confirmed: `dynamic_cast`
to `Gtk::Label*` yields `nullptr`). The unchecked `static_cast` then
performs an invalid downcast, producing a corrupt pointer whose `gobj()`
is garbage (`0x1`), so `gtk_label_set_markup()` dereferences it and crashes.
 
This is reliably triggered when no other module has instantiated a
`Gtk::Label` yet (so the `Gtk::Label` wrapper isn't registered), which is
exactly the case for a `niri/workspaces`-only bar. The same idiom exists in
`sway/workspaces` and `wayfire/workspaces`; it's masked there because typical
configs include other label-using modules.

### Testing
- Reproduced the crash on 0.15.0 / current `master` with a minimal
  `"modules-left": ["niri/workspaces"]` config under niri.
- After the fix: no crash; three workspace buttons render with correct
  names/labels (`niri-workspace-1/2/3`).
2026-06-09 06:20:05 +00:00
Alexey Ivanov bef7df8f08 fix(mpd): avoid false no-song warning when stopped 2026-06-05 08:40:49 -07:00
Alexey Ivanov 0cccf0d8b5 perf(mpd): avoid duplicate playing-state updates 2026-06-04 15:23:54 -07:00
Alexey Ivanov 5cce616d3d perf(json): parse directly from string buffers 2026-06-04 15:03:40 -07:00
oqlatulesba3 3315631012 fix(sni): retry Host proxy creation on transient errors
When Host::proxyReady fails to create the SnWatcher proxy (e.g. because
the Watcher has not finished exporting /StatusNotifierWatcher yet), the
cancellable is left set, causing nameAppeared to early-return on every
subsequent event (see the // TODO marker). The Host is then stuck
without a watcher, and the tray module reports
'No such object path /StatusNotifierWatcher' until the bar is fully
restarted.

Clear the cancellable on non-CANCELLED errors and schedule a single
delayed retry of nameAppeared. The guard `watcher_ != nullptr` skips
the retry if a parallel call already succeeded.

Closes #3468
2026-06-02 10:51:05 +03:00
Matthew Orlando 0af3ca1a4e custom_modules: Fix mediaplayer.py handling untitled track
* Fix crash calling method on None
* Show artist if title is None
2026-05-31 10:01:25 -07:00
muratyalcin-ce 5ea824c24c Use unit in config for memory module tooltip 2026-05-28 23:56:52 +03:00
muratyalcin-ce 31a161eb06 Fix (wayfire/backend): Fixed unhandled exception (out_of_range) after no valid outputs in unordered_map 2026-05-27 23:39:39 +03:00
Ansari 2ff2861e88 Merge remote-tracking branch 'upstream/master' 2026-05-27 12:13:51 +05:30
jacobs ec2651370e (Fix) (sway workspace module) persistent workspaces always removed 2026-05-26 11:09:45 +01:00
Siriusuna 81fd9ee4ab fix(mpd): truncate before sanitization and improve tooltip UX
Fix an issue in the MPD module where text failed to render
when raw tags containing markup characters were truncated
mid-sequence after sanitization,
resulting in fragmented XML entities (such as `&amp;` cut into `&am`).

Resolve this by shifting the order of operations to
truncate the raw strings *before* running `sanitize_string`.
To keep `setLabel` decoupled and clean,
we introduce helper methods (`getArtistStr`, `getAlbumArtistStr`,
`getAlbumStr`, `getTitleStr`) inside the `MPD` class,
matching the architectural style of MPRIS.

Additionally:
- Introduce support for the customizable `ellipsis` config option
  (defaulting to `…`).
- Switch the truncation logic of the MPD module to be
  visual-width-aware using the newly extracted
  `waybar::util::utf8_truncate`.
- Decouple the tooltip text from the main label's truncated text.
  The tooltip now displays un-truncated, complete metadata
  (properly escaped), providing a significantly better user
  experience.
2026-05-22 03:15:26 +08:00
Siriusuna 435c212be1 fix(mpris): escape Pango markup in tooltip
Fix an issue where the mpris module's tooltip failed to render
when track metadata contained unescaped XML/HTML markup characters.

This occurred because
the mpris module formatted raw strings into the tooltip template
before passing the final string directly to `set_tooltip_markup()`,
triggering GTK/Pango parsing warnings and rendering failures.

Resolve this by wrapping tooltip metadata fields
in `Glib::Markup::escape_text` before formatting,
ensuring Pango-compliant strings are always delivered to the GTK
tooltip markup.
2026-05-22 02:59:09 +08:00
Siriusuna f8cc7173ca refactor: extract utf8 truncation logic to utility
Move the UTF-8 visual-width measurement and truncation helper functions
from the mpris module to a common utility
(include/util/utf8_string.hpp and src/util/utf8_string.cpp).

This decouples string truncation and width measurement
from the mpris module, allowing other modules (like mpd) to reuse.
The helper function `utf8_truncate` (formerly `truncate` in mpris)
and `utf8_width` is exported under the `waybar::util` namespace,
while the low-level `measure_and_truncate` (formerly `utf8_truncate`)
is encapsulated in an anonymous namespace in src/util/utf8_string.cpp
to avoid unnecessary API exposure.

No functional changes were made to the mpris module's behavior.
2026-05-22 02:52:40 +08:00
buzz 85163c6847 fix(hyprland/workspaces): replace EventBox with Button for taskbar windows 2026-05-21 18:50:43 +02:00
buzz ea36aab3ba docs(hyprland/workspaces): add on-scroll-up and on-scroll-down to man page 2026-05-21 17:34:07 +02:00
buzz eb3b86c4d8 fix(hyprland/workspaces): support on-scroll-up and on-scroll-down config options
The handleScroll method unconditionally dispatched workspace cycling commands
and never checked for custom on-scroll-up/on-scroll-down config values.

Register the scroll handler when custom scroll commands are configured (even
without enable-bar-scroll), and delegate to AModule::handleScroll so user
commands are executed, matching the pattern used by other modules.
2026-05-21 17:02:39 +02:00
Francois Lachese 876eaaf70f fix(amodule): prevent crash when cursor timeout fires after destruction 2026-05-20 15:57:38 +02:00
Adam Druzd ff76e96786 fix(hyprland): keep workspace hover over taskbar icons 2026-05-17 09:12:08 +02:00
Desuwa 7e2afaa5b3 fix: mpd specify timer interval in seconds 2026-05-16 14:05:17 -07:00
Tom Benham 40c9d92e3d test(hyprland): fix dispatch test 2026-05-16 21:29:43 +02:00
Tom Benham cdb792af41 fix(hyprland/workspaces): fix IPC call when using "move-to-monitor": true 2026-05-16 18:03:09 +02:00
Milad Alizadeh 0ec6d06472 Guard set_current_layout against unknown layout names (wtype, hot-plugged
devices) so transient events stop blanking layout_. Refresh layouts_map_
on "added"/"xkb_keymap" input events and union layouts across all
keyboards so new devices contribute their layouts. Release mutex_ before
the refresh sendCmd to avoid self-deadlock from the synchronous
signal_cmd emit.
2026-05-15 17:29:21 +01:00
Jérémie Rodon 5c3ec1fd63 fix(tray): hide module when no items are visible
Tray::update() already had logic to hide the module when all child items were passive, but it was only re-run on item add/remove — never on a status change. When the last visible item transitioned to Passive, the item hid itself but the now-empty module remained visible.

Connect Tray to each item's Gtk::EventBox signal_show/signal_hide so update() runs on every visibility transition, and simplify update() to check child->get_visible() directly instead of inspecting the `passive` CSS class. The Tray-level `show-passive-items` read becomes redundant since Item already honours it when deciding its own visibility; remove it along with the now-unused Tray::show_passive_ member.

Fixes: #3721
2026-05-11 22:47:24 +02:00
Alexis Rouillard 05945748dc Merge pull request #5013 from higorprado/fix/hyprland-lua-dispatch-protocol
fix(hyprland/workspaces): adapt dispatch commands for Lua IPC protocol
2026-05-04 23:17:38 +02:00
Alexis Rouillard 4c105f7cd7 Merge pull request #5007 from nschloe/toctou-fixes
Various toctou fixes
2026-05-03 13:27:52 +02:00