dotfiles/dotconfig/eww/system_widget/system.yuck

112 lines
2.4 KiB
Text
Raw Normal View History

2024-03-15 15:05:00 +01:00
(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 :class "boxtextcyan"
:halign "fill"
(label :text "${username}@${hostname}")
)
(box
:space-evenly false
:orientation "h"
(box :class "boxtextcyan"
:halign "fill"
:hexpand true
(label :class "cyan" :text "OS:")
)
(box :class "boxtextcyan"
(label :class "white" :text "${systemRunning} ${architechture}")
)
)
(box
:space-evenly false
:orientation "h"
(box :class "boxtextcyan"
:hexpand true
:halign "fill"
(label :class "cyan" :text "Kernel:")
)
(box :class "boxtextcyan"
(label :class "white" :text "${kernel}")
)
)
(box
:space-evenly false
:orientation "h"
(box :class "boxtextcyan"
:hexpand true
:halign "fill"
(label :class "cyan" :text "Uptime:")
)
(box :class "boxtextcyan"
(label :class "white" :text "${uptime}")
)
)
(box
:space-evenly false
:orientation "h"
(box :class "boxtextcyan"
:hexpand true
:halign "fill"
(label :class "cyan" :text "${temperature_name}:")
)
(box :class "boxtextcyan"
(label :class "white" :text "${temperature_val}°C")
)
)
)
)
)
(defwindow system
:monitor 0
:geometry (geometry
:x "5%"
:y "8%"
:height "200px"
:anchor "top right")
:stacking "bg"
:exclusive true
:focusable false
:namespaces "system_widget"
(system))