-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheww.yuck
108 lines (88 loc) · 3.04 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
(defwindow TimeWindow
:monitor 0
:geometry (geometry :x "0%"
:y "25%"
:width "8%"
:height "5%"
:anchor "top center")
:stacking "bg"
:windowtype "dialog"
:wm-ignore true
(TimeWidget))
(defwindow VolumeWindow
:monitor 0
:geometry (geometry :x "9%"
:y "25%"
:width "8%"
:height "5%"
:anchor "top center")
:stacking "bg"
:windowtype "dialog"
:wm-ignore true
(VolumeWidget))
(defwindow SystemWindow
:monitor 0
:geometry (geometry :x "-9%"
:y "25%"
:width "8%"
:height "20%"
:anchor "top center")
:stacking "bg"
:windowtype "dialog"
:wm-ignore true
(SystemWidget))
(defwindow WifiWindow
:monitor 0
:geometry (geometry :x "-9%"
:y "46%"
:width "8%"
:height "5%"
:anchor "top center")
:stacking "bg"
:windowtype "dialog"
:wm-ignore true
(WifiWidget))
(defwidget VolumeWidget []
(box :orientation "h" :spacing 4 :space-evenly false :halign "center"
(label :text "Vol:") volume))
(defwidget TimeWidget []
(box :orientation "h" :spacing 4 :space-evenly false :halign "center"
timevalueH timevalueM timevalueS))
(defwidget SystemWidget []
(box :orientation "v"
(box :orientation "h" :spacing 4 :space-evenly false :halign "center"
(label :text "Battery:") battery_status battery_level)
(box :orientation "h" :spacing 4 :space-evenly false :halign "center"
(label :text "RAM:") RAM_usage)
(box :orientation "h" :spacing 4 :space-evenly false :halign "center"
(label :text "CPU:") CPU_usage)))
(defwidget WifiWidget []
(box :orientation "h" :spacing 4 :space-evenly false :halign "center"
(label :text "SSID:") WiFi_SSID))
(defpoll timevalueH
:interval "1s"
`date +%H`)
(defpoll timevalueM
:interval "1s"
`date +%M`)
(defpoll timevalueS
:interval "1s"
`date +%S`)
(defpoll volume
:interval "0.2s"
`awk -F"[][]" '/Left/ { print $2 }' <(amixer sget Master)`)
(defpoll battery_level
:interval "1s"
`cat /sys/class/power_supply/BAT1/capacity`)
(defpoll battery_status
:interval "1s"
`cat /sys/class/power_supply/BAT1/status`)
(defpoll RAM_usage
:interval "1s"
`free -h | grep Mem | awk '{print ($3) * 100 / ($2)}' | awk -F '.' '{print ($1)}'`)
(defpoll CPU_usage
:interval "1s"
`echo "$[100-$(vmstat 1 2|tail -1|awk '{print $15}')]"`)
(defpoll WiFi_SSID
:interval "1s"
`nmcli -t -f active,ssid dev wifi | grep 'yes' | awk -F ':' '{print ($2)}'`)