dotfiles/dotconfig/eww/system_widget/system.yuck
2024-08-03 13:18:47 +02:00

109 lines
2.5 KiB
Text

(defpoll hostname :interval "1s"
`hostname`)
(defpoll username :interval "1s"
`whoami`)
(defpoll systemRunning :interval "1s"
`uname -o`)
(defpoll architechture :interval "1s"
`uname -m`)
(defpoll kernel :interval "1s"
`uname -r`)
(defpoll uptime :interval "1s"
`newuptime`)
(defpoll temperature_name :interval "1s"
`echo $(cat /sys/class/thermal/thermal_zone0/type)`)
(defpoll temperature_val :interval "1s"
`echo "scale=1;$(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc`)
(defwidget system []
(box
:space-evenly false
:orientation "h"
:class "system"
(box
:class "profilepicture"
(image :path "/home/primardj/.config/eww/profile.svg" :image-width 145 :image-height 145)
)
(box
:space-evenly false
:orientation "v"
:class "information-box"
(box :class "boxtextcyan"
;:width 223
:halign "fill"
(label :text "${username}@${hostname}")
)
(box
:space-evenly false
:orientation "h"
:class "information"
(box :class "inf-title"
:orientation "v"
:width 90
(box :class "boxtextcyan"
:halign "fill"
:hexpand true
(label :class "cyan" :text "OS:")
)
(box :class "boxtextcyan"
:hexpand true
:halign "fill"
(label :class "cyan" :text "Kernel:")
)
(box :class "boxtextcyan"
:hexpand true
:halign "fill"
(label :class "cyan" :text "Uptime:")
)
(box :class "boxtextcyan"
:hexpand true
:halign "fill"
(label :class "cyan" :text "${temperature_name}:")
)
)
(box :class "inf-data"
:orientation "v"
:width 180
(box :class "boxtextcyan"
(label :class "white" :text "${systemRunning} ${architechture}")
)
(box :class "boxtextcyan"
(label :class "white" :text "${kernel}")
)
(box :class "boxtextcyan"
(label :class "white" :text "${uptime}")
)
(box :class "boxtextcyan"
(label :class "white" :text "${temperature_val}°C")
)
)
)
)
)
)
(defwindow system
:monitor 0
:geometry (geometry
:x "8.5%"
:y "10%"
:height "200px"
:anchor "top right")
:stacking "bg"
:exclusive true
:focusable false
:namespaces "system_widget"
(system))