summaryrefslogtreecommitdiff
path: root/.config/eww/widgets.yuck
blob: 363d778825f00ea697ca28341257ee622f1d94aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
(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)
       (weatherwidget)
       (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 weatherwidget []
    (label
     :class "weather"
     :text "${weather}"))

(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: