summaryrefslogtreecommitdiff
path: root/.config/eww/widgets.yuck
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww/widgets.yuck')
-rw-r--r--.config/eww/widgets.yuck82
1 files changed, 82 insertions, 0 deletions
diff --git a/.config/eww/widgets.yuck b/.config/eww/widgets.yuck
new file mode 100644
index 0000000..2459550
--- /dev/null
+++ b/.config/eww/widgets.yuck
@@ -0,0 +1,82 @@
+(defwidget bar []
+ (box :class "bar"
+ :orientation "h"
+ (iconwidget)
+ (workspaces)
+ (power-time-cpu-mem)))
+
+(defwidget power-time-cpu-mem []
+ (box :class "time-cpu-mem"
+ :halign "end"
+ :valign "center"
+ :space-evenly "false"
+ :orientation "h"
+ (cpu-and-mem)
+ (sep)
+ (mailwidget)
+ (sep)
+ (t1widget)
+ (sep)
+ (batterywidget)
+ (sep)
+ (label :text "${date}, "
+ :class "time-label"
+ :halign "end"
+ :valign "center"
+ :tooltip "time")
+ (label :text time
+ :class "time-label"
+ :halign "end"
+ :valign "center"
+ :tooltip "time")))
+
+(defwidget cpu-and-mem []
+ (box :class "cpu-and-mem"
+ :orientation "h"
+ :halign "end"
+ :valign "center"
+ :space-evenly "false"
+ (circular-progress :class "vol"
+ :value volume
+ :thickness 6)
+ (circular-progress :class "cpu"
+ :value {EWW_CPU.avg}
+ :thickness 6)
+ (circular-progress :class "mem"
+ :value {EWW_RAM.used_mem_perc}
+ :thickness 6)))
+
+(defwidget batterywidget []
+ (label
+ :class "battery"
+ :text batperc))
+
+(defwidget t1widget []
+ (label
+ :class "t1"
+ :text "${t1}"))
+
+(defwidget mailwidget []
+ (label
+ :class "mail"
+ :text "${mail}"))
+
+(defwidget iconwidget []
+ (image
+ :path "assets/raven.png"
+ :class "icon"
+ :image-height 20
+ :preserve-aspect-ratio true))
+
+(defwidget workspaces []
+ (literal :content ws))
+
+(defwidget sep []
+ (box :orientation "h"
+ :valign "center"
+ (label :class "sepbar" :text "|")))
+
+;; Local Variables:
+;; mode: scheme
+;; compile-command: "eww daemon --restart; eww open bar"
+;; End: