diff options
Diffstat (limited to 'eww/src')
-rw-r--r-- | eww/src/dashboard.yuck | 7 | ||||
-rw-r--r-- | eww/src/focal/audioSliders.yuck | 47 | ||||
-rw-r--r-- | eww/src/focal/init.yuck | 5 | ||||
-rw-r--r-- | eww/src/focal/widgets.yuck | 22 | ||||
-rw-r--r-- | eww/src/footer/btns.yuck | 33 | ||||
-rw-r--r-- | eww/src/footer/init.yuck | 15 | ||||
-rw-r--r-- | eww/src/header/fetch.yuck | 36 | ||||
-rw-r--r-- | eww/src/header/init.yuck | 12 | ||||
-rw-r--r-- | eww/src/widgets.yuck | 24 |
9 files changed, 201 insertions, 0 deletions
diff --git a/eww/src/dashboard.yuck b/eww/src/dashboard.yuck new file mode 100644 index 0000000..39d7a4d --- /dev/null +++ b/eww/src/dashboard.yuck @@ -0,0 +1,7 @@ +(defwidget dashboard [] + (box :orientation "v" + (header) + (audioSliders) + (focal) + (footer) + )) diff --git a/eww/src/focal/audioSliders.yuck b/eww/src/focal/audioSliders.yuck new file mode 100644 index 0000000..8f4fb50 --- /dev/null +++ b/eww/src/focal/audioSliders.yuck @@ -0,0 +1,47 @@ +(defwidget audioSliders [] + (box :space-evenly false :class 'audioSliders' + + ; Master + (box :orientation 'v' :class 'addPadding' + (label :text '' :class 'audioIcon') + (metric + :class 'masterSlider' + :value master_vol + :onchange "amixer set Master {}%" + :orientation 'v' + :flipped true + ) + ) + + ; Headphone + (box :orientation 'v' :class 'addPadding' + (label :text '' :class 'audioIcon') + (metric + :class 'headphoneSlider' + :value head_vol + :onchange "amixer set Headphone {}%" + :orientation 'v' + :flipped true + )) + + ; Mic + (box :orientation 'v' :class 'addPadding' + (label :text '' :class 'audioIcon') + (metric + :class 'micSlider' + :value mic_vol + :onchange "amixer set Mic {}%" + :orientation 'v' + :flipped true + )) + + (box :orientation 'v' :class 'pkgsBox' + (progressBar + :value battery + :text '' + :class 'battery' + ) + ; package count + (label :text ' ${pkgs} pkgs' :class 'pkgs') + ) + )) diff --git a/eww/src/focal/init.yuck b/eww/src/focal/init.yuck new file mode 100644 index 0000000..e3e5da7 --- /dev/null +++ b/eww/src/focal/init.yuck @@ -0,0 +1,5 @@ +(defwidget focal [] + (box :orientation "v" + (time) + (radialBars) + )) diff --git a/eww/src/focal/widgets.yuck b/eww/src/focal/widgets.yuck new file mode 100644 index 0000000..7f609c0 --- /dev/null +++ b/eww/src/focal/widgets.yuck @@ -0,0 +1,22 @@ +(defwidget time[] + (box :class 'time' + ' ${time} | ${date}') + ) + +(defwidget radialBars[] + (box :class "radialBars" + (progressBar + :value cpu + :text '' + :class 'CPU' + :boxClass 'CPUBOX' + ) + (progressBar + :value ram + :text '' + :class 'RAM' + :boxClass 'RAMBOX' + ) + (button :class 'mute' :onclick 'amixer set Master 0' '' ) + ) +) diff --git a/eww/src/footer/btns.yuck b/eww/src/footer/btns.yuck new file mode 100644 index 0000000..0cb3ade --- /dev/null +++ b/eww/src/footer/btns.yuck @@ -0,0 +1,33 @@ +(defwidget btn [name command class] + (box :orientation "v" + :halign "center" + :class "btnMargin" + (button :onclick command + :class "btn ${class}" + name)) +) + +(defwidget btns [] + (box :orientation "h" + :class 'footerBtns' + + (btn :name "" + :command "rofi -show drun" + :class "restart" + ) + +(btn :name "" + :command "slock" + :class "lock" + ) + + (btn :name wifi + :command "iwgtk" + :class "wifi" + ) + + (btn :name "" + :command "doas zzz" + :class "sleep" + ) +)) diff --git a/eww/src/footer/init.yuck b/eww/src/footer/init.yuck new file mode 100644 index 0000000..d80ea37 --- /dev/null +++ b/eww/src/footer/init.yuck @@ -0,0 +1,15 @@ +(defwidget backlightSlider [] + (metric + :class 'brightness' + :value brightness + :onchange "xbacklight -set {}%" + :orientation 'h' + :flipped false + ) +) + +(defwidget footer [] + (box :orientation "v" + (backlightSlider) + (btns) + )) diff --git a/eww/src/header/fetch.yuck b/eww/src/header/fetch.yuck new file mode 100644 index 0000000..34aa7e1 --- /dev/null +++ b/eww/src/header/fetch.yuck @@ -0,0 +1,36 @@ +(defwidget txt [label] + (box :halign 'start' label )) + +(defwidget title[] + (box :class 'fetchTitles' :orientation 'v' + (txt :label 'os') + (txt :label 'wm') + (txt :label 'sh') +)) + +(defwidget details[] + (box :orientation 'v' + (txt :label os) + (txt :label wm) + (txt :label shell) +)) + +(defwidget hdd[] + (box :orientation 'v' :class 'hdd' + (progressBar + :value disk + :text 'HDD' + :class 'DISK' + ) + ) + ) + +(defwidget fetch[] + (box :class 'fetch' + (box :class 'logo' '' ) + (box :orientation 'h' :class 'fetchContent' :space-evenly false + (title) + (details) + ) + (hdd) +)) diff --git a/eww/src/header/init.yuck b/eww/src/header/init.yuck new file mode 100644 index 0000000..4568dc0 --- /dev/null +++ b/eww/src/header/init.yuck @@ -0,0 +1,12 @@ +(defwidget headerBtns[] + (box :space-evenly false :valign 'end' :halign 'end' :class 'headerBtns' + (button :class 'min' :onclick 'eww close eww' '') + (button :class 'close' :onclick 'eww kill' '') + ) + ) + +(defwidget header[] + (box :orientation 'v' :space-evenly false + (headerBtns) + (fetch) +)) diff --git a/eww/src/widgets.yuck b/eww/src/widgets.yuck new file mode 100644 index 0000000..f299ed9 --- /dev/null +++ b/eww/src/widgets.yuck @@ -0,0 +1,24 @@ +; radial progress bar +(defwidget progressBar [value text class ?boxClass] + (box :class boxClass + (circular-progress :class class + :value value + :thickness 5 + text + ) + ) +) + +; slider +(defwidget metric [class value ?onchange orientation flipped ] + (box :class class :orientation orientation :space-evenly true + (scale + :min 0 + :max 101 + :active {onchange != ""} + :value value + :onchange onchange + :orientation orientation + :flipped flipped + ) +)) |