update eww

This commit is contained in:
statzitz 2024-08-03 13:18:47 +02:00
parent 0e273c92a0
commit 2e23d59872
6 changed files with 221 additions and 4 deletions

View file

@ -0,0 +1,112 @@
//Global Styles
.bar {
background: rgba(40, 31, 30, 0.5);
font-size: 14px;
/*padding: 10px;*/
}
.workspaces {
/*padding-top: 2px;
padding-left: 16px;
padding-right: 16px;*/
transition: none;
color: #f8f8f2;
margin-left: 8px;
border-radius: 13px;
background: #362a28;
}
.btw {
padding-top: 6px;
padding-left: 12px;
padding-right: 12px;
}
.active {
padding-top: 6px;
padding-left: 12px;
padding-right: 12px;
color: #ffaa00;
}
.time_box {
padding-top: 2px;
padding-left: 12px;
padding-right: 8px;
transition: none;
color: #ffcc44;
margin-left: 16px;
border-radius: 13px 0px 0px 13px;
background: #362a28;
}
.wifi_box {
padding-top: 2px;
padding-left: 8px;
padding-right: 12px;
transition: none;
color: #bd93f9;
border-radius: 0px 13px 13px 0px;
background: #362a28;
}
.tray {
padding-top: 2px;
padding-left: 12px;
padding-right: 12px;
margin-right: 16px;
transition: none;
color: #bd93f9;
border-radius: 13px 13px 13px 13px;
background: #362a28;
}
// Styles on classes (see eww.yuck for more information)
.left_pane 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;
}

View file

@ -0,0 +1,102 @@
(defwidget bar []
(centerbox :orientation "h"
(right_pane)
(music)
(left_pane)))
(defwidget right_pane []
(box :class "rpane"
:orientation "h"
:space-evenly false
(time_box)
(wifi_box)
(workspaces)
))
(defwidget time_box []
(box
:class "time_box"
(label :text " ${time}"
)))
(defwidget wifi_box []
(box
:class "wifi_box"
(label :text " ${wlan0}"
)))
(defwidget left_pane []
(box :class "left_pane" :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 "")
(systray :class "tray" :orientation "h" :space-evenly true :icon-size "16")
))
(defwidget workspaces []
(box :class "workspaces"
:orientation "h"
:space-evenly false
:halign "start"
(literal :content workspace)
;(for i in workspace
; (button :class "btw" :onclick "hyprctl dispatch workspace ${i}" "${i}"))
))
(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"
"echo 50")
(defpoll time :interval "1s"
"date '+%I:%M:%S %p'")
(defpoll wlan0 :interval "1s"
"get_network")
(defpoll workspace :interval "0.5s"
"get_active_workspace")
(defwindow bar
:monitor 0
:geometry (geometry
:x "0%"
:y "0%"
:width "134%"
:height "30px"
:anchor "top center")
:stacking "bg"
:exclusive true
:focusable false
(bar))

View file

@ -1,7 +1,9 @@
* { * {
all: unset; all: unset;
font-family: '0xproto', FontAwesome, Roboto, Helvetica, Arial, sans-serif;
} }
@import "analog_clock/clock.scss"; @import "analog_clock/clock.scss";
@import "system_widget/system.scss"; @import "system_widget/system.scss";
@import "perf_widget/perf.scss"; @import "perf_widget/perf.scss";
@import "bar_widget/bar.scss";

View file

@ -1,3 +1,4 @@
(include "./analog_clock/clock.yuck") (include "./analog_clock/clock.yuck")
(include "./system_widget/system.yuck") (include "./system_widget/system.yuck")
(include "./perf_widget/perf.yuck") (include "./perf_widget/perf.yuck")
(include "./bar_widget/bar.yuck")

View file

@ -93,7 +93,7 @@
:class "perf_bar")) :class "perf_bar"))
(label (label
:class "perf_label" :class "perf_label"
:text "${cpu_avg} %") :text "${round(cpu_avg,0)} %")
) )
(box (box
:space-evenly true :space-evenly true
@ -261,7 +261,7 @@
) )
) )
(literal :content all_disks) ;(literal :content all_disks)
) )
) )

View file

@ -48,7 +48,7 @@
:class "information" :class "information"
(box :class "inf-title" (box :class "inf-title"
:orientation "v" :orientation "v"
:width 76 :width 90
(box :class "boxtextcyan" (box :class "boxtextcyan"
:halign "fill" :halign "fill"
:hexpand true :hexpand true
@ -72,7 +72,7 @@
) )
(box :class "inf-data" (box :class "inf-data"
:orientation "v" :orientation "v"
:width 150 :width 180
(box :class "boxtextcyan" (box :class "boxtextcyan"
(label :class "white" :text "${systemRunning} ${architechture}") (label :class "white" :text "${systemRunning} ${architechture}")
) )