Redesign Eww bars
This commit is contained in:
31
modules/home/wayland/apps/eww/bar/modules/clock.yuck
Normal file
31
modules/home/wayland/apps/eww/bar/modules/clock.yuck
Normal file
@@ -0,0 +1,31 @@
|
||||
(defvar date_rev false)
|
||||
|
||||
(defwidget clock []
|
||||
(box
|
||||
:class "module datetime"
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update date_rev=true"
|
||||
:onhoverlost "${EWW_CMD} update date_rev=false"
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
(button
|
||||
:class "hour" hour)
|
||||
(button
|
||||
:class "minute" minute))
|
||||
(revealer
|
||||
:reveal date_rev
|
||||
(box
|
||||
:class "date"
|
||||
:orientation "v"
|
||||
(button
|
||||
:onclick "${EWW_CMD} open --toggle calendar"
|
||||
:class "day" day)
|
||||
(button
|
||||
:onclick "${EWW_CMD} open --toggle calendar"
|
||||
:class "month" month)))))))
|
||||
|
||||
(defpoll hour :interval "15s" "date '+%H'")
|
||||
(defpoll minute :interval "15s" "date '+%M'")
|
||||
(defpoll day :interval "15s" "date '+%d'")
|
||||
(defpoll month :interval "15s" "date '+%m'")
|
16
modules/home/wayland/apps/eww/bar/modules/net.yuck
Normal file
16
modules/home/wayland/apps/eww/bar/modules/net.yuck
Normal file
@@ -0,0 +1,16 @@
|
||||
(deflisten net "scripts/net/net")
|
||||
|
||||
(defwidget net []
|
||||
(box
|
||||
:class "module"
|
||||
:orientation "v"
|
||||
(button
|
||||
:class "net"
|
||||
:tooltip {net.name}
|
||||
{net.icon})
|
||||
|
||||
(button
|
||||
:class "blt"
|
||||
(label :class "icon-text" :text "B"))
|
||||
)
|
||||
)
|
38
modules/home/wayland/apps/eww/bar/modules/sys.yuck
Normal file
38
modules/home/wayland/apps/eww/bar/modules/sys.yuck
Normal file
@@ -0,0 +1,38 @@
|
||||
(deflisten cpu "scripts/sys/cpu")
|
||||
(deflisten gpu "scripts/sys/gpu")
|
||||
(deflisten memory "scripts/sys/memory")
|
||||
|
||||
(deflisten battery "scripts/sys/battery")
|
||||
|
||||
(defwidget sys []
|
||||
(box
|
||||
:class "module"
|
||||
:orientation "v"
|
||||
(circular-progress
|
||||
:value {EWW_CPU.avg}
|
||||
:class "cpubar"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "C"))
|
||||
|
||||
(circular-progress
|
||||
:value {gpu.devices[0].GRBM2.CommandProcessor-Graphics.value}
|
||||
:class "gpubar"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "G"))
|
||||
|
||||
(circular-progress
|
||||
:value {memory.percent}
|
||||
:class "membar"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "M"))
|
||||
|
||||
(circular-progress
|
||||
:value {battery.percentage}
|
||||
:class "batbar"
|
||||
:visible {battery.visible}
|
||||
:style "color: ${battery.color};"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "B"))
|
||||
|
||||
)
|
||||
)
|
16
modules/home/wayland/apps/eww/bar/modules/workspaces.yuck
Normal file
16
modules/home/wayland/apps/eww/bar/modules/workspaces.yuck
Normal file
@@ -0,0 +1,16 @@
|
||||
(deflisten workspace "scripts/workspaces")
|
||||
|
||||
(defwidget workspaces []
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||
(box
|
||||
:class "module workspaces"
|
||||
:orientation "v"
|
||||
(for ws in workspace
|
||||
(button
|
||||
:onclick "hyprctl dispatch workspace ${ws.number}"
|
||||
:class "ws icon ${ws.color}"
|
||||
; :tooltip {ws.tooltip}
|
||||
(box
|
||||
:class `${ws.focused ? "focused" : ""}`
|
||||
:height 3))))))
|
Reference in New Issue
Block a user