Changed base font for eww
This commit is contained in:
parent
1056c63bca
commit
2f024495b4
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
.root {
|
.root {
|
||||||
color: $foreground;
|
color: $foreground;
|
||||||
font-family: "Source Code Pro";
|
font-family: "Armstrong";
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
background-color: rgba(0, 0, 0, 0);
|
background-color: rgba(0, 0, 0, 0);
|
||||||
// Probably needs to change
|
// Probably needs to change
|
||||||
@ -37,10 +37,10 @@
|
|||||||
background-color: $bg0;
|
background-color: $bg0;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.outline {
|
|
||||||
border: 1px solid $bg1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.outline {
|
||||||
|
border: 1px solid $bg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nebula {
|
.nebula {
|
||||||
|
|||||||
@ -8,11 +8,23 @@
|
|||||||
(box :class "module text"
|
(box :class "module text"
|
||||||
:spacing 0
|
:spacing 0
|
||||||
:orientation "v"
|
:orientation "v"
|
||||||
(label :class "special"
|
(box :orientation "h"
|
||||||
:text "${clock--data.hour}:${clock--data.minute}:${clock--data.second}")
|
: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}")))
|
(label :text "${clock--data.year}-${clock--data.month}-${clock--data.day}")))
|
||||||
|
|
||||||
|
|
||||||
(defwidget sideclock []
|
(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"
|
:onrightclick "echo -n $(date +%s) | wl-copy && eww update clock--show=unixtime && sleep 2 && eww update clock--show=clock"
|
||||||
(overlay
|
(overlay
|
||||||
(box :class "module text nebula"
|
(box :class "module text nebula"
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
(deflisten network--data
|
(deflisten network--data
|
||||||
`~/.config/eww/scripts/network.py`)
|
`~/.config/eww/scripts/network.py`)
|
||||||
|
|
||||||
|
(defvar nebula-armstrong-alignment "-3px")
|
||||||
|
|
||||||
(defvar network--show-details false)
|
(defvar network--show-details false)
|
||||||
|
|
||||||
(defwidget network--interface
|
(defwidget network--interface
|
||||||
@ -269,46 +271,56 @@
|
|||||||
:spacing 10
|
:spacing 10
|
||||||
:width 200
|
:width 200
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(box :halign "start"
|
(transform :translate-y {network--data.have_default_route ? nebula-armstrong-alignment : "0px"}
|
||||||
: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
|
|
||||||
(box :halign "start"
|
(box :halign "start"
|
||||||
:valign "start"
|
:valign "start"
|
||||||
:class "nebula"
|
:class "nebula"
|
||||||
"Address:")
|
"Route On:"))
|
||||||
""
|
""
|
||||||
(box :halign "end"
|
(box :halign "end"
|
||||||
:orientation "v"
|
(label :text "No Route"
|
||||||
(label :text "${network--data.default_interface.addresses[0].address}"
|
:class "nebula highlight"
|
||||||
:class "special")
|
:visible {!network--data.have_default_route})
|
||||||
(label :text "/${network--data.default_interface.addresses[0].prefixlen}"
|
(label :text "${network--data.default_route}"
|
||||||
:halign "end"
|
:class "special"
|
||||||
:class "special")))
|
:visible {network--data.have_default_route})))
|
||||||
(centerbox :orientation "h"
|
(centerbox :orientation "h"
|
||||||
:halign "start"
|
:halign "start"
|
||||||
:spacing 10
|
:spacing 10
|
||||||
:width 200
|
:width 200
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
(transform :translate-y {network--data.online ? nebula-armstrong-alignment : "0px"}
|
||||||
|
(box :halign "start"
|
||||||
|
:valign "start"
|
||||||
|
:class "nebula"
|
||||||
|
"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"
|
(box :halign "start"
|
||||||
:class "nebula"
|
:class "nebula"
|
||||||
"Public IP:")
|
"Public IP:"))
|
||||||
""
|
""
|
||||||
(box :halign "end"
|
(box :halign "end"
|
||||||
(label :text "Offline"
|
(label :text "Offline"
|
||||||
:class "highlight"
|
:class "nebula highlight"
|
||||||
:visible {!network--data.have_public_ip})
|
:visible {!network--data.have_public_ip})
|
||||||
(label :text {network--data.public_ip.ip}
|
(label :text {network--data.public_ip.ip}
|
||||||
:class "special"
|
:class "special"
|
||||||
@ -318,9 +330,10 @@
|
|||||||
:spacing 10
|
:spacing 10
|
||||||
:width 200
|
:width 200
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
(transform :translate-y {network--data.have_gateway ? nebula-armstrong-alignment : "0px"}
|
||||||
(box :halign "start"
|
(box :halign "start"
|
||||||
:class "nebula"
|
:class "nebula"
|
||||||
"Gateway:")
|
"Gateway:"))
|
||||||
""
|
""
|
||||||
(box :halign "end"
|
(box :halign "end"
|
||||||
(label :text "Error"
|
(label :text "Error"
|
||||||
@ -334,12 +347,13 @@
|
|||||||
:spacing 10
|
:spacing 10
|
||||||
:width 200
|
:width 200
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
(transform :translate-y {network--data.wifi.connected ? nebula-armstrong-alignment : "0px"}
|
||||||
(box :halign "start"
|
(box :halign "start"
|
||||||
:class "nebula"
|
:class "nebula"
|
||||||
"Wireless:")
|
"Wireless:"))
|
||||||
""
|
""
|
||||||
(box :halign "end"
|
(box :halign "end"
|
||||||
(label :text "Offline"
|
(label :text "offline"
|
||||||
:class "offline nebula"
|
:class "offline nebula"
|
||||||
:visible {!network--data.wifi.connected})
|
:visible {!network--data.wifi.connected})
|
||||||
(label :text {network--data.wifi.ssid}
|
(label :text {network--data.wifi.ssid}
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
:width 35
|
:width 35
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 10
|
:spacing 10
|
||||||
:class "nebula"
|
:class ""
|
||||||
(label :text "PWR"
|
(label :text "PWR"
|
||||||
:class "special")
|
:class "special")
|
||||||
(box :halign "center"
|
(box :halign "center"
|
||||||
@ -92,7 +92,7 @@
|
|||||||
:start-at 37.5
|
:start-at 37.5
|
||||||
:thickness 2)
|
:thickness 2)
|
||||||
(circular-progress :value {value * 0.75}
|
(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
|
:start-at 37.5
|
||||||
:thickness 2)))
|
:thickness 2)))
|
||||||
|
|
||||||
@ -157,7 +157,7 @@
|
|||||||
:width 35
|
:width 35
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 10
|
:spacing 10
|
||||||
:class "nebula"
|
:class ""
|
||||||
(label :text "MEM"
|
(label :text "MEM"
|
||||||
:class "special")
|
:class "special")
|
||||||
(box :halign "center"
|
(box :halign "center"
|
||||||
@ -200,7 +200,7 @@
|
|||||||
:width 35
|
:width 35
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 10
|
:spacing 10
|
||||||
:class "nebula"
|
:class ""
|
||||||
(label :text "CPU"
|
(label :text "CPU"
|
||||||
:class "special")
|
:class "special")
|
||||||
(box :halign "center"
|
(box :halign "center"
|
||||||
@ -241,7 +241,7 @@
|
|||||||
:width 35
|
:width 35
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 10
|
:spacing 10
|
||||||
:class "nebula"
|
:class ""
|
||||||
(label :text "GPU"
|
(label :text "GPU"
|
||||||
:class "special")
|
:class "special")
|
||||||
(box :halign "center"
|
(box :halign "center"
|
||||||
@ -281,8 +281,8 @@
|
|||||||
:width 35
|
:width 35
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 10
|
:spacing 10
|
||||||
:class "nebula"
|
:class ""
|
||||||
(label :text "VRM"
|
(label :text "VMEM"
|
||||||
:class "special")
|
:class "special")
|
||||||
(box :halign "center"
|
(box :halign "center"
|
||||||
(overlay
|
(overlay
|
||||||
|
|||||||
@ -34,8 +34,8 @@
|
|||||||
:width 35
|
:width 35
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 10
|
:spacing 10
|
||||||
:class "nebula"
|
:class ""
|
||||||
(label :text "aud"
|
(label :text "VOL"
|
||||||
:class "special")
|
:class "special")
|
||||||
(overlay :width 30
|
(overlay :width 30
|
||||||
:height 30
|
:height 30
|
||||||
@ -79,7 +79,7 @@
|
|||||||
:visible {!volume--data["${io}put"].mute}
|
:visible {!volume--data["${io}put"].mute}
|
||||||
(label :text "%"
|
(label :text "%"
|
||||||
:class "invisible")
|
:class "invisible")
|
||||||
(label :text {round(volume--data["${io}put"].volume, 0)}
|
(label :text {volume--data["${io}put"].volume}
|
||||||
:class "special")
|
:class "special")
|
||||||
(label :text "%"
|
(label :text "%"
|
||||||
:class "offline"))
|
:class "offline"))
|
||||||
@ -92,18 +92,6 @@
|
|||||||
:class "offline"))
|
: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 []
|
(defwidget volume-gauges []
|
||||||
(box :orientation "v"
|
(box :orientation "v"
|
||||||
|
|||||||
@ -18,11 +18,11 @@ async def get_values(pulse):
|
|||||||
os.execv(sys.argv[0], sys.argv)
|
os.execv(sys.argv[0], sys.argv)
|
||||||
sink_result = {
|
sink_result = {
|
||||||
"mute": sink.mute == 1,
|
"mute": sink.mute == 1,
|
||||||
"volume": f"{int(sink.volume.value_flat * 100):2}"
|
"volume": int(sink.volume.value_flat * 100 + 0.5)
|
||||||
}
|
}
|
||||||
source_result = {
|
source_result = {
|
||||||
"mute": source.mute == 1,
|
"mute": source.mute == 1,
|
||||||
"volume": f"{int(source.volume.value_flat * 100):2}"
|
"volume": int(source.volume.value_flat * 100 + 0.5)
|
||||||
}
|
}
|
||||||
result = {
|
result = {
|
||||||
"output": sink_result,
|
"output": sink_result,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user