a metric butt ton of updates that idk....

This commit is contained in:
Chris Cochrun 2022-12-08 12:15:21 -06:00
parent 972aec6926
commit fc5a0acaec
18 changed files with 486 additions and 405 deletions

View file

@ -1,8 +1,8 @@
(defwindow sidebar
:geometry (geometry :x "0px"
:y "0px"
:y "10px"
:width "1px"
:height "1024"
:height "724"
:anchor "bottom left")
:stacking "fg"
:monitor "0"
@ -10,14 +10,16 @@
(defwidget sidebar []
(eventbox
:halign "start"
:onhover "${EWW_CMD} update side=true"
:onhoverlost "${EWW_CMD} update side=false"
(revealer
:transition "slideright"
:reveal side
:duration "550ms"
(side))))
:class "side_class"
:halign "start"
:onhover "${EWW_CMD} update side=true"
:onhoverlost "${EWW_CMD} update side=false"
(revealer
:transition "slideright"
:reveal side
:duration "250ms"
(side))))
(defvar side false)
;; background
@ -30,7 +32,6 @@
:halign "start"
(fetch)
(top)
(music-side)
(system-side)
(tray))
)
@ -41,53 +42,9 @@
:space-evenly "false"
:spacing "30"
:halign "center"
(date)
(weather))
(date))
)
;; Music Widgets
(defwidget music-side []
(box
:class "music-player"
:orientation "h"
:space-evenly "false"
:spacing 15
:halign "center"
:valign "start"
:hexpand "true"
:width ""
(box
:class "album_art"
:style "background-image: url('${art}');")
(box
:orientation "v"
:space-evenly "false"
:valign "center"
:halign "center"
:spacing 10
(label
:class "song"
:limit-width 15
:text title)
(label
:class "artist"
:limit-width 15
:text artist)
(box
:orientation "h"
:space-evenly "false"
:valign "center"
:halign "center"
:spacing 25
(button :class "btn_prev" :onclick "scripts/music previous" "玲")
(button :class "btn_play" :onclick "scripts/music toggle" playpause)
(button :class "btn_next" :onclick "scripts/music next" "怜")))))
(defpoll art :interval "1s" "scripts/music coverloc")
(defpoll title :interval "1s" "scripts/music title")
(defpoll artist :interval "1s" "scripts/music artist")
(defpoll playpause :interval "1s" "scripts/music statusicon")
;; weather
(defwidget weather []
(box
@ -187,22 +144,22 @@
:value {(EWW_DISK["/"].used / EWW_DISK["/"].total) * 100}
:class "scale"
:width 280))
(box
:class "stats"
:hexpand "false"
:vexpand "false"
:space-evenly "false"
(label
:tooltip "${gpu}%"
:class "stats-icon"
:text "調")
(scale
:min 0
:max 101
:active false
:value gpu
:class "scale"
:width 280))
;; (box
;; :class "stats"
;; :hexpand "false"
;; :vexpand "false"
;; :space-evenly "false"
;; (label
;; :tooltip "${gpu}%"
;; :class "stats-icon"
;; :text "調")
;; (scale
;; :min 0
;; :max 101
;; :active false
;; :value gpu
;; :class "scale"
;; :width 280))
(box
:class "stats"
:hexpand "false"
@ -220,7 +177,7 @@
:value volume_percent
:class "scale"
:width 280
:onchange "amixer sset Master {}%")
:onchange "pamixer --set-volume {}")
)))
(deflisten gpu "scripts/gpu")
@ -237,17 +194,17 @@
:class "poweroff"
:halign "center"
:tooltip "Shut Down"
:onclick "kitty poweroff &" "⏻")
:onclick "alacritty poweroff &" "⏻")
(button
:class "reboot"
:halign "center"
:tooltip "Reboot"
:onclick "kitty reboot &" "")
:onclick "alacritty reboot &" "")
(button
:class "firmware"
:halign "center"
:tooltip "Reboot to EFI"
:onclick "kitty systemctl reboot --firmware &" "拉")
:onclick "alacritty systemctl reboot --firmware &" "拉")
(button
:class "exit"
:halign "center"
@ -257,9 +214,9 @@
:class "restart"
:halign "center"
:tooltip "edit Config"
:onclick "footclient nvim ~/.config/hypr/hyprland.conf &" "")))
:onclick "emacsclient ~/.config/hypr/hyprland.conf &" "")))
(defpoll uptime :interval "1m" "uptime -p | sed -e 's/up //;s/ hours,/h/;s/ minutes/m/'")
(defpoll uptime :interval "1m" "uptime | awk '{print $3}' | sed 's/,//;s/\(.*\):\(.*\)/\1 h \2 m/")
(defpoll packages :interval "5m" `pacman -Q | wc -l`)
(defpoll kernal :interval "5m" `uname -r`)
(defpoll name :interval "5m" `whoami`)
@ -286,10 +243,10 @@
:class "uptime"
:halign "start"
:text " : ${uptime}")
(label
:class "packages"
:halign "start"
:text " : ${packages}")
;; (label
;; :class "packages"
;; :halign "start"
;; :text " : ${packages}")
(label
:class "kernal"
:halign "start"