Commit Graph
4845 Commits
Author SHA1 Message Date
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 2190871a68 perf(label): skip redundant markup updates 2026-06-04 15:18:43 -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
DreamMaoMao 3eeffbe389 feat: add mango modules: workspace,language,keymode,window,layout 2026-05-29 12:56:40 +08: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
Artur Ciesielski 97acbf30d0 Update man pages for persistent-workspaces in sway/workspaces 2026-05-26 20:38:14 +02:00
Artur Ciesielski 415da7aef4 sway/workspaces: refer to outputs by their monitor identifier (make and model) 2026-05-26 19:39:03 +02:00
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 `&` 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
Ezequiel Colunga AchaandCursor fcf1fb798c fix(wlr/taskbar): let task titles shrink within available space
The taskbar currently requests enough width for every task title, which can push right-side modules off-screen when many windows are open. Allow task buttons to share the taskbar allocation and ellipsize title labels instead of forcing the whole module to grow.

This keeps neighboring modules visible while preserving the existing taskbar click actions and formatting behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 15:06:41 -03:00
Francois Lachese 876eaaf70f fix(amodule): prevent crash when cursor timeout fires after destruction 2026-05-20 15:57:38 +02:00
Ivan Ribeiro 6bdafede07 feat(cpu): add {icons} format replacement for all per-core icons
Concatenates all per-core icons into a single {icons} placeholder,
so configs work across machines with different core counts without
manually specifying {icon0}{icon1}...{iconN}.

Closes #4240
2026-05-19 21:21:56 +01:00
finitemonkey 0351ac8fb2 Additional options when muted for the PulseAudio-Slider module:
- Add "muted" class for styling the muted state.
- Add "zero-on-mute" boolean option to control slider position
  when muted.
- Add "unmute-on-volume-change" boolean option to control whether
  to automatically unmute when the volume changes.
2026-05-17 08:22:17 +01:00
Adam Druzd ff76e96786 fix(hyprland): keep workspace hover over taskbar icons 2026-05-17 09:12:08 +02:00
Desuwa f7001410d2 mpd: ensure emit is called after state changes 2026-05-16 16:32:42 -07:00
Desuwa 546b53d675 mpd: Implement idle events for Playing state 2026-05-16 15:41:09 -07: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
Agnibha Mukherjee 3229c2c9fc feat: support Pango markup in remaining tooltips 2026-05-14 11:01:58 +05:30
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
Mint c5f834b881 Merge branch 'Alexays:master' into master 2026-05-10 11:02:22 -03:00
OliMoli 3a045ff3a1 Merge branch 'Alexays:master' into drawer-state 2026-05-08 06:35:35 +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
GlassyBridge114 23df491c53 Merge branch 'Alexays:master' into master 2026-05-03 15:49:10 +03:00
Alexis Rouillard 4c105f7cd7 Merge pull request #5007 from nschloe/toctou-fixes
Various toctou fixes
2026-05-03 13:27:52 +02:00
Higor Prado 97917db593 test(hyprland): expose dispatch internals for unit tests
Move buildLuaDispatch and isLuaProtocol from private to
protected/public so IPCTestHelper can access them.

Add 7 tests covering all buildLuaDispatch branches, dispatch
error path, and isLuaProtocol cache behavior.
2026-05-02 20:25:43 -03:00
Yui c81a039a55 feat: add compact versions of bandwidthBytes to network module
Adds the following:
- bandwidthDownByesCompact
- bandwidthUpByesCompact

Differences from normal version:
- drop the "/s" suffix
- drop the deciaml part if less than 1MB/s
2026-05-01 22:31:03 +03:00
Higor Prado e17c0d9f0a fix(hyprland/workspaces): adapt dispatch commands for Lua IPC protocol
Hyprland 0.54 replaced the text-based dispatch socket protocol with a
Lua-based one. Commands like "dispatch workspace 1" are now interpreted
as invalid Lua (return hl.dispatch(workspace 1)), breaking workspace
clicks and scroll navigation.

Add IPC::dispatch() that probes the running Hyprland on first call and
routes commands through the new hl.dsp Lua API when the Lua protocol is
detected, falling back to the old text format otherwise.
2026-04-29 16:41:11 -03:00
shiyi b28af75e62 feat(language): add tooltip support with configurable tooltip-format 2026-04-29 23:34:09 +08:00
Skyfrei c8f57d3f2c Merge branch 'master' into 4655 2026-04-29 11:06:25 +02:00
Neltharion a66d6b1596 Do not reconnect if connection was refused
Otherwise, it will try to reconnect recursively
2026-04-29 03:40:06 +03:00
Evans 255f17d13c battery: guard _exists = true assignment inside if condition 2026-04-28 04:53:19 +00:00
Nico Schlömer 5af324f375 two more toctou bugs 2026-04-27 11:41:09 +02:00
Nico Schlömer 59d09c2c12 fix various toctou bugs in battery.cpp 2026-04-27 11:29:03 +02:00
lilly-lizard 64e3e48270 Merge branch 'river-tags-monitor-focus' of github.com:lilly-lizard/Waybar-fork into river-tags-monitor-focus 2026-04-26 06:50:05 +12:00
OliMoli 1a88cf0823 Merge branch 'Alexays:master' into drawer-state 2026-04-23 15:47:12 +02:00
Alexis Rouillard cca8dc38b6 Merge pull request #4990 from B2krobbery/fix-sni-make-unique
fix(sni): use std::make_unique for Item allocation
2026-04-22 20:50:48 +02:00
OliMoli 10206cf914 Merge branch 'Alexays:master' into drawer-state 2026-04-19 18:16:36 +02:00