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

@ -3,13 +3,13 @@
(include "sidebar.yuck")
(include "notifications.yuck")
(defpoll clock_time :interval "5s" "date '+\%l\%M \%p'")
(defpoll clock_time :interval "5s" "date '+\%l:\%M \%p'")
(defpoll clock_date :interval "1h" "date '+%b %d, %Y'")
(defpoll calendar_day :interval "2h" "date '+%d'")
(defpoll calendar_year :interval "2h" "date '+%Y'")
(defpoll volume_percent :interval "1s" "scripts/sbvol --get")
(defpoll mic_percent :interval "3s" "amixer -D pulse sget Capture | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -n 1")
(defpoll brightness_percent :interval "5s" "light")
(defpoll volume_percent :interval "1s" "~/bin/getvol | cut -c 1-2")
(defpoll mic_percent :interval "3s" "pamixer --get-volume --default-source")
(defpoll brightness_percent :interval "5s" "scripts/bright")
(defpoll COL_WLAN :interval "1m" "scripts/wifi --COL")
(defpoll ESSID_WLAN :interval "1m" "scripts/wifi --ESSID")
(defpoll WLAN_ICON :interval "1m" "scripts/wifi --ICON")
@ -26,21 +26,6 @@
;; widgets
(defwidget launcher []
(box
:class "launcher_module"
:orientation "h"
(button
:onclick "rofi -no-lazy-grab -show drun -theme ~/.config/hypr/themes/neon/rofi/launcher.rasi &"
(image
:class "launcher-icon"
:path "favicon.ico"
:image-width 36))
(button
:onclick "rofi -show filebrowser &"
:class "iconsearch" "")
))
(defwidget workspaces []
(literal
:content workspace))
@ -48,32 +33,32 @@
(defwidget appnames []
(eventbox
:onhover "${EWW_CMD} update control_reveal=true"
:onhoverlost "${EWW_CMD} update control_reveal=false"
:onhoverlost "${EWW_CMD} update control_reveal=false"
(box
:orientation "h"
:space-evenly "false"
:vexpand "false"
:hexpand "false"
(literal
:content appname)
(revealer
:transition "slideright"
:reveal control_reveal
:duration "350ms"
(box
:vexpand "false"
:hexpand "false"
:orientation "h"
:space-evenly "false"
(button
:class "app-button"
:onclick "hyprctl dispatch togglefloating 1" "")
(button
:class "app-button"
:onclick "hyprctl dispatch fullscreen 1" "")
(button
:class "app-button"
:onclick "hyprctl dispatch killactive 1" ""))))))
:orientation "h"
:space-evenly "false"
:vexpand "false"
:hexpand "false"
(literal
:content appname)
(revealer
:transition "slideright"
:reveal control_reveal
:duration "250ms"
(box
:vexpand "false"
:hexpand "false"
:orientation "h"
:space-evenly "false"
(button
:class "app-button"
:onclick "hyprctl dispatch togglefloating 1" "")
(button
:class "app-button"
:onclick "hyprctl dispatch fullscreen 1" "")
(button
:class "app-button"
:onclick "hyprctl dispatch killactive 1" ""))))))
(defwidget bright []
(eventbox
@ -86,15 +71,15 @@
:spacing "3"
(revealer
:transition "slideright"
:reveal br_reveal
:duration "350ms"
:reveal br_reveal
:duration "250ms"
(scale :class "brightbar"
:value brightness_percent
:orientation "h"
:tooltip "${brightness_percent}%"
:max 100
:min 0
:onchange "light -S {}" ))
:value brightness_percent
:orientation "h"
:tooltip "${brightness_percent}%"
:max 100
:min 0
:onchange "brightnessctl s {}%" ))
(label
:text ""
:class "bright_icon"
@ -111,41 +96,40 @@
:spacing "3"
(revealer
:transition "slideright"
:reveal vol_reveal
:duration "350ms"
:reveal vol_reveal
:duration "250ms"
(scale
:class "volbar"
:value volume_percent
:orientation "h"
:tooltip "${volume_percent}%"
:max 100
:min 0
:onchange "amixer -D pulse sset Master {}%" ))
:class "volbar"
:value volume_percent
:orientation "h"
:tooltip "${volume_percent}%"
:max 100
:min 0
:onchange "pamixer --set-volume {}" ))
(button
:onclick "scripts/pop audio_ctl"
:class "volume_icon"
"墳"))))
:onclick "scripts/pop audio"
:class "volume_icon"
"墳"))))
(defwidget wifi []
(eventbox
:onhover "${EWW_CMD} update wifi_rev=true"
:onhoverlost "${EWW_CMD} update wifi_rev=false"
(box
:vexpand "false"
:hexpand "false"
:space-evenly "false"
(revealer
:transition "slideright"
:reveal wifi_rev
:duration "350ms"
(label
:class "module_essid"
:text ESSID_WLAN
))
(button
:class "module-wif"
:onclick "networkmanager_dmenu"
WLAN_ICON))))
:onhoverlost "${EWW_CMD} update wifi_rev=false"
(box
:vexpand "false"
:hexpand "false"
:space-evenly "false"
(revealer
:transition "slideright"
:reveal wifi_rev
:duration "250ms"
(label
:class "module_essid"
:text ESSID_WLAN))
(button
:class "module-wif"
:onclick "networkmanager_dmenu"
WLAN_ICON))))
(defwidget bat []
(box
@ -153,13 +137,13 @@
:vexpand "false"
:hexpand "false"
(circular-progress
:value {EWW_BATTERY["BAT0"].capacity}
:value {EWW_BATTERY["BAT1"].capacity}
:class "batbar"
:thickness 4
(button
:onclick "scripts/pop system"
:class "iconbat"
:tooltip "battery on ${EWW_BATTERY["BAT0"].capacity}%"
:tooltip "${EWW_BATTERY["BAT1"].capacity}% battery left"
" "))))
(defwidget mem []
@ -191,7 +175,7 @@
:class "clock_time_class" )
(revealer :transition "slideleft"
:reveal time_rev
:duration "350ms"
:duration "250ms"
(button
:class "clock_date_class"
:onclick "scripts/pop calendar" clock_date)))))
@ -202,7 +186,7 @@
:space-evenly "false"
:orientation "h"
(button
:onclick "if ${EWW_CMD} state | grep 'rightside: false' ; then ${EWW_CMD} update rightside=true ; else ${EWW_CMD} update rightside=false ; fi"
:onclick "if ${EWW_CMD} state | grep 'rightside: false' ; then ${EWW_CMD} update rightside=true ; else ${EWW_CMD} update rightside=false ; fi"
(label
:text ""))))
@ -230,8 +214,6 @@
:space-evenly false
:halign "start"
:class "left_modules"
(launcher)
(sep)
(workspaces)))
(defwidget center []
(box
@ -242,20 +224,19 @@
(appnames)))
(defwidget right []
(box
:orientation "h"
:space-evenly false
:halign "end"
:class "right_modules"
(bright)
(volume)
(wifi)
(sep)
(bat)
(mem)
(sep)
(clock_module)
(notif_button)
))
:orientation "h"
:space-evenly false
:halign "end"
:class "right_modules"
(bright)
(volume)
(wifi)
(sep)
(bat)
(mem)
(sep)
(clock_module)
(notif_button)))
(defwidget bar_layout []
(centerbox
@ -270,9 +251,9 @@
:exclusive true
:geometry (geometry
:x "15px"
:y "10px"
:width "98%"
:height "20px"
:y "3px"
:width "100%"
:height "0px"
:anchor "bottom center")
:stacking "fg"
:windowtype "dock"
@ -336,11 +317,11 @@
:hexpand "false"
(scale
:value volume_percent
:orientation "h"
:onchange "amixer -D pulse sset Master {}%"
:tooltip "volume on ${volume_percent}%"
:max 100
:min 0))))
:orientation "h"
:onchange "amixer -D pulse sset Master {}%"
:tooltip "volume on ${volume_percent}%"
:max 100
:min 0))))
(label
:text "_____________________________________"
:class "audio_sep"
@ -403,7 +384,7 @@
:orientation "h"
:space-evenly "false"
(circular-progress
:value {EWW_BATTERY["BAT0"].capacity}
:value {EWW_BATTERY["BAT1"].capacity}
:class "sys_bat"
:thickness 9
(label :text ""
@ -423,12 +404,12 @@
:limit-width 9
:wrap false)
(label
:text "${EWW_BATTERY["BAT0"].capacity}%"
:text "${EWW_BATTERY["BAT1"].capacity}%"
:halign "start"
:class "sys_text_bat_sub"
:limit-width 22
:wrap false)
(label :text "${EWW_BATTERY["BAT0"].status}"
(label :text "${EWW_BATTERY["BAT1"].status}"
:halign "start"
:class "sys_text_bat_sub"
:limit-width 22
@ -481,13 +462,12 @@
:focusable "false"
:screen 1
:monitor 0
:geometry
(geometry
:x "20"
:y "7%"
:anchor "top right"
:width "290px"
:height "120px")
:geometry (geometry
:x "20"
:y "0"
:anchor "bottom right"
:width "290px"
:height "120px")
(system))
@ -498,19 +478,19 @@
:class "cal"
:orientation "v"
(box
:class "cal-in"
(calendar
:day calendar_day
:year calendar_year))))
:class "cal-in"
(calendar
:day calendar_day
:year calendar_year))))
(defwindow calendar
:stacking "fg"
:focusable "false"
:screen 1
:monitor 0
:geometry (geometry
:x "20"
:y "7%"
:anchor "top right"
:width "270px"
:height "60px")
(cal))
:geometry (geometry
:x "20"
:y "0"
:anchor "bottom right"
:width "270px"
:height "60px")
(cal))