Changed base font for eww

This commit is contained in:
Ezri 2025-04-07 12:12:15 -06:00
parent 1056c63bca
commit 2f024495b4
Signed by: ezri
GPG Key ID: 058A78E5680C6F24
6 changed files with 81 additions and 67 deletions

View File

@ -10,7 +10,7 @@
.root {
color: $foreground;
font-family: "Source Code Pro";
font-family: "Armstrong";
font-size: 9pt;
background-color: rgba(0, 0, 0, 0);
// Probably needs to change
@ -23,24 +23,24 @@
margin: 10px;
margin-top: 20px;
margin-right: 0px;
padding-bottom: 26px;
padding-bottom: 26px;
}
&.right-side {
margin: 10px;
margin-top: 20px;
margin-left: 0px;
padding-bottom: 26px;
padding-bottom: 26px;
}
&.bg {
background-color: $bg0;
padding: 10px;
}
}
&.outline {
border: 1px solid $bg1;
}
.outline {
border: 1px solid $bg1;
}
.nebula {
@ -111,7 +111,7 @@
// sway module
.sway--root.sway--vertical {
padding-top: 20px;
padding-top: 20px;
}
.sway--ws {

View File

@ -8,11 +8,23 @@
(box :class "module text"
:spacing 0
:orientation "v"
(label :class "special"
:text "${clock--data.hour}:${clock--data.minute}:${clock--data.second}")
(box :orientation "h"
:spacing -20
:space-evenly true
:class "special"
"${clock--data.hour}"
":"
"${clock--data.minute}"
":"
"${clock--data.second}"
;; (label :class "special"
;; :text "${clock--data.hour}:${clock--data.minute}:${clock--data.second}")
)
(label :text "${clock--data.year}-${clock--data.month}-${clock--data.day}")))
(defwidget sideclock []
(button :onclick "echo -n $(date +%Y-%d-%m) | wl-copy"
(button :onclick "echo -n $(date +%Y-%d-%m) | wl-copy && eww update clock--show=date && sleep 2 && eww update clock--show=clock"
:onrightclick "echo -n $(date +%s) | wl-copy && eww update clock--show=unixtime && sleep 2 && eww update clock--show=clock"
(overlay
(box :class "module text nebula"

View File

@ -1,6 +1,8 @@
;; -*-lisp-*-
(deflisten network--data
`~/.config/eww/scripts/network.py`)
`~/.config/eww/scripts/network.py`)
(defvar nebula-armstrong-alignment "-3px")
(defvar network--show-details false)
@ -269,46 +271,56 @@
:spacing 10
:width 200
:space-evenly false
(box :halign "start"
:class "nebula"
"Route On:")
""
(box :halign "end"
(label :text "No Route"
:class "highlight"
:visible {network--data.online && !network--data.have_default_route})
(label :text "${network--data.default_route}"
:class "special"
:visible {network--data.online && network--data.have_default_route})))
(centerbox :orientation "h"
:halign "start"
:spacing 10
:width 200
:space-evenly false
(transform :translate-y {network--data.have_default_route ? nebula-armstrong-alignment : "0px"}
(box :halign "start"
:valign "start"
:class "nebula"
"Address:")
"Route On:"))
""
(box :halign "end"
:orientation "v"
(label :text "${network--data.default_interface.addresses[0].address}"
:class "special")
(label :text "/${network--data.default_interface.addresses[0].prefixlen}"
:halign "end"
:class "special")))
(label :text "No Route"
:class "nebula highlight"
:visible {!network--data.have_default_route})
(label :text "${network--data.default_route}"
:class "special"
:visible {network--data.have_default_route})))
(centerbox :orientation "h"
:halign "start"
:spacing 10
:width 200
:space-evenly false
(transform :translate-y {network--data.online ? nebula-armstrong-alignment : "0px"}
(box :halign "start"
:valign "start"
:class "nebula"
"Public IP:")
"Address:"))
""
(box :halign "end"
:valign "end"
:orientation "v"
(label :text "${network--data.default_interface.addresses[0].address}"
:class "special"
:visible {network--data.online})
(label :text "offline"
:class "nebula highlight"
:visible {!network--data.online})
(label :text "/${network--data.default_interface.addresses[0].prefixlen}"
:halign "end"
:class "special"
:visible {network--data.online})))
(centerbox :orientation "h"
:halign "start"
:spacing 10
:width 200
:space-evenly false
(transform :translate-y {network--data.have_public_ip ? nebula-armstrong-alignment : "0px"}
(box :halign "start"
:class "nebula"
"Public IP:"))
""
(box :halign "end"
(label :text "Offline"
:class "highlight"
:class "nebula highlight"
:visible {!network--data.have_public_ip})
(label :text {network--data.public_ip.ip}
:class "special"
@ -318,9 +330,10 @@
:spacing 10
:width 200
:space-evenly false
(box :halign "start"
:class "nebula"
"Gateway:")
(transform :translate-y {network--data.have_gateway ? nebula-armstrong-alignment : "0px"}
(box :halign "start"
:class "nebula"
"Gateway:"))
""
(box :halign "end"
(label :text "Error"
@ -334,12 +347,13 @@
:spacing 10
:width 200
:space-evenly false
(box :halign "start"
:class "nebula"
"Wireless:")
(transform :translate-y {network--data.wifi.connected ? nebula-armstrong-alignment : "0px"}
(box :halign "start"
:class "nebula"
"Wireless:"))
""
(box :halign "end"
(label :text "Offline"
(label :text "offline"
:class "offline nebula"
:visible {!network--data.wifi.connected})
(label :text {network--data.wifi.ssid}

View File

@ -18,7 +18,7 @@
:width 35
:space-evenly false
:spacing 10
:class "nebula"
:class ""
(label :text "PWR"
:class "special")
(box :halign "center"
@ -92,7 +92,7 @@
:start-at 37.5
:thickness 2)
(circular-progress :value {value * 0.75}
:class 'gauge ${((invert-threshold ?: false) ? (value < (threshold ?: 20)) : (value > (threshold ?: 80))) ? "highlight" : ((green ?: false) ? "green" : "")}'
:class 'gauge ${(green ?: false) ? "green" : (((invert-threshold ?: false) ? (value < (threshold ?: 20)) : (value > (threshold ?: 80))) ? "highlight" : "")}'
:start-at 37.5
:thickness 2)))
@ -157,7 +157,7 @@
:width 35
:space-evenly false
:spacing 10
:class "nebula"
:class ""
(label :text "MEM"
:class "special")
(box :halign "center"
@ -200,7 +200,7 @@
:width 35
:space-evenly false
:spacing 10
:class "nebula"
:class ""
(label :text "CPU"
:class "special")
(box :halign "center"
@ -241,7 +241,7 @@
:width 35
:space-evenly false
:spacing 10
:class "nebula"
:class ""
(label :text "GPU"
:class "special")
(box :halign "center"
@ -281,8 +281,8 @@
:width 35
:space-evenly false
:spacing 10
:class "nebula"
(label :text "VRM"
:class ""
(label :text "VMEM"
:class "special")
(box :halign "center"
(overlay

View File

@ -34,8 +34,8 @@
:width 35
:space-evenly false
:spacing 10
:class "nebula"
(label :text "aud"
:class ""
(label :text "VOL"
:class "special")
(overlay :width 30
:height 30
@ -79,7 +79,7 @@
:visible {!volume--data["${io}put"].mute}
(label :text "%"
:class "invisible")
(label :text {round(volume--data["${io}put"].volume, 0)}
(label :text {volume--data["${io}put"].volume}
:class "special")
(label :text "%"
:class "offline"))
@ -92,18 +92,6 @@
:class "offline"))
))))))
(defwidget volume--gauge-small [io]
(box :orientation "v"
:halign "center"
:width 35
:space-evenly false
:spacing 10
:class "nebula"
(label :text "CPU"
:class "special")
(box :halign "center"
(overlay
(system--small-gauge :value {system--data.gpu.load * 100})))))
(defwidget volume-gauges []
(box :orientation "v"

View File

@ -18,11 +18,11 @@ async def get_values(pulse):
os.execv(sys.argv[0], sys.argv)
sink_result = {
"mute": sink.mute == 1,
"volume": f"{int(sink.volume.value_flat * 100):2}"
"volume": int(sink.volume.value_flat * 100 + 0.5)
}
source_result = {
"mute": source.mute == 1,
"volume": f"{int(source.volume.value_flat * 100):2}"
"volume": int(source.volume.value_flat * 100 + 0.5)
}
result = {
"output": sink_result,