Commit Graph
85 Commits
Author SHA1 Message Date
Alex da5b02a405 Merge remote-tracking branch 'origin/master' into pr-4543
# Conflicts:
#	man/waybar-wlr-taskbar.5.scd
#	src/modules/wlr/taskbar.cpp
2026-07-04 00:38:45 +02:00
Alexis Rouillard 0be7bbb730 Merge pull request #4532 from mbroemme/2025-wlr-taskbar-add-justify-option
feat(wlr/taskbar): add `justify` option to control horizontal alignment of the module box
2026-07-03 23:07:39 +02:00
Alex 78aafde6fd Merge remote-tracking branch 'origin/master' into 2025-wlr-taskbar-add-justify-option
# Conflicts:
#	man/waybar-wlr-taskbar.5.scd
2026-07-03 22:26:28 +02:00
Alex 68097dacd4 Merge remote-tracking branch 'origin/master' into feat/wlr-taskbar-bar-css-states 2026-07-03 22:10:26 +02:00
Alex 488a75fada fix(wlr/taskbar): gate title shrink/expand behind 'expand' option
Only stretch buttons and ellipsize titles when the new boolean 'expand'
option is enabled and the bar is horizontal. Restores the previous
content-based sizing as the default and avoids truncating every title
to an ellipsis on vertical bars.
2026-07-03 21:39:48 +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
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
Visal Vijay 60c57b7195 clarify logical condition in wlr taskbar module 2026-03-22 11:40:44 +05:30
Alex ef3d55980e fix: some crashes 2026-02-24 00:49:08 +01:00
Prakhar Chhalotre 3e7976c8eb fix: use pango markup for consistent formatting in format and tooltip-format 2026-02-13 02:23:16 +05:30
Alex 47fb21a2c1 chore: upgrade to clang-format@21 2026-02-04 09:24:14 +01:00
Maik Broemme 382b9daada wlr/taskbar: add homogeneous to evenly distribute button widths 2025-10-10 15:25:21 +02:00
Maik Broemme 730b502c76 wlr/taskbar: add justify option for Gtk::Box horizontal alignment
The `wlr/taskbar` module had no way to control its container's horizontal
alignment. This change adds a `justify` config key (left|center|right) that
maps to Gtk::Align::START/CENTER/END and is applied via set_halign() on the
module's Gtk::Box. Default behavior remains unchanged (left).
2025-10-08 08:52:19 +02:00
Pol Rivero c98cb7095d Merge remote-tracking branch 'upstream/master' 2025-07-06 10:18:59 +02:00
Alex ee91d18ad9 fix: lint 2025-06-22 10:01:36 +02:00
Alexis Rouillard 54f7991325 Merge pull request #3762 from cc-nogueira/add_rewrite_to_wlr_tooltip
add rewrite to wlr tooltip
2025-06-22 08:58:33 +01:00
Pol Rivero 451d458545 Fix compilation errors after merge 2025-04-29 20:12:59 +02:00
Pol Rivero 4222032fa1 Merge remote-tracking branch 'upstream/master' 2025-04-29 19:59:42 +02:00
Austin Horstman 55f52c3457 treewide: clang and nix format 2025-04-15 14:56:28 -05:00
Clemens Horn addf44d945 test 2025-04-07 20:51:35 +02:00
Clemens Horn e92b0a86b5 wlr/taskbar: find icon by title as fallback 2025-04-07 20:33:18 +02:00
Pol Rivero bc2e143ac5 Extract icon loading logic to separate class 2025-01-27 11:46:35 +01:00
Ricardo Nogueira ddb3016440 add rewrite to wlr tooltip 2024-11-12 17:10:05 -03:00
Scott Moreau 4d89c64bed taskbar: Fixup whitespace 2024-08-26 04:44:22 -06:00
Scott Moreau fdc8431709 taskbar: Send minimize geometry hints
This allows compositors to know the minimize widget geometry so that
minimize animations work properly.
2024-08-04 22:49:51 -06:00
Rene D. Obermueller 64a3133083 workaround for icons not rendered for apps existing before waybar launch 2024-06-30 14:52:49 +02:00
zspher 1b1442e3ba fix: taskbar not applying empty class on empty 2024-06-06 03:23:47 +08:00
Bruce Mills 245043f9e7 taskbar: search user directories first for desktop files 2024-04-01 14:30:31 -04:00
Mauro Guida 6d690ad48b fix(wlr/taskbar): crash on taskbar drag and drop event 2024-03-20 13:28:35 +01:00
Aleksei Bavshin d590d508ca feat: add module class to the root elements of the modules
Previously, the only way to select all the module labels was with the
following kind of selector:
```css
.modules-left > widget > label,
.modules-center > widget > label,
.modules-right > widget > label {
    /* ... */
}
```
(and a matching block for the `box` containers).

Now, this can be expressed as
```css
label.module, box.module {
    /* ... */
}
```
2024-02-14 22:41:13 -08:00
Aleksei Bavshin 2f555a6936 refactor(bar): use Gtk enums for position and orientation
Ensure that the position and the corresponding CSS class on window are
always set.
2024-02-14 22:11:21 -08:00
dpayne 53233e47a3 Fix use after free on task close 2024-01-21 19:08:23 -08:00
Austin Horstman b1744278d1 chore: lint fix 2023-12-01 22:05:40 -06:00
Johan Sjöblom d4559c7f00 Using 'image-missing' fallback if no taskbar icon is found 2023-11-16 16:59:05 +01:00
Ikko Eltociear Ashimine 57544fe694 fix: typo in taskbar.cpp
ocurred -> occurred
2023-08-15 00:45:09 +09:00
Alex 6c196b8f8d fix: lint 2023-07-04 22:35:27 +02:00
David Schulte c55cd82b39 wlr/taskbar: add support for rewrite rules 2023-07-02 12:23:36 +02:00
dmitry ce4da59f34 finish 2023-06-27 00:07:40 +03:00
Louis DeLosSantos 79eb2f5bc1 wlr-taskbar: allow sorting by app_id
some users (maybe only myself) may want to sort the task bar by app_id
which then places occurrences of the same task next to each other.

Signed-off-by: Louis DeLosSantos <louis.delos@gmail.com>
2023-03-01 12:16:28 +00:00
Aleksei Bavshin ea17a66dfc fix: compilation errors with cpp_std=c++20
There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
2023-01-20 22:50:02 -08:00
Victor "multun" Collod df0fdce92b get_desktop_app_info: fix crash on failed DesktopAppInfo::create
Even though it makes little sense for this call to fail,
it sometimes randomly does, and takes down waybar with it.
2023-01-11 23:02:12 +01:00
Alex 2d7e21ed7d fix: lint 2022-10-26 17:26:15 +02:00
bi4k8 ff61e7bf4e taskbar: implement drag-and-drop task reordering 2022-10-25 19:39:23 +00:00
asas1asas200 4a929240df style(lint): fix some files lint 2022-08-31 15:51:50 +08:00
akliuxingyuan 0d27949f0a scale icons for HiDPI monitor 2022-08-30 23:13:38 +08:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Alex Maystrenko f3819ee954 remove duplicated string manipulation methods 2022-02-05 21:02:58 +01:00
dmitry 166504256a Merge branch 'master' of https://github.com/Alexays/Waybar into pr/anakael/add-name-to-taskbar 2021-11-23 23:10:49 +03:00
Anakael 60c1706273 Update taskbar.cpp 2021-11-19 18:54:37 +03:00
dmitry 75a6dddea5 Finish 2021-10-20 01:23:00 +03:00