Migrate to snowfall lib
This commit is contained in:
14
modules/home/wayland/apps/eww/windows/calendar.yuck
Executable file
14
modules/home/wayland/apps/eww/windows/calendar.yuck
Executable file
@ -0,0 +1,14 @@
|
||||
(defwidget calendar-win []
|
||||
(box
|
||||
:class "calendar-win"
|
||||
(calendar)))
|
||||
|
||||
(defwindow calendar
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
:anchor "top right"
|
||||
:width "0px"
|
||||
:height "0px")
|
||||
(calendar-win))
|
188
modules/home/wayland/apps/eww/windows/system.yuck
Executable file
188
modules/home/wayland/apps/eww/windows/system.yuck
Executable file
@ -0,0 +1,188 @@
|
||||
(defwidget system-menu []
|
||||
(box
|
||||
:class "system-menu-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(centerbox
|
||||
:class "top-row"
|
||||
(box
|
||||
(label
|
||||
:class "time"
|
||||
:text "${time.hour}:${time.minute}")
|
||||
(box
|
||||
:class "date-box"
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "date"
|
||||
:text {time.date}
|
||||
)
|
||||
(label
|
||||
:class "day"
|
||||
:text {time.day}
|
||||
)
|
||||
)
|
||||
)
|
||||
(label)
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
(button
|
||||
:halign "end"
|
||||
:class "power-button icon"
|
||||
:onclick "wlogout -p layer-shell -c 10 -m 500 &"
|
||||
""
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(centerbox
|
||||
:class "system-row"
|
||||
(box
|
||||
:class "net-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "element icon ${net.class}"
|
||||
(button
|
||||
:class "net-button"
|
||||
:onclick "scripts/net toggle"
|
||||
{net.icon}
|
||||
)
|
||||
)
|
||||
(label
|
||||
:text {net.name}
|
||||
:xalign 0.5
|
||||
:limit-width 15
|
||||
)
|
||||
)
|
||||
|
||||
(box
|
||||
:class "flightmode-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "element"
|
||||
(button
|
||||
:class "flightmode-button"
|
||||
:onclick "scripts/flightmode toggle"
|
||||
flightmode
|
||||
)
|
||||
)
|
||||
(label
|
||||
:text "Flight Mode"
|
||||
:xalign 0.5
|
||||
:limit-width 16
|
||||
)
|
||||
)
|
||||
|
||||
(box
|
||||
:class "powermode-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "element"
|
||||
(button
|
||||
:class "powermode-button"
|
||||
:onclick "scripts/powermode toggle"
|
||||
powermode))
|
||||
(label
|
||||
:text "Power Mode"
|
||||
:xalign 0.5
|
||||
:limit-width 16)))
|
||||
|
||||
(box
|
||||
:class "sliders"
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "volume-slider-box"
|
||||
:space-evenly false
|
||||
(button
|
||||
:class "volume-icon icon"
|
||||
:onclick "scripts/volume mute SINK"
|
||||
{volume.icon})
|
||||
(scale
|
||||
:class "volume-bar"
|
||||
:value {volume.percent}
|
||||
:onchange "scripts/volume setvol SINK {}"))
|
||||
(box
|
||||
:class "brightness-slider-box"
|
||||
:space-evenly false
|
||||
(button
|
||||
:class "brightness-slider-icon icon"
|
||||
{brightness.icon})
|
||||
(scale
|
||||
:class "brightness-bar"
|
||||
:value {brightness.percent}
|
||||
:onchange "brillo -S {}")))
|
||||
|
||||
(box
|
||||
:class "system-info-box"
|
||||
|
||||
; cpu
|
||||
(box
|
||||
:class "sys-box"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
(circular-progress
|
||||
:value "${EWW_CPU.avg}"
|
||||
:class "sys-cpu"
|
||||
:thickness 3
|
||||
(label
|
||||
:text ""
|
||||
:class "sys-icon-cpu icon"))
|
||||
(box
|
||||
:orientation "v"
|
||||
:vexpand false
|
||||
(label
|
||||
:text "CPU"
|
||||
:halign "start"
|
||||
:class "sys-text-cpu")
|
||||
(label
|
||||
:text "${round(EWW_CPU.avg,2)}%"
|
||||
:halign "start"
|
||||
:class "sys-text-sub")
|
||||
(label
|
||||
:text "${EWW_CPU.cores[0].freq} MHz"
|
||||
:halign "start"
|
||||
:class "sys-text-sub")))
|
||||
|
||||
; memory
|
||||
(box
|
||||
:class "sys-box"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
(circular-progress
|
||||
:value {memory.percent}
|
||||
:class "sys-mem"
|
||||
:thickness 3
|
||||
(label
|
||||
:text ""
|
||||
:class "sys-icon-mem icon"))
|
||||
(box
|
||||
:orientation "v"
|
||||
(label
|
||||
:text "RAM"
|
||||
:halign "start"
|
||||
:class "sys-text-mem")
|
||||
(label
|
||||
:text "${memory.used} | ${memory.total}"
|
||||
:halign "start"
|
||||
:class "sys-text-sub"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow system-menu
|
||||
:stacking "fg"
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "0"
|
||||
:y "0"
|
||||
:width "0%"
|
||||
:height "0%"
|
||||
:anchor "right top")
|
||||
(system-menu))
|
Reference in New Issue
Block a user