dotfiles/dotconfig/eww/system_widget/system.yuck

110 lines
2.5 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"
2024-07-20 22:04:00 +02:00
:class "information-box"
2024-03-15 15:05:00 +01:00
(box :class "boxtextcyan"
2024-07-20 22:04:00 +02:00
;:width 223
2024-03-15 15:05:00 +01:00
:halign "fill"
(label :text "${username}@${hostname}")
)
(box
:space-evenly false
:orientation "h"
2024-07-20 22:04:00 +02:00
:class "information"
(box :class "inf-title"
:orientation "v"
2024-08-03 13:18:47 +02:00
:width 90
2024-07-20 22:04:00 +02:00
(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}:")
)
2024-03-15 15:05:00 +01:00
)
2024-07-20 22:04:00 +02:00
(box :class "inf-data"
:orientation "v"
2024-08-03 13:18:47 +02:00
:width 180
2024-07-20 22:04:00 +02:00
(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")
)
2024-03-15 15:05:00 +01:00
)
)
)
)
)
(defwindow system
:monitor 0
:geometry (geometry
2024-07-20 22:04:00 +02:00
:x "8.5%"
:y "10%"
2024-03-15 15:05:00 +01:00
:height "200px"
:anchor "top right")
:stacking "bg"
:exclusive true
:focusable false
:namespaces "system_widget"
(system))