commit 213270aef5cb2e7f96cb38f62472ef275f5ecb93
parent 11648d9f4accfff82d22aa060e0aa8ba77327593
Author: ryukamish <[email protected]>
Date: Sun, 12 Jul 2026 12:32:54 +0530
add: custom window title module for waybar
Diffstat:
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc
@@ -3,7 +3,7 @@
"position": "top",
"modules-left": [
"clock",
- "sway/window"
+ "custom/window"
],
"modules-center": [
"sway/workspaces"
@@ -21,9 +21,16 @@
"all-outputs": true,
"format": "{name}"
},
- "sway/window": {
- "format": "<span color='#aaaaaa'>{app_id} {title}</span>",
- "max-length": 40
+ "custom/window": {
+ "exec": "~/.local/bin/waybar-window",
+ "exec-if": "~/.local/bin/waybar-window",
+ "format": "<span color='#aaaaaa'>{}</span>",
+ "return-type": "json",
+ "max-length": 60,
+ "tooltip": false,
+ // titles where special characters are present weren't being shown
+ // this solves that
+ "escape": true
},
"clock": {
"format": "{:%a, %b %d/%m/%y %H:%M}",
diff --git a/.config/waybar/style.css b/.config/waybar/style.css
@@ -32,7 +32,7 @@ window#waybar {
#clock,
#battery,
-#window,
+#custom-window,
#backlight,
/* Custom modules */
#custom-vpn,
diff --git a/.local/bin/waybar-window b/.local/bin/waybar-window
Binary files differ.