-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheww.yuck
76 lines (74 loc) · 3.06 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
;;Variables
(defpoll hm :interval "60s" :initial "" `date +%H:%M`)
(defpoll sec :interval "1s" :initial "" `date +:%S`)
(defpoll aqi_value :interval "300s" :initial "" `~/.config/eww/script/aqi|cut -d' ' -f1`)
(defpoll aqi :interval "300s" :initial "" `~/.config/eww/script/aqi|cut -d' ' -f1,5`)
(defpoll date :interval "600s" :initial "" `date +'%d/%m'`)
(defpoll weekday :interval "3600s" :initial "" `date +%a`)
(defpoll temperature :interval "10s" :initial "" `echo "$(sensors|grep -i 'Package id'|awk '{print $4}'|cut -c2-)/$(nvidia-smi -q -d TEMPERATURE|grep "GPU Current Temp"|awk '{print $5}')°C"`)
(deflisten workspace_ipc_DP1 "script/ipc 0")
(deflisten workspace_ipc_DP2 "script/ipc 1")
(defvar workspace_eventbox "workspace eventbox")
;; Window bar
(defwindow bar0
:monitor 0
:stacking "fg"
:windowtype "normal"
:exclusive true
:orientation "horizontal"
:focusable false
:geometry (geometry :x "0" :y "0" :width "100%" :height "30px" :anchor "top center")
(box
:class "workspace"
:halign "center"
(literal :valign "center"
:content workspace_ipc_DP1)))
(defwindow bar1
:monitor 1
:stacking "fg"
:windowtype "normal"
:exclusive true
:orientation "horizontal"
:focusable false
:geometry (geometry :x "0" :y "0" :width "100%" :height "15px" :anchor "top center")
(centerbox
:vexpand false
(box
:halign "start"
:space-evenly false
(box
:class "timehm"
(label :text hm))
(box
:class "timesec"
(label :text sec))
(box
:space-evenly false
(label :text weekday :class "weekday"
:style {weekday == "Fri"? "color: yellow;" :
weekday =="Sat"? "color: green;" :
weekday == "Sun"? "color: lightred;": ""})
(label :text date :class "date"))
(box
:class "aqi"
(label :text "${replace(aqi, ' .*', '' )}"
:style {aqi_value <= 50? "color: white; background-color: #009966; border-radius: 5px 5px 5px 5px;":
aqi_value <= 100? "color: black; background-color: #ffde33; border-radius: 5px 5px 5px 5px;":
aqi_value <= 150? "color: black; background-color: #ff9933; border-radius: 5px 5px 5px 5px;":
aqi_value <= 200? "color: white; background-color: #cc0033; border-radius: 5px 5px 5px 5px;":
aqi_value <= 300? "color: white; background-color: #660099; border-radius: 5px 5px 5px 5px;":
"color: white; background-color: #7e0023; border-radius: 5px 5px 5px 5px;"})
(label :text "${replace(aqi, '.* ', '' )}" :class "aqitime")
))
(box
:class "workspace"
:halign "center"
(literal :valign "center"
:content workspace_ipc_DP2))
(box
:class "info"
:space-evenly "false"
:halign "end"
(label :text "MEM:${round(EWW_RAM.used_mem_perc,2)}%" :class "info mem" :style "color: black")
(label :text "CPU/GPU: ${temperature}" :class "info mem" :style "color: black")
)))