Commit Graph
1456 Commits
Author SHA1 Message Date
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
Johannes Haase 47b2ff09b7 feat(cursor): use cursor-shape-v1 cursor names instead of Gdk::CursorType 2026-06-16 23:27:27 +02:00
Robert M. Thomson 942411d7a1 Force layer-shell commit after configure
Assisted-by: pi:gpt-5.5
2026-06-15 10:36:29 +02:00
iamcheyan 14e59daae4 feat(wlr/taskbar): expose active toplevel state on the bar window
Add opt-in bar-css-states option to wlr/taskbar module.

When enabled, the module tracks the active workspace and updates CSS
classes on window#waybar to reflect the current window state:
- toplevel-active: when a window is focused
- toplevel-maximized: when any non-minimized window on active workspace is maximized
- toplevel-minimized: when the active window is minimized
- toplevel-fullscreen: when any non-minimized window on active workspace is fullscreen

This feature requires compositor support for ext-workspace-v1 protocol
to correctly track workspace membership. Without it, classes fall back
to the active application state only.

Also includes active-only option implementation.

Changes:
- Add ext-workspace-v1 protocol support for workspace tracking
- Implement WorkspaceState tracking in Taskbar class
- Add workspace management lifecycle (create/remove/done)
- Add bar CSS class update logic with aggregation
- Add visible() getter to Task class
- Implement active-only task visibility control
- Update man page with documentation and CSS examples

Signed-off-by: iamcheyan <iamcheyan@users.noreply.github.com>
2026-06-13 11:34:29 +09:00
Jason Chiu 2506196274 Update privacy.hpp 2026-06-09 06:49:41 +00: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
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
stalker 822071f36e feat(custom): add image 2026-05-25 08:18:12 +04:00
Carlo Teubner d8848a478b Sway IPC: code cleanups 2026-05-24 08:20:10 +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 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
Francois Lachese 876eaaf70f fix(amodule): prevent crash when cursor timeout fires after destruction 2026-05-20 15:57:38 +02: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 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
Jack Barnes 51becf2fbc feat(niri/workspaces): Add enable-bar-scroll option 2026-05-16 13:03:53 +08:00
Antoine Gaudreau Simard 3971bb6c00 feat: add support for multiple batteries in a single bluetooth device 2026-05-13 11:48:42 -04:00
yyyumeniku 2a05edaf6a hyprland/workspaces: add debounce timer to prevent workspace button flicker
When switching between workspaces rapidly (especially empty ones),
Hyprland sends createworkspace and destroyworkspace events slightly
out of order. This causes workspace buttons to render in wrong
positions for a split second before snapping to their correct spots.

Add a 7ms debounce timer that batches workspace events before
calling dp.emit(), preventing the visual glitch.

Fixes #4376
2026-05-12 20:09:13 -04: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
Mint c5f834b881 Merge branch 'Alexays:master' into master 2026-05-10 11:02:22 -03: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
Skyfrei c8f57d3f2c Merge branch 'master' into 4655 2026-04-29 11:06:25 +02:00
cebem1nt ab7bc8de1c feature: group - add reveal-delay config option for drawer 2026-04-18 13:34:29 -03:00
Volker Schlecht 0241d0eac6 Remove redefinition or SIGRTMIN/SIGRTMAX for OpenBSD 2026-04-17 19:27:39 +02:00
Mervius 09b6df37ca Check if output still is in outputs before doing anything with it 2026-04-15 10:39:21 -05:00
lilly-lizard 0ee4fd4aa2 added output class to dwl/mangowm allowing tags to display differently when the output is focused (for multi-monitor setups) 2026-04-14 13:47:53 +12:00
lilly-lizard e9741829d8 Merge branch 'master' into river-tags-monitor-focus 2026-04-14 08:30:00 +12:00
Arnaud Gaudard 450b6a785f Add "ignore-workspaces" option to sway/workspaces module 2026-04-12 17:22:19 +02:00
Mervius efd245b552 Fix timeout with multiple monitors 2026-04-10 11:42:23 -05:00
xiyori 503d99b128 Add max-windows option to hyprland/workspaces 2026-04-09 14:15:56 +03:00
Ricardo Markiewicz dfc26364e1 feat: use the foreground color for cleaner look 2026-04-08 23:36:47 +02:00
Ricardo Markiewicz 4d6354af48 feat: add gauge and stacked bar graph type 2026-04-08 23:36:47 +02:00
Ricardo Markiewicz efadb82c56 feat: basic line graph component and cpu graph module 2026-04-08 23:36:47 +02:00
Alexis Rouillard 202ae4bd5f Merge pull request #4975 from pix-code/master
memory: feature - add "unit" config option
2026-04-07 12:45:24 +02:00
Alexis Rouillard 66c09bc5b7 Merge pull request #4964 from adrianlzt/fix/network-bandwidth-event-race
fix(network): prevent near-zero bandwidth on rapid event-driven updates
2026-04-07 12:41:31 +02:00
Duke B fc11789a4f add unit config option to memory module 2026-04-05 19:01:36 -04:00
vdermichev 2c2901e8f7 hyprland/workspaces: expose workspace name as CSS class
Enable per-workspace styling by adding the workspace name as a
CSS class to each workspace button. The name is sanitized to a
valid CSS identifier: lowercased, non-alphanumeric characters
collapsed to hyphens, digit-leading names prefixed with "ws-".

Examples: "IDE" → .ide, "special:telegram" → .telegram, "1" → .ws-1

Allows users to style individual workspaces:
  #workspaces button.telegram { color: #54a0e0; }
2026-04-05 11:44:56 +02:00
g_goessel 39656deab3 feat: Add wifi network link bitrate value
In order to obtain the RX and TX bitrates from the kernel netlink we need to open a second info socket to get the station data. The values are formatted like "1.9Gb/s" and then exposed as `rx_bitrate` and `tx_bitrate`.
This code is closely following the `iw` implementation.
2026-04-01 12:12:04 +02:00
hecate cantus c866c4cd24 Merge branch 'master' into master 2026-03-30 14:25:41 -07:00
Adrian LopezandSisyphus 753294dbf4 fix(network): prevent near-zero bandwidth on rapid event-driven updates
When netlink events (link/addr/route changes) fire between timer
intervals, dp.emit() triggers update() which consumes the byte delta
and resets bandwidth_down_total_. A subsequent timer update sees
near-zero delta, displaying very small bandwidth.

Cache the last computed bandwidth values and skip recalculation
when update() is called within half the interval. Event-driven
updates reuse the cached values instead.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-30 19:38:24 +02:00
Keepo a9aab4e356 fix: type consistency 2026-03-28 23:44:41 -04:00
Keepo 72d6a51fb7 fix: fix compile/run bugs from trying to be safer. rip 2026-03-28 23:26:34 -04:00
Keepo 3533265675 fix: removed unnecessary function, update header file for signature change. 2026-03-28 23:02:16 -04:00