-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheww.yuck
116 lines (98 loc) · 2.66 KB
/
eww.yuck
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
(include "./modules/eww-tray/network/eww.yuck")
(include "./modules/eww-tray/battery/eww.yuck")
(include "./modules/eww-tray/ram/eww.yuck")
(include "./modules/eww-tray/hdd/eww.yuck")
(include "./modules/eww-tray/volume/eww.yuck")
(include "./modules/eww-settings/metric-indicator/eww.yuck")
(defpoll time :interval "10s"
"date '+%H : %M'")
(defwidget bar []
(centerbox
(workspaces)
(window_w)
(sidestuff)))
(defwidget sidestuff []
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
(systray)
(_hdd)
(_ram)
(_network :strength net)
(_volume :volume volume :muted muted)
(_battery :capacity {EWW_BATTERY["BAT0"].capacity}
:status {EWW_BATTERY["BAT0"].status})
time))
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace")
(defwidget workspaces []
(eventbox :onscroll "bash ~/.config/eww/scripts/change-active-workspace {} ${current_workspace}" :class "workspaces-widget"
(box :class "workspaces"
:space-evenly true
:halign "start"
:spacing 10
(label :text "${workspaces}${current_workspace}" :visible false)
(for workspace in workspaces
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
(box :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}"
(label :text "${workspace.id}")
)
)
)
)
)
)
(deflisten window :initial "..." "sh ~/.config/eww/scripts/get-windows-title")
(defwidget window_w []
(box
(label :text "${window}"
)
)
)
(defwindow bar
:monitor 0
:geometry
(
geometry
:anchor "top center"
:x "0px"
:y "5px"
:width "99.5%"
:height "3%"
)
:stacking "fg"
:exclusive "true"
:focusable "false"
(bar))
; On screen indicators
(defvar show_curbright false)
(defwindow brightness-indicator
:monitor 0
:geometry (
geometry
:anchor "center"
:x "0px"
:y "0px"
:width "0%"
:height "0%"
)
:stacking "fg"
:exclusive "false"
:focusable "false"
(_metric :value curbright :icon " " :show_indicator show_curbright)
)
; On screen indicators
(defvar show_curvolume false)
(defwindow volume-indicator
:monitor 0
:geometry (
geometry
:anchor "center"
:x "0px"
:y "0px"
:width "0%"
:height "0%"
)
:stacking "fg"
:exclusive "false"
:focusable "false"
(_metric :value curvolume :icon " " :show_indicator show_curvolume)
)