Merge with Coded's config

As we're working on similar things, it makes sense to make a single
config with all our stuff together. We've named our coalition "chimera"
as Coded's devices are named after cat breeds and mine are named after
bird species. We'll be using NixOS options to enable us to have
different configurations anywhere we want that

Co-Authored-By: Samuel Shuert <coded@clicks.codes>
Change-Id: Idb102526d84e76edb0bfe7153bd18dfe8566516b
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/382
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Skyler Grey <minion@clicks.codes>
diff --git a/modules/home/eww/config/eww.yuck b/modules/home/eww/config/eww.yuck
index 598646e..a7695ac 100644
--- a/modules/home/eww/config/eww.yuck
+++ b/modules/home/eww/config/eww.yuck
@@ -9,14 +9,38 @@
   (box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
     (metric :label "🔊"
       :value volume
-    :onchange "amixer -D pulse sset Master {}%")
-    (metric :label "īĄš"
+    :onchange "nix run nixpkgs#pamixer -- --set-volume {}")
+    (radio)
+    (sysinfo)
+  time))
+
+(defwidget radio []
+  (box :class "radio" :orientation "h" :space-evenly false :halign "end"
+    (button :class bluetooth 
+      :onclick { bluetooth == "inactive" ? "bluetoothctl power on" : "bluetoothctl power off"}
+      "īŠ“")
+    (button :class wifi 
+      :onclick { wifi == "disabled" ? "nmcli radio wifi on" : "nmcli radio wifi off"}
+      "🛜")
+  )
+)
+
+(defwidget sysinfo []
+  (box :class "sysinfo"
+    ; (metric :label { battery_status == "Normal" ? "🔋" : "đŸĒĢ" }
+    ;   :value battery_cap
+    ; :onchange "")
+    (metric :label "🐏"
       :value {EWW_RAM.used_mem_perc}
     :onchange "")
     (metric :label "💾"
       :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
     :onchange "")
-  time))
+    (metric :label "🕓"
+      :value cpu_usage_percent
+    :onchange "")
+  )
+)
 
 (defwidget workspaces []
   (box :class "workspaces"
@@ -24,21 +48,24 @@
     :space-evenly true
     :halign "start"
     :spacing 10
-    (button :onclick "wmctrl -s 0" 1)
-    (button :onclick "wmctrl -s 1" 2)
-    (button :onclick "wmctrl -s 2" 3)
-    (button :onclick "wmctrl -s 3" 4)
-    (button :onclick "wmctrl -s 4" 5)
-    (button :onclick "wmctrl -s 5" 6)
-    (button :onclick "wmctrl -s 6" 7)
-    (button :onclick "wmctrl -s 7" 8)
-    (button :onclick "wmctrl -s 8" 9)))
+    (button :onclick "hyprctl dispatch workspace 1" 1)
+    (button :onclick "hyprctl dispatch workspace 2" 2)
+    (button :onclick "hyprctl dispatch workspace 3" 3)
+    (button :onclick "hyprctl dispatch workspace 4" 4)
+    (button :onclick "hyprctl dispatch workspace 5" 5)
+    (button :onclick "hyprctl dispatch workspace 6" 6)
+    (button :onclick "hyprctl dispatch workspace 7" 7)
+    (button :onclick "hyprctl dispatch workspace 8" 8)
+    (button :onclick "hyprctl dispatch workspace 9" 9)
+    (button :onclick "hyprctl dispatch workspace 0" 0)
+  ))
 
 (defwidget music []
   (box :class "music"
     :orientation "h"
     :space-evenly false
     :halign "center"
+    :onclick ""
   {music != "" ? "đŸŽĩ${music}" : ""}))
 
 
@@ -53,18 +80,34 @@
       :value value
     :onchange onchange)))
 
-
-
 (deflisten music :initial ""
-"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
+"nix run nixpkgs#playerctl -- --follow metadata --format '{{ title }}' || true")
+
+(defpoll bluetooth :interval "1s"
+"rfkill -o TYPE,SOFT list -n | grep bluetooth | sed -E 's/bluetooth\s+//g'")
+
+(defpoll wifi :interval "1s"
+"rfkill -o TYPE,SOFT list -n | grep wlan | sed -E 's/wlan\s+//g'")
 
 (defpoll volume :interval "1s"
-"scripts/getvol")
+"nix run nixpkgs#pamixer -- --get-volume")
 
-(defpoll time :interval "10s"
-"date '+%H:%M %b %d, %Y'")
+(defpoll battery_cap :interval "5m"
+"cat /sys/class/power_supply/BAT*/capacity"
+)
 
-(defwindow bar-eDP1
+(defpoll battery_status :interval "1s"
+"cat /sys/class/power_supply/BAT*/status"
+)
+
+(defpoll cpu_usage_percent :interval "5s"
+"bash scripts/cpu_usage"
+)
+
+(defpoll time :interval "1s"
+"date '+%H:%M:%S  %b %d, %Y'")
+
+(defwindow bar-primary
   :monitor 0
   :windowtype "dock"
   :geometry (geometry :x "0%"
@@ -74,25 +117,3 @@
   :anchor "top center")
   :exclusive true
   (bar))
-
-(defwindow bar-HDMI-A-1
-  :monitor 0
-  :windowtype "dock"
-  :geometry (geometry :x "0%"
-    :y "0%"
-    :width "100%"
-    :height "10px"
-  :anchor "top center")
-  :exclusive true
-  (bar))
-
-(defwindow bar-DP7
-  :monitor 0
-  :windowtype "dock"
-  :geometry (geometry :x "0%"
-    :y "0%"
-    :width "100%"
-    :height "10px"
-  :anchor "top center")
-  :exclusive true
-  (bar))
\ No newline at end of file