Commit Graph
26 Commits
Author SHA1 Message Date
yubo 5b8c98729f refactor: rm direct dp.emit() call in constructor. 2026-07-18 21:14:08 +08:00
sewaustav 9cd09c2569 feat(niri): add workspace-taskbar support
Adds a per-workspace app-icon taskbar (Workspace class) to the
niri/workspaces module. Rebased onto master: integrated with the
existing window-rewrite feature so the {windows} and {total} format
replacements continue to work alongside the new taskbar.
2026-07-04 01:50:16 +02:00
Abhijeet 9e10a9aec9 feat(niri/workspaces): add window icons via window-rewrite
Adds format-window-separator, window-rewrite and window-rewrite-default
options plus the {windows} format replacement to the niri/workspaces
module (rebased onto master; coexists with ignore-workspaces).
2026-07-04 01:42:23 +02:00
Alex 35dd0af208 Merge remote-tracking branch 'origin/master' into pr-4001
# Conflicts:
#	man/waybar-niri-workspaces.5.scd
#	src/modules/niri/workspaces.cpp
2026-07-04 00:54:50 +02:00
Alex 9f3e5c09a3 Merge remote-tracking branch 'origin/master' into pr-4537
# Conflicts:
#	include/modules/niri/workspaces.hpp
#	src/modules/niri/workspaces.cpp
2026-07-04 00:40:14 +02:00
Alexis Rouillard e921e255d1 Merge pull request #5110 from archion/master
feat(niri/workspaces): add {total} format token to workspaces
2026-07-04 00:27:31 +02:00
Alex 5c1dd9e9f1 Merge remote-tracking branch 'origin/master' into pr-5110 2026-07-03 23:56:28 +02:00
Alex b9d5b3b4a2 Merge remote-tracking branch 'origin/master' into pr-5041
# Conflicts:
#	src/modules/niri/workspaces.cpp
2026-07-03 23:50:53 +02:00
Alexis Rouillard a5d510ff8a Merge branch 'master' into enable-bar-scroll 2026-07-03 22:22:30 +02:00
Alexis Rouillard 7261d7d78f Merge branch 'master' into master 2026-07-03 22:22:28 +02:00
Alex b7e5805f4b Merge remote-tracking branch 'origin/master' into RaphaelKimmig/master
# Conflicts:
#	include/modules/niri/workspaces.hpp
2026-07-03 22:11:34 +02: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
Zuodong Yu f7b9d8c123 modules/niri: add {total} format token to workspaces 2026-06-07 17:35:37 +08:00
Jack Barnes 51becf2fbc feat(niri/workspaces): Add enable-bar-scroll option 2026-05-16 13:03:53 +08:00
cebem1nt 8b1e574063 niri/workspaces: feature - add "hide-empty" config option (#4965) 2026-03-31 17:49:30 -03:00
cebem1nt f1140f00f9 niri/workspaces: change icons priority 2026-02-17 11:23:27 -03:00
Alex 47fb21a2c1 chore: upgrade to clang-format@21 2026-02-04 09:24:14 +01:00
Raphael Kimmig 85a8fca0de feat: allow sorting niri workspaces 2025-12-07 12:18:24 +01:00
Thomas Crha e1d4967d8e feat(niri/worspaces): add ignore-workspaces configuration option 2025-10-09 18:03:24 +11:00
Alex ee91d18ad9 fix: lint 2025-06-22 10:01:36 +02:00
Alexis Rouillard 630f85dcb1 Merge branch 'master' into niri-workspace-urgency 2025-06-22 08:57:49 +01:00
Illia Ostapyshyn 19d2430516 niri/workspaces: Add empty icon 2025-05-19 23:01:19 +02:00
Duncan Overbruck 47e0f42523 niri: add support for urgency indicators to workspaces 2025-05-14 20:33:11 +02:00
hansi 9556bdabda feat: add display-condition configuration option 2025-03-24 11:47:29 +04:00
Alex 1142979581 chore: lint 2024-09-13 09:43:19 +02:00
Ivan Molodetskikh 46e7ed35de Add niri/workspaces, niri/window, niri/language 2024-09-13 10:34:55 +03:00