aboutsummaryrefslogtreecommitdiff
path: root/home/rices/schrottkatze/eww/configDir/bottomBar/bottomBar.yuck
blob: d955d3185fa40d051bbfc2fa20801f65243bdd0c (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
(include "bottomBar/workspaces.yuck")
(include "bottomBar/traveldings.yuck")

(defwindow bottomBar
  :monitor 0
  :stacking "fg"
  :wm-ignore true
  :exclusive true
  :geometry (geometry
              :width "100%"
              :height "33px"
              :anchor "bottom center")
  (bottomBar))

(defwidget bottomBar []
  (overlay
    :class "bottomBar"
    (transform
      :translate-y "1.5px"
      (centerbox
        (box
          :halign "start"
          (workspaceWidget)
        )
        (box
          :halign "center"
          (traveldings)
        )
        (box
          :halign "end"
          ; (label :text "${iceData.speed}km/h")
          (mullvadThing)
        )
      )
    )
    (box
      :class "lesbianFlag"
      :height 1
      ( flagEl :flipped true :color "#D52D00")
      ( flagEl :flipped true :color "#EF7627")
      ( flagEl :flipped true :color "#FF9A56")
      ( flagEl :flipped true :color "#FFFFFF")
      ( flagEl :flipped true :color "#D162A4")
      ( flagEl :flipped true :color "#B55690")
      ( flagEl :flipped true :color "#A30262")
    )
  )
)

(deflisten mullvad
  :initial "{\"state\":\"init\"}"
  `mullvad status -j listen`
)

(defwidget mullvadThing []
  (box
    :class "container"
    (button
      :height 16
      :width 16
      :class "mullvad-state-${mullvad.state}"
    )
  )
)

(defwidget iceTacho []
  (box
    :class "iceTacho"
    :tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
    (label :text "${iceTachoData.speed} km/h")
  )
)

(deflisten iceTachoData
  :initial "null"
  { "~/.config/eww/scripts/iceTacho.nu" }
)