fix my waybar number patch :>

This commit is contained in:
xunuwu 2026-02-20 00:51:32 +01:00
parent 6ba11eb46f
commit d4feeea1fb
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
2 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = pkgs.waybar.overrideAttrs (final: prev: { package = pkgs.waybar.overrideAttrs (final: prev: {
# patches = [./waybar-workspace.patch]; patches = [./waybar-workspace.patch];
}); });
settings = [ settings = [
{ {

View file

@ -1,13 +1,13 @@
diff --git a/src/modules/sway/workspaces.cpp b/src/modules/sway/workspaces.cpp diff --git a/src/modules/sway/workspaces.cpp b/src/modules/sway/workspaces.cpp
index 8f273300..faed503c 100644 index e0255893..13db7f3a 100644
--- a/src/modules/sway/workspaces.cpp --- a/src/modules/sway/workspaces.cpp
+++ b/src/modules/sway/workspaces.cpp +++ b/src/modules/sway/workspaces.cpp
@@ -343,9 +343,9 @@ auto Workspaces::update() -> void { @@ -344,9 +344,9 @@ auto Workspaces::update() -> void {
fmt::arg("output", (*it)["output"].asString())); fmt::arg("output", (*it)["output"].asString()));
} }
if (!config_["disable-markup"].asBool()) { if (!config_["disable-markup"].asBool()) {
- static_cast<Gtk::Label *>(button.get_children()[0])->set_markup(output); - static_cast<Gtk::Label*>(button.get_children()[0])->set_markup(output);
+ static_cast<Gtk::Label *>(button.get_children()[0])->set_markup(trimWorkspaceName(output)); + static_cast<Gtk::Label*>(button.get_children()[0])->set_markup(trimWorkspaceName(output));
} else { } else {
- button.set_label(output); - button.set_label(output);
+ button.set_label(trimWorkspaceName(output)); + button.set_label(trimWorkspaceName(output));