[PATCH] rde: waybar: Add waybar-custom.
Export this patch
---
src/rde/features/wm.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/rde/features/wm.scm b/src/rde/features/wm.scm
index d86f4a0..58e3343 100644
--- a/src/rde/features/wm.scm
+++ b/src/rde/features/wm.scm
@@ -71,6 +71,7 @@
waybar-idle-inhibitor
waybar-clock
waybar-battery
+ waybar-custom
feature-swayidle
feature-swaylock
@@ -762,6 +763,27 @@ By default, NAME is root, PATH is /, and DISK-ICON is ."
(path . ,path))
#:bar-id bar-id)))
+(define* (waybar-custom
+ #:key
+ (bar-id 'main)
+ (name 'main)
+ (exec #f)
+ (return-type "json")
+ (icon #f))
+ "Executes a custom script EXEC. The script is expected
+to return a valid json object."
+ (lambda (config)
+ (waybar-module
+ (symbol-append 'custom/ name)
+ `((interval . 2)
+ (exec . ,exec)
+ (return-type . ,return-type)
+ (tooltip . "{tooltip}")
+ (format . ,(if icon
+ (string-append icon " {}")
+ "{}")))
+ #:bar-id bar-id)))
+
(define* (feature-waybar
#:key
(waybar waybar-stable)
--
2.39.2