From fa21a9cc7e2328bf53fe665bf72b607f9c680c58 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sat, 2 Sep 2023 16:15:05 +0400 Subject: [PATCH] i havent configured this yet --- config/eww/eww-bar.png | Bin 0 -> 6286 bytes config/eww/eww.scss | 55 ++++++++++++++++++++++++++++ config/eww/eww.yuck | 75 ++++++++++++++++++++++++++++++++++++++ config/eww/scripts/getvol | 12 ++++++ 4 files changed, 142 insertions(+) create mode 100644 config/eww/eww-bar.png create mode 100644 config/eww/eww.scss create mode 100644 config/eww/eww.yuck create mode 100755 config/eww/scripts/getvol diff --git a/config/eww/eww-bar.png b/config/eww/eww-bar.png new file mode 100644 index 0000000000000000000000000000000000000000..e6de6a881bfe2907276306821e127cc785e046d6 GIT binary patch literal 6286 zcmc(Dg;N~Cx9&n9xH|-g5Q38|5}aM!bqOwk1lPqS!CeyE-DPnLt_kiCG`O?4!`r-D zzgzG90k>{f%}h&8&-CeYzVGW3rm8H1gGq@A00400WWnkH0ID{k{u=!y;?Bj`=>hHc<#1Z?JQPO;cI^3-piJ=_NjvF$M$l= zt4Lo8F8wUINO}pbs*V*y5n$wE3+W!SIOo!K%r6J*X$)*$6yN6ewHQGj%3S>0v$R2w@5|qEmV?gJS*{wW4$%t8vMqkPC^d5 z!(Kf#h|*T~{RAGewYK5mZVH-sMm7GS;QZ{$K!OXff~89}2LMt| z1LMjWNNkWDQI?Z8T!v~+tzUUycq^6)%;&%FR0sCPSknckhLxmfIb$hU7s$_8)oWL= zbOFgA{8h&^nJbc#J-NX$U}=T^kF#~4CqwTdQ))SM(F+L;3y^?%+7rdBqmp9L&I$ zP}`}rWjv>jk&4c_=l&?a5PiYjCp0Jh#E0G^Dy!P%Em=Fs9b%d+!y1*h!^zgcSL%=% zGtPlbEK8fCSItf~lv;d^zYS7yW@1fv@A_ zw%#S{?I?yt8Q|HFo>xlM4K%@K3U#To9K4yCv1=KB#rWM$ zKWe<5^lE0yWNz3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^v*qB0pfB}ykRy>zLo!@s}Re)xQWvNYs=F&Z7v_4eQ4-zz&hjF!q<_u#@hc zkO=Pom)ua_AjU_`{a=MO^S literal 0 HcmV?d00001 diff --git a/config/eww/eww.scss b/config/eww/eww.scss new file mode 100644 index 00000000..efa2a502 --- /dev/null +++ b/config/eww/eww.scss @@ -0,0 +1,55 @@ +* { + all: unset; //Unsets everything so you can style everything from scratch +} + +//Global Styles +.bar { + background-color: #3a3a3a; + color: #b0b4bc; + padding: 10px; +} + +// Styles on classes (see eww.yuck for more information) + +.sidestuff slider { + all: unset; + color: #ffd5cd; +} + +.metric scale trough highlight { + all: unset; + background-color: #D35D6E; + color: #000000; + border-radius: 10px; +} +.metric scale trough { + all: unset; + background-color: #4e4e4e; + border-radius: 50px; + min-height: 3px; + min-width: 50px; + margin-left: 10px; + margin-right: 20px; +} +.metric scale trough highlight { + all: unset; + background-color: #D35D6E; + color: #000000; + border-radius: 10px; +} +.metric scale trough { + all: unset; + background-color: #4e4e4e; + border-radius: 50px; + min-height: 3px; + min-width: 50px; + margin-left: 10px; + margin-right: 20px; +} +.label-ram { + font-size: large; +} +.workspaces button:hover { + color: #D35D6E; +} + diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck new file mode 100644 index 00000000..a4a27d2c --- /dev/null +++ b/config/eww/eww.yuck @@ -0,0 +1,75 @@ +(defwidget bar [] + (centerbox :orientation "h" + (workspaces) + (music) + (sidestuff))) + +(defwidget sidestuff [] + (box :class "sidestuff" :orientation "h" :space-evenly false :halign "end" + (metric :label "🔊" + :value volume + :onchange "amixer -D pulse sset Master {}%") + (metric :label "" + :value {EWW_RAM.used_mem_perc} + :onchange "") + (metric :label "💾" + :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} + :onchange "") + time)) + +(defwidget workspaces [] + (box :class "workspaces" + :orientation "h" + :space-evenly true + :halign "start" + :spacing 10 + (button :onclick "wmctrl -s 0" 1) + (button :onclick "wmctrl -s 1" 2) + (button :onclick "wmctrl -s 2" 3) + (button :onclick "wmctrl -s 3" 4) + (button :onclick "wmctrl -s 4" 5) + (button :onclick "wmctrl -s 5" 6) + (button :onclick "wmctrl -s 6" 7) + (button :onclick "wmctrl -s 7" 8) + (button :onclick "wmctrl -s 8" 9))) + +(defwidget music [] + (box :class "music" + :orientation "h" + :space-evenly false + :halign "center" + {music != "" ? "🎵${music}" : ""})) + + +(defwidget metric [label value onchange] + (box :orientation "h" + :class "metric" + :space-evenly false + (box :class "label" label) + (scale :min 0 + :max 101 + :active {onchange != ""} + :value value + :onchange onchange))) + + + +(deflisten music :initial "" + "playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true") + +(defpoll volume :interval "1s" + "scripts/getvol") + +(defpoll time :interval "10s" + "date '+%H:%M %b %d, %Y'") + +(defwindow bar + :monitor 0 + :windowtype "dock" + :geometry (geometry :x "0%" + :y "0%" + :width "90%" + :height "10px" + :anchor "top center") + :reserve (struts :side "top" :distance "4%") + (bar)) diff --git a/config/eww/scripts/getvol b/config/eww/scripts/getvol new file mode 100755 index 00000000..4e4275d8 --- /dev/null +++ b/config/eww/scripts/getvol @@ -0,0 +1,12 @@ +#!/bin/sh + +if command -v pamixer &>/dev/null; then + if [ true == $(pamixer --get-mute) ]; then + echo 0 + exit + else + pamixer --get-volume + fi +else + amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}' +fi