This commit is contained in:
2026-01-04 16:34:14 -05:00
parent 395267f56c
commit 862d02ffb9
2 changed files with 124 additions and 11 deletions

View File

@@ -26,21 +26,36 @@
background-color: rgba(0,0,0,0.25);
}
.clock-box-dash {
padding:10px;
margin: 6px;
border-radius: 8px;
background-color: rgba(0,0,0,0.25);
}
.clock-time {
font-size: 80px;
font-weight: 800;
}
.clock-time-dash {
font-size: 50px;
font-weight: 800;
}
.clock-date {
font-size: 20px;
}
.clock-date-dash {
font-size: 20px;
}
.media {
background-color: rgba(0,0,0,0.25);
padding: 0px;
margin: 5px;
border-radius: 8px;
font-family: "Source Code Pro Black", monospace;
}
.media button {
@@ -60,13 +75,26 @@
}
.tlabel {
font-size: 18px;
font-size: 20px;
font-weight: 800;
padding: 4px;
}
.alabel {
font-size: 14px;
padding: 4px;
}
.notice {
font-size: 10px;
}
.header {
font-size: 20px;
font-weight: 800;
}
.subhead {
font-size: 18px;
font-weight: 400;
}

103
eww.yuck
View File

@@ -37,11 +37,11 @@
(defwidget common-ports []
(box
:orientation "v"
:spacing 4
:spacing 2
:class "ports-box"
(box :orientation "h" :class "ports-header"
(label :text "Port" :hexpand true :halign "start")
(label :text "Protocol" :hexpand true :halign "end"))
(label :text "Port" :hexpand false :halign "start")
(label :text "Protocol" :hexpand false :halign "end"))
(box :orientation "h" (label :text "20" :hexpand true :halign "start") (label :text "FTP" :hexpand true :halign "end"))
(box :orientation "h" (label :text "21" :hexpand true :halign "start") (label :text "FTP Control" :hexpand true :halign "end"))
(box :orientation "h" (label :text "22" :hexpand true :halign "start") (label :text "SSH" :hexpand true :halign "end"))
@@ -60,10 +60,10 @@
(defwindow ports
:monitor 0
:geometry (geometry
:x "32px"
:y "32px"
:x "16px"
:y "16px"
:anchor "top right"
:width "200px"
:width "20px"
)
:stacking "bg"
:exclusive false
@@ -86,6 +86,16 @@
(label :text clock-time :class "clock-time")
(label :text clock-date :class "clock-date")))
(defwidget clock-dash []
(box
:orientation "v"
:spacing 2
:class "clock-box-dash"
(label :text clock-time :class "clock-time-dash")
(label :text clock-date :class "clock-date-dash")
)
)
(defwindow clock
:monitor 0
:geometry (geometry
@@ -108,13 +118,37 @@
| sed 's/^file:\\/\\///' \
| tr -d '\\n'")
(defpoll free_mem :interval "5s"
"free -h | awk '/Mem:/ {print $7}'")
(defpoll used_mem :interval "5s"
"free -h | awk '/Mem:/ {print $3}'")
(defwidget memory []
(box
:orientation "v"
:class "clock-box"
(label :text "Memory" :class "header")
(box
:orientation "h"
(label :text "Free" :class "subhead")
(label :text "Used" :class "subhead")
)
(box
:orientation "h"
(label :text free_mem)
(label :text used_mem)
)
)
)
(defwindow media_popup
:monitor 0
:geometry (geometry
:x "0px"
:y "40px"
:width "550px"
:height "80px"
:width "400px"
:height "50px"
:anchor "top center")
:exclusive false
:focusable false
@@ -127,7 +161,7 @@
:class "media"
:orientation "horizontal"
:space-evenly true
(image :path art :image-width 185 :image-height 185)
(image :path art :image-width 100 :image-height 100)
(box
:orientation "vertical"
(label :text track :class "tlabel")
@@ -142,3 +176,54 @@
)
)
(defwidget media-small [art]
(box
:class "media"
:orientation "vertical"
:space-evenly true
(box :radius 10 :clip true (image :path art :image-width 150 :image-height 150))
(box
:orientation "vertical"
:halign "left"
(label :text track :class "tlabel")
(label :text artist :class "alabel")
(box
(button :onclick "playerctl previous" "⏮")
(button :onclick "playerctl play-pause" "⏯")
(button :onclick "playerctl next" "⏭")
)
)
)
)
(defwindow loading_screen
:monitor 0
:geometry (geometry
:width "100%"
:height "100%"
)
:exclusive false
:focusable false
:stacking "overlay"
(label :text "Loading Hyprland...")
)
(defwindow dashboard
:monitor 0
:stacking "bg"
:geometry (geometry
:width "60%"
:height "40%"
:anchor "center"
)
(box
:orientation "horizontal"
(box
(media-small :art art)
)
(box
(box :orientation "h" (common-ports))
(box :orientation "v" (clock-dash) (memory))
)
)
)