aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/eww/eww.yuck
diff options
context:
space:
mode:
Diffstat (limited to 'X11/eww/eww.yuck')
-rw-r--r--X11/eww/eww.yuck310
1 files changed, 310 insertions, 0 deletions
diff --git a/X11/eww/eww.yuck b/X11/eww/eww.yuck
new file mode 100644
index 0000000..8e0f47c
--- /dev/null
+++ b/X11/eww/eww.yuck
@@ -0,0 +1,310 @@
1;; **
2;; ** Widgets config for EWW
3;; ** Created by : @adi1090x
4;; ** Converted by : @tripleo1
5;; **
6
7;; ** Variables ***********************************************************************
8
9;; Profile vars
10(defvar IMAGE "images/profile.jpg")
11(defvar NAME "YOUR NAME")
12(defpoll UNAME :interval "5m" `whoami`)
13
14;; System vars
15(defpoll HOST :interval "5s" `hostname`)
16(defpoll CPU_USAGE :interval "1s" `scripts/sys_info --cpu`)
17(defpoll MEM_USAGE :interval "1s" `scripts/sys_info --mem`)
18(defpoll BLIGHT :interval "1s" `scripts/sys_info --blight`)
19(defpoll BATTERY :interval "5s" `scripts/sys_info --bat`)
20
21;; Time vars
22(defpoll HOUR :interval "5s" `date +\"%I\"`)
23(defpoll MIN :interval "5s" `date +\"%M\"`)
24(defpoll MER :interval "5s" `date +\"%p\"`)
25(defpoll DAY :interval "5s" `date +\"%A\"`)
26
27;; Uptime vars
28(defpoll UPHOUR :interval "5s" `uptime -p | awk '{print $2 \" \" $3}' | sed 's/,//g'`)
29(defpoll UPMIN :interval "5s" `uptime -p | awk '{print $4 \" \" $5}'`)
30
31;; Music vars
32(defpoll SONG :interval "1s" `scripts/music_info --song`)
33(defpoll ARTIST :interval "1s" `scripts/music_info --artist`)
34(defpoll STATUS :interval "1s" `scripts/music_info --status`)
35(defpoll CURRENT :interval "1s" `scripts/music_info --time`)
36(defpoll COVER :interval "1s" `scripts/music_info --cover`)
37(defpoll CTIME :interval "1s" `scripts/music_info --ctime`)
38(defpoll TTIME :interval "1s" `scripts/music_info --ttime`)
39
40;; Weather vars
41(defpoll ICON :interval "15m" `scripts/weather_info --icon`)
42(defpoll STAT :interval "15m" `scripts/weather_info --stat`)
43(defpoll TEMP :interval "15m" `scripts/weather_info --temp`)
44(defpoll HEX :interval "15m" `scripts/weather_info --hex`)
45(defpoll QUOTE :interval "15m" `scripts/weather_info --quote`)
46(defpoll QUOTE2 :interval "15m" `scripts/weather_info --quote2`)
47
48;; Apps vars
49(defpoll MAILS :interval "5m" `scripts/mails`)
50
51;; Files vars
52(defpoll FREE :interval "5s" `df -h / | awk '{print $4}' | tail -n 1 | sed 's/G/GB/'`)
53
54
55;; ** Widgets *************************************************************************
56
57
58;; background
59(defwidget bg []
60 (box :class "bg")
61)
62
63;; profile
64(defwidget user []
65 (box :class "genwin" :orientation "v" :spacing 35 :space-evenly "false" :vexpand "false" :hexpand "false"
66 (box :style "background-image: url('${IMAGE}');" :class "face" :halign "center")
67 (label :class "fullname" :halign "center" :wrap "true" :limit-width 25 :text NAME)
68 (label :class "username" :halign "center" :wrap "true" :limit-width 25 :text UNAME)))
69
70;; system
71(defwidget system []
72 (box :class "genwin" :vexpand "false" :hexpand "false"
73 (box :orientation "v" :spacing 35 :halign "center" :valign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
74 (box :class "cpu_bar" :orientation "h" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
75 (label :class "iconcpu" :text "")
76 (scale :min 0 :max 100 :value CPU_USAGE :active "false"))
77 (box :class "mem_bar" :orientation "h" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
78 (label :class "iconmem" :text "")
79 (scale :min 0 :max 100 :value MEM_USAGE :active "false"))
80 (box :class "bright_bar" :orientation "h" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
81 (label :class "iconbright" :text "")
82 (scale :min 0 :max 100 :value BLIGHT :active "false"))
83 (box :class "bat_bar" :orientation "h" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
84 (label :class "iconbat" :text BATTERY)
85 (scale :min 0 :max 100 :value BATTERY :active "false")))))
86
87;; clock
88(defwidget clock []
89 (box :class "genwin" :orientation "h" :spacing 50 :space-evenly false :vexpand "false" :hexpand "false"
90 (box :orientation "h" :spacing 0
91 (label :class "time_hour" :valign "start" :wrap "true" :limit-width 25 :text HOUR)
92 (label :class "time_min" :valign "end" :wrap "true" :limit-width 25 :text MIN))
93 (box :orientation "v" :spacing 0
94 (label :class "time_mer" :valign "start" :halign "end" :wrap "true" :limit-width 25 :text MER)
95 (label :class "time_day" :valign "end" :halign "end" :wrap "true" :limit-width 25 :text DAY))))
96
97;; uptime
98(defwidget uptime []
99 (box :class "genwin"
100 (box :orientation "h" :halign "center" :spacing 40 :space-evenly "false" :vexpand "false" :hexpand "false"
101 (label :class "icontimer" :valign "center" :text "祥")
102 (box :orientation "v" :valign "center" :spacing 0 :space-evenly "false" :vexpand "false" :hexpand "false"
103 (label :class "uphour" :halign "start" :wrap "true" :limit-width 25 :text UPHOUR)
104 (label :class "upmin" :halign "start" :wrap "true" :limit-width 25 :text UPMIN)))))
105
106;; Music
107(defwidget music []
108 (box :class "genwin" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
109 (box :class "album_art" :vexpand "false" :hexpand "false" :style "background-image: url('${COVER}');")
110 (box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
111 (label :halign "center" :class "song" :wrap "true" :limit-width 20 :text SONG)
112 (label :halign "center" :class "artist" :wrap "true" :limit-width 15 :text ARTIST)
113 (box :orientation "h" :spacing 20 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
114 (button :class "btn_prev" :onclick "scripts/music_info --prev" "玲")
115 (button :class "btn_play" :onclick "scripts/music_info --toggle" STATUS)
116 (button :class "btn_next" :onclick "scripts/music_info --next" "怜"))
117 (box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false"
118 (scale :onscroll "mpc -q seek +1" :min 0 :active "true" :max 100 :value CURRENT)))))
119
120;; github
121(defwidget github []
122 (box :class "github" :vexpand "false" :hexpand "false"
123 (button :class "iconweb" :onclick "scripts/open_links --gh" "")))
124
125;; reddit
126(defwidget reddit []
127 (box :class "reddit" :vexpand "false" :hexpand "false"
128 (button :class "iconweb" :onclick "scripts/open_links --rd" "樓")))
129
130;; twitter
131(defwidget twitter []
132 (box :class "twitter" :vexpand "false" :hexpand "false"
133 (button :class "iconweb" :onclick "scripts/open_links --tw" "")))
134
135;; youtube
136(defwidget youtube []
137 (box :class "youtube" :vexpand "false" :hexpand "false"
138 (button :class "iconweb" :onclick "scripts/open_links --yt" "")))
139
140;; mail
141(defwidget mail []
142 (box :class "mail"
143 (box :orientation "h" :halign "center" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
144 (button :class "iconmail" :onclick "scripts/open_links --mail" "")
145 (box :class "mailbox" :space-evenly "false" :vexpand "false" :hexpand "false"
146 (button :class "label_mails" :onclick "scripts/open_links --mail" MAILS)))))
147
148;; weather
149(defwidget weather []
150 (box :class "genwin"
151 (box :orientation "v" :spacing 10 :space-evenly "false" :vexpand "false" :hexpand "false"
152 (box :orientation "h" :vexpand "false" :hexpand "false"
153 (label :class "iconweather" :halign "start" :style "color: ${HEX};" :text ICON)
154 (label :class "label_temp" :halign "end" :text TEMP))
155 (box :orientation "v" :spacing 10 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
156 (label :class "label_stat" :text STAT)
157 (label :class "label_quote" :text QUOTE)
158 (label :class "label_quote" :text QUOTE2)))))
159
160;; apps
161(defwidget apps []
162 (box :class "genwin" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
163 (box :class "appbox" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
164 (button :style "background-image: url('images/icons/firefox.svg');" :class "app_fox" :onclick "scripts/open_apps --ff")
165 (button :style "background-image: url('images/icons/telegram.svg');" :class "app_telegram" :onclick "scripts/open_apps --tg")
166 (button :style "background-image: url('images/icons/discord.svg');" :class "app_discord" :onclick "scripts/open_apps --dc"))
167 (box :class "appbox" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
168 (button :style "background-image: url('images/icons/terminal.svg');" :class "app_terminal" :onclick "scripts/open_apps --tr")
169 (button :style "background-image: url('images/icons/files.svg');" :class "app_files" :onclick "scripts/open_apps --fm")
170 (button :style "background-image: url('images/icons/geany.svg');" :class "app_geany" :onclick "scripts/open_apps --ge"))
171 (box :class "appbox" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
172 (button :style "background-image: url('images/icons/code.svg');" :class "app_code" :onclick "scripts/open_apps --cd")
173 (button :style "background-image: url('images/icons/gimp.svg');" :class "app_gimp" :onclick "scripts/open_apps --gp")
174 (button :style "background-image: url('images/icons/virtualbox.svg');" :class "app_vbox" :onclick "scripts/open_apps --vb"))))
175
176;; power buttons
177(defwidget logout []
178 (box :class "genwin" :vexpand "false" :hexpand "false"
179 (button :class "btn_logout" :onclick "openbox --exit" "")))
180(defwidget sleep []
181 (box :class "genwin" :vexpand "false" :hexpand "false"
182 (button :class "btn_sleep" :onclick "systemctl suspend" "")))
183(defwidget reboot []
184 (box :class "genwin" :vexpand "false" :hexpand "false"
185 (button :class "btn_reboot" :onclick "systemctl reboot" "")))
186(defwidget poweroff []
187 (box :class "genwin" :vexpand "false" :hexpand "false"
188 (button :class "btn_poweroff" :onclick "systemctl poweroff" "")))
189
190;; folders
191(defwidget folders []
192 (box :class "genwin" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
193 (box :class "hddbox" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
194 (box :space-evenly "false" :vexpand "false" :hexpand "false"
195 (button :class "hddicon" :onclick "scripts/open_apps --fm" "")
196 (label :class "fs_sep" :text "|"))
197 (box :space-evenly "false" :vexpand "false" :hexpand "false"
198 (label :class "hdd_label" :wrap "true" :limit-width 25 :text FREE)))
199 (box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
200 (button :class "iconfolder1" :onclick "scripts/open_folders --docs" "")
201 (button :class "label_folder1" :onclick "scripts/open_folders --docs" "Documents"))
202 (box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
203 (button :class "iconfolder2" :onclick "scripts/open_folders --dl" "")
204 (button :class "label_folder2" :onclick "scripts/open_folders --dl" "Downloads"))
205 (box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
206 (button :class "iconfolder3" :onclick "scripts/open_folders --music" "")
207 (button :class "label_folder3" :onclick "scripts/open_folders --music" "Music"))
208 (box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
209 (button :class "iconfolder4" :onclick "scripts/open_folders --pics" "")
210 (button :class "label_folder4" :onclick "scripts/open_folders --pics" "Pictures"))
211 (box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
212 (button :class "iconfolder5" :onclick "scripts/open_folders --cfg" "ﮛ")
213 (button :class "label_folder5" :onclick "scripts/open_folders --cfg" "~/.config"))
214 (box :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
215 (button :class "iconfolder6" :onclick "scripts/open_folders --local" "ﮛ")
216 (button :class "label_folder6" :onclick "scripts/open_folders --local" "~/.local"))))
217
218
219;; ** Windows *************************************************************************
220
221
222;; background
223(defwindow background :stacking "fg" :focusable "false" :screen 1
224 :geometry (geometry :x 0 :y 0 :width "1920px" :height "1080px")
225 (bg))
226
227;; profile
228(defwindow profile :stacking "fg" :focusable "false" :screen 1
229 :geometry (geometry :x 150 :y 150 :width 350 :height 440)
230 (user))
231
232;; system
233(defwindow system :stacking "fg" :focusable "false" :screen 1
234 :geometry (geometry :x 150 :y 150 :width 350 :height 325)
235 (system))
236
237;; clock
238(defwindow clock :stacking "fg" :focusable "false" :screen 1
239 :geometry (geometry :x 515 :y 150 :width 850 :height 325)
240 (clock))
241
242;; uptime
243(defwindow uptime :stacking "fg" :focusable "false" :screen 1
244 :geometry (geometry :x 1515 :y 320 :width 350 :height 155)
245 (uptime))
246
247;; music
248(defwindow music :stacking "fg" :focusable "false" :screen 1
249 :geometry (geometry :x 515 :y 490 :width 610 :height 280)
250 (music))
251
252;; github
253(defwindow github :stacking "fg" :focusable "false" :screen 1
254 :geometry (geometry :x 515 :y 785 :width 141 :height 145)
255 (github))
256
257;; reddit
258(defwindow reddit :stacking "fg" :focusable "false" :screen 1
259 :geometry (geometry :x 671 :y 785 :width 141 :height 145)
260 (reddit))
261
262;; twitter
263(defwindow twitter :stacking "fg" :focusable "false" :screen 1
264 :geometry (geometry :x 827 :y 785 :width 141 :height 145)
265 (twitter))
266
267;; youtube
268(defwindow youtube :stacking "fg" :focusable "false" :screen 1
269 :geometry (geometry :x 983 :y 785 :width 142 :height 145)
270 (youtube))
271
272;; weather
273(defwindow weather :stacking "fg" :focusable "false" :screen 1
274 :geometry (geometry :x 880 :y 150 :width 550 :height 325)
275 (weather))
276
277;; apps
278(defwindow apps :stacking "fg" :focusable "false" :screen 1
279 :geometry (geometry :x 1140 :y 490 :width 290 :height 280)
280 (apps))
281
282;; mail
283(defwindow mail :stacking "fg" :focusable "false" :screen 1
284 :geometry (geometry :x 1140 :y 785 :width 290 :height 145)
285 (mail))
286
287;; logout
288(defwindow logout :stacking "fg" :focusable "false" :screen 1
289 :geometry (geometry :x 1445 :y 150 :width 155 :height 155)
290 (logout))
291
292;; sleep
293(defwindow sleep :stacking "fg" :focusable "false" :screen 1
294 :geometry (geometry :x 1615 :y 150 :width 155 :height 155)
295 (sleep))
296
297;; reboot
298(defwindow reboot :stacking "fg" :focusable "false" :screen 1
299 :geometry (geometry :x 1445 :y 320 :width 155 :height 155)
300 (reboot))
301
302;; poweroff
303(defwindow poweroff :stacking "fg" :focusable "false" :screen 1
304 :geometry (geometry :x 1615 :y 320 :width 155 :height 155)
305 (poweroff))
306
307;; folders
308(defwindow folders :stacking "fg" :focusable "false" :screen 1
309 :geometry (geometry :x 1445 :y 490 :width 325 :height 440)
310 (folders))