blob: 8e0f47c19ccfa612cc2f9b1273fad18907488351 (
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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
|
;; **
;; ** Widgets config for EWW
;; ** Created by : @adi1090x
;; ** Converted by : @tripleo1
;; **
;; ** Variables ***********************************************************************
;; Profile vars
(defvar IMAGE "images/profile.jpg")
(defvar NAME "YOUR NAME")
(defpoll UNAME :interval "5m" `whoami`)
;; System vars
(defpoll HOST :interval "5s" `hostname`)
(defpoll CPU_USAGE :interval "1s" `scripts/sys_info --cpu`)
(defpoll MEM_USAGE :interval "1s" `scripts/sys_info --mem`)
(defpoll BLIGHT :interval "1s" `scripts/sys_info --blight`)
(defpoll BATTERY :interval "5s" `scripts/sys_info --bat`)
;; Time vars
(defpoll HOUR :interval "5s" `date +\"%I\"`)
(defpoll MIN :interval "5s" `date +\"%M\"`)
(defpoll MER :interval "5s" `date +\"%p\"`)
(defpoll DAY :interval "5s" `date +\"%A\"`)
;; Uptime vars
(defpoll UPHOUR :interval "5s" `uptime -p | awk '{print $2 \" \" $3}' | sed 's/,//g'`)
(defpoll UPMIN :interval "5s" `uptime -p | awk '{print $4 \" \" $5}'`)
;; Music vars
(defpoll SONG :interval "1s" `scripts/music_info --song`)
(defpoll ARTIST :interval "1s" `scripts/music_info --artist`)
(defpoll STATUS :interval "1s" `scripts/music_info --status`)
(defpoll CURRENT :interval "1s" `scripts/music_info --time`)
(defpoll COVER :interval "1s" `scripts/music_info --cover`)
(defpoll CTIME :interval "1s" `scripts/music_info --ctime`)
(defpoll TTIME :interval "1s" `scripts/music_info --ttime`)
;; Weather vars
(defpoll ICON :interval "15m" `scripts/weather_info --icon`)
(defpoll STAT :interval "15m" `scripts/weather_info --stat`)
(defpoll TEMP :interval "15m" `scripts/weather_info --temp`)
(defpoll HEX :interval "15m" `scripts/weather_info --hex`)
(defpoll QUOTE :interval "15m" `scripts/weather_info --quote`)
(defpoll QUOTE2 :interval "15m" `scripts/weather_info --quote2`)
;; Apps vars
(defpoll MAILS :interval "5m" `scripts/mails`)
;; Files vars
(defpoll FREE :interval "5s" `df -h / | awk '{print $4}' | tail -n 1 | sed 's/G/GB/'`)
;; ** Widgets *************************************************************************
;; background
(defwidget bg []
(box :class "bg")
)
;; profile
(defwidget user []
(box :class "genwin" :orientation "v" :spacing 35 :space-evenly "false" :vexpand "false" :hexpand "false"
(box :style "background-image: url('${IMAGE}');" :class "face" :halign "center")
(label :class "fullname" :halign "center" :wrap "true" :limit-width 25 :text NAME)
(label :class "username" :halign "center" :wrap "true" :limit-width 25 :text UNAME)))
;; system
(defwidget system []
(box :class "genwin" :vexpand "false" :hexpand "false"
(box :orientation "v" :spacing 35 :halign "center" :valign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
(box :class "cpu_bar" :orientation "h" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "iconcpu" :text "")
(scale :min 0 :max 100 :value CPU_USAGE :active "false"))
(box :class "mem_bar" :orientation "h" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "iconmem" :text "")
(scale :min 0 :max 100 :value MEM_USAGE :active "false"))
(box :class "bright_bar" :orientation "h" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "iconbright" :text "")
(scale :min 0 :max 100 :value BLIGHT :active "false"))
(box :class "bat_bar" :orientation "h" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "iconbat" :text BATTERY)
(scale :min 0 :max 100 :value BATTERY :active "false")))))
;; clock
(defwidget clock []
(box :class "genwin" :orientation "h" :spacing 50 :space-evenly false :vexpand "false" :hexpand "false"
(box :orientation "h" :spacing 0
(label :class "time_hour" :valign "start" :wrap "true" :limit-width 25 :text HOUR)
(label :class "time_min" :valign "end" :wrap "true" :limit-width 25 :text MIN))
(box :orientation "v" :spacing 0
(label :class "time_mer" :valign "start" :halign "end" :wrap "true" :limit-width 25 :text MER)
(label :class "time_day" :valign "end" :halign "end" :wrap "true" :limit-width 25 :text DAY))))
;; uptime
(defwidget uptime []
(box :class "genwin"
(box :orientation "h" :halign "center" :spacing 40 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "icontimer" :valign "center" :text "祥")
(box :orientation "v" :valign "center" :spacing 0 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "uphour" :halign "start" :wrap "true" :limit-width 25 :text UPHOUR)
(label :class "upmin" :halign "start" :wrap "true" :limit-width 25 :text UPMIN)))))
;; Music
(defwidget music []
(box :class "genwin" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(box :class "album_art" :vexpand "false" :hexpand "false" :style "background-image: url('${COVER}');")
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :halign "center" :class "song" :wrap "true" :limit-width 20 :text SONG)
(label :halign "center" :class "artist" :wrap "true" :limit-width 15 :text ARTIST)
(box :orientation "h" :spacing 20 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
(button :class "btn_prev" :onclick "scripts/music_info --prev" "玲")
(button :class "btn_play" :onclick "scripts/music_info --toggle" STATUS)
(button :class "btn_next" :onclick "scripts/music_info --next" "怜"))
(box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false"
(scale :onscroll "mpc -q seek +1" :min 0 :active "true" :max 100 :value CURRENT)))))
;; github
(defwidget github []
(box :class "github" :vexpand "false" :hexpand "false"
(button :class "iconweb" :onclick "scripts/open_links --gh" "")))
;; reddit
(defwidget reddit []
(box :class "reddit" :vexpand "false" :hexpand "false"
(button :class "iconweb" :onclick "scripts/open_links --rd" "樓")))
;; twitter
(defwidget twitter []
(box :class "twitter" :vexpand "false" :hexpand "false"
(button :class "iconweb" :onclick "scripts/open_links --tw" "")))
;; youtube
(defwidget youtube []
(box :class "youtube" :vexpand "false" :hexpand "false"
(button :class "iconweb" :onclick "scripts/open_links --yt" "")))
;; mail
(defwidget mail []
(box :class "mail"
(box :orientation "h" :halign "center" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "iconmail" :onclick "scripts/open_links --mail" "")
(box :class "mailbox" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "label_mails" :onclick "scripts/open_links --mail" MAILS)))))
;; weather
(defwidget weather []
(box :class "genwin"
(box :orientation "v" :spacing 10 :space-evenly "false" :vexpand "false" :hexpand "false"
(box :orientation "h" :vexpand "false" :hexpand "false"
(label :class "iconweather" :halign "start" :style "color: ${HEX};" :text ICON)
(label :class "label_temp" :halign "end" :text TEMP))
(box :orientation "v" :spacing 10 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "label_stat" :text STAT)
(label :class "label_quote" :text QUOTE)
(label :class "label_quote" :text QUOTE2)))))
;; apps
(defwidget apps []
(box :class "genwin" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
(box :class "appbox" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :style "background-image: url('images/icons/firefox.svg');" :class "app_fox" :onclick "scripts/open_apps --ff")
(button :style "background-image: url('images/icons/telegram.svg');" :class "app_telegram" :onclick "scripts/open_apps --tg")
(button :style "background-image: url('images/icons/discord.svg');" :class "app_discord" :onclick "scripts/open_apps --dc"))
(box :class "appbox" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :style "background-image: url('images/icons/terminal.svg');" :class "app_terminal" :onclick "scripts/open_apps --tr")
(button :style "background-image: url('images/icons/files.svg');" :class "app_files" :onclick "scripts/open_apps --fm")
(button :style "background-image: url('images/icons/geany.svg');" :class "app_geany" :onclick "scripts/open_apps --ge"))
(box :class "appbox" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :style "background-image: url('images/icons/code.svg');" :class "app_code" :onclick "scripts/open_apps --cd")
(button :style "background-image: url('images/icons/gimp.svg');" :class "app_gimp" :onclick "scripts/open_apps --gp")
(button :style "background-image: url('images/icons/virtualbox.svg');" :class "app_vbox" :onclick "scripts/open_apps --vb"))))
;; power buttons
(defwidget logout []
(box :class "genwin" :vexpand "false" :hexpand "false"
(button :class "btn_logout" :onclick "openbox --exit" "")))
(defwidget sleep []
(box :class "genwin" :vexpand "false" :hexpand "false"
(button :class "btn_sleep" :onclick "systemctl suspend" "")))
(defwidget reboot []
(box :class "genwin" :vexpand "false" :hexpand "false"
(button :class "btn_reboot" :onclick "systemctl reboot" "")))
(defwidget poweroff []
(box :class "genwin" :vexpand "false" :hexpand "false"
(button :class "btn_poweroff" :onclick "systemctl poweroff" "")))
;; folders
(defwidget folders []
(box :class "genwin" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
(box :class "hddbox" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(box :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "hddicon" :onclick "scripts/open_apps --fm" "")
(label :class "fs_sep" :text "|"))
(box :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "hdd_label" :wrap "true" :limit-width 25 :text FREE)))
(box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "iconfolder1" :onclick "scripts/open_folders --docs" "")
(button :class "label_folder1" :onclick "scripts/open_folders --docs" "Documents"))
(box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "iconfolder2" :onclick "scripts/open_folders --dl" "")
(button :class "label_folder2" :onclick "scripts/open_folders --dl" "Downloads"))
(box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "iconfolder3" :onclick "scripts/open_folders --music" "")
(button :class "label_folder3" :onclick "scripts/open_folders --music" "Music"))
(box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "iconfolder4" :onclick "scripts/open_folders --pics" "")
(button :class "label_folder4" :onclick "scripts/open_folders --pics" "Pictures"))
(box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "iconfolder5" :onclick "scripts/open_folders --cfg" "ﮛ")
(button :class "label_folder5" :onclick "scripts/open_folders --cfg" "~/.config"))
(box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
(button :class "iconfolder6" :onclick "scripts/open_folders --local" "ﮛ")
(button :class "label_folder6" :onclick "scripts/open_folders --local" "~/.local"))))
;; ** Windows *************************************************************************
;; background
(defwindow background :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 0 :y 0 :width "1920px" :height "1080px")
(bg))
;; profile
(defwindow profile :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 150 :y 150 :width 350 :height 440)
(user))
;; system
(defwindow system :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 150 :y 150 :width 350 :height 325)
(system))
;; clock
(defwindow clock :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 515 :y 150 :width 850 :height 325)
(clock))
;; uptime
(defwindow uptime :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 1515 :y 320 :width 350 :height 155)
(uptime))
;; music
(defwindow music :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 515 :y 490 :width 610 :height 280)
(music))
;; github
(defwindow github :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 515 :y 785 :width 141 :height 145)
(github))
;; reddit
(defwindow reddit :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 671 :y 785 :width 141 :height 145)
(reddit))
;; twitter
(defwindow twitter :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 827 :y 785 :width 141 :height 145)
(twitter))
;; youtube
(defwindow youtube :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 983 :y 785 :width 142 :height 145)
(youtube))
;; weather
(defwindow weather :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 880 :y 150 :width 550 :height 325)
(weather))
;; apps
(defwindow apps :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 1140 :y 490 :width 290 :height 280)
(apps))
;; mail
(defwindow mail :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 1140 :y 785 :width 290 :height 145)
(mail))
;; logout
(defwindow logout :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 1445 :y 150 :width 155 :height 155)
(logout))
;; sleep
(defwindow sleep :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 1615 :y 150 :width 155 :height 155)
(sleep))
;; reboot
(defwindow reboot :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 1445 :y 320 :width 155 :height 155)
(reboot))
;; poweroff
(defwindow poweroff :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 1615 :y 320 :width 155 :height 155)
(poweroff))
;; folders
(defwindow folders :stacking "fg" :focusable "false" :screen 1
:geometry (geometry :x 1445 :y 490 :width 325 :height 440)
(folders))
|