From 288ccb3984c7cb46b67d0f6bf7fb6d53c5d7a2d3 Mon Sep 17 00:00:00 2001 From: bd Date: Sat, 13 Dec 2025 23:43:10 -0500 Subject: guix: full refactor of configuration structure --- .config/eww/eww.scss | 118 ---------------------------------- .config/eww/eww.yuck | 18 ------ .config/eww/pollers.yuck | 14 ---- .config/eww/scripts/getvol | 9 --- .config/eww/scripts/update_workspaces | 34 ---------- .config/eww/scripts/update_x_names | 33 ---------- .config/eww/widgets.yuck | 92 -------------------------- 7 files changed, 318 deletions(-) delete mode 100644 .config/eww/eww.scss delete mode 100644 .config/eww/eww.yuck delete mode 100644 .config/eww/pollers.yuck delete mode 100755 .config/eww/scripts/getvol delete mode 100755 .config/eww/scripts/update_workspaces delete mode 100755 .config/eww/scripts/update_x_names delete mode 100644 .config/eww/widgets.yuck (limited to '.config/eww') diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss deleted file mode 100644 index 198a00b..0000000 --- a/.config/eww/eww.scss +++ /dev/null @@ -1,118 +0,0 @@ -* -{ - all: unset; -} - -/* separator */ - -.sepbar -{ - color: #D9E0EE; - font-family: Iosevka; - font-size: 12px; - margin-right: 5px; - margin-left: 5px; -} - -/* bar */ -.bar -{ - background-color: rgba(#000B0E, 0.72); -} - -/* time*/ -.time-cpu-mem -{ - margin-right: 15px; -} -.time-label -{ - color: #91d7e3; - font-family: Iosevka; - font-size: 12px; -} - -/* mem cpu */ -.vol -{ - color: #6434ff; - background-color: rgba(#232323, 1.0); - border-radius: 0px; - margin-right: 6px; -} -.mem -{ - color: #ed8dff; - background-color: rgba(#232323, 1.0); - border-radius: 0px; - margin-right: 6px; -} -.cpu -{ - color: #606060; - background-color: rgba(#232323, 1.0); - border-radius: 0px; - margin-right: 6px; -} -.cpu-and-mem -{ - border-radius: 0px; - margin-right: 0px; -} - -/* workspaces */ -.active -{ - color: #ed8dff; -} - -.workspaces -{ - padding-top: 5px; - font-size: 12px; -} - -.mail -{ - color: #ed8dff; - font-family: Iosevka; - font-size: 12px; -} - -.t1 -{ - color: #c6a0f6; - font-family: Iosevka; - font-size: 12px; -} - -.weather -{ - color: #ff5300; - font-family: Iosevka; - font-size: 12px; -} - -.battery -{ - color: #d42ea2; - font-family: Iosevka; - font-size: 12px; -} - -.classes -{ - margin-left: 10px; -} - -.class -{ - margin-right: 10px; - color: #D9E0EE; - padding: 4px; - margin-top: 0px; - border-radius: 0px; - background: rgba(#042429, 0.48); - font-family: Iosevka; - font-size: 12px; -} diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck deleted file mode 100644 index 335a687..0000000 --- a/.config/eww/eww.yuck +++ /dev/null @@ -1,18 +0,0 @@ -(include "pollers.yuck") -(include "widgets.yuck") - -(defwindow bar - :monitor 0 - :windowtype "dock" - :geometry (geometry :x "0%" - :y "0%" - :width "100%" - :height "20px" - :anchor "top center") - :reserve (struts :side "top" :distance "2.3%") - (bar)) - -;; Local Variables: -;; mode: scheme -;; compile-command: "eww daemon --restart; eww open bar" -;; End: diff --git a/.config/eww/pollers.yuck b/.config/eww/pollers.yuck deleted file mode 100644 index c3cdecf..0000000 --- a/.config/eww/pollers.yuck +++ /dev/null @@ -1,14 +0,0 @@ -(defpoll volume :interval "2s" "scripts/getvol") -(defpoll time :interval "30s" "date '+%H:%M'") -(defpoll date :interval "30s" "date '+%b %d'") -(defpoll ws :interval "0.15s" "scripts/update_workspaces") -(defpoll cs :interval "0.15s" "scripts/update_x_names") -(defpoll mail :interval "60s" "$HOME/.local/bin/mail-string") -(defpoll t1 :interval "60s" "$HOME/.local/bin/t1-string") -(defpoll weather :interval "1800s" "$HOME/.local/bin/string-weather") -(defpoll batperc :interval "60s" "echo \"$(cat /sys/class/power_supply/BAT0/capacity)%\"") - -;; Local Variables: -;; mode: scheme -;; compile-command: "eww daemon --restart; eww open bar" -;; End: diff --git a/.config/eww/scripts/getvol b/.config/eww/scripts/getvol deleted file mode 100755 index 9fbe60f..0000000 --- a/.config/eww/scripts/getvol +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -RUNNING_SINK=$(pactl list sinks | awk ' - /^Sink #/ {sink=$2} - /State: RUNNING/ {print sink} -' | head -n1) - -pactl list sinks | grep -A 20 "^Sink $RUNNING_SINK" | grep '^[[:space:]]Volume:' | \ - head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' diff --git a/.config/eww/scripts/update_workspaces b/.config/eww/scripts/update_workspaces deleted file mode 100755 index 4fb1b1c..0000000 --- a/.config/eww/scripts/update_workspaces +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -gib_workspace_names() { - wmctrl -d \ - | awk '{ print $1 " " $2 " " $9 }' \ - | grep -v NSP -} - -gib_workspace_yuck() { - buffered="" - gib_workspace_names | while read -r id active name; do - name="${name#*_}" - if [ "$active" == '*' ]; then - active_class="active" - else - active_class="inactive" - fi - - if wmctrl -l | grep --regexp '.*\s\+'"$id"'\s\+.*' >/dev/null; then - button_class="occupied" - button_name="●" - else - button_class="empty" - button_name="○" - fi - buffered+="(button :class \"$button_class $active_class\" :onclick \"wmctrl -s $id\" \"$button_name\")" - echo -n "$buffered" - buffered="" - done -} - -box_attrs=':orientation "h" :class "workspaces" :space-evenly false :halign "center" :valign "center" :vexpand false :spacing 8 ' - -echo "(box $box_attrs $(gib_workspace_yuck))" diff --git a/.config/eww/scripts/update_x_names b/.config/eww/scripts/update_x_names deleted file mode 100755 index 63117ef..0000000 --- a/.config/eww/scripts/update_x_names +++ /dev/null @@ -1,33 +0,0 @@ -#!/run/current-system/profile/bin/guile \ --s -!# - -(use-modules (ice-9 popen) - (ice-9 textual-ports) - (ice-9 rdelim)) - -(define cmd "wmctrl -l | awk -v ws=\"$(wmctrl -d | awk '$2 == \"*\" {print $1}')\" '$2 == ws {print}' | cut -d ' ' -f 5-") - -(define box-attrs '(:class "classes" - :orientation "h" - :valign "center" - :halign "start" - :space-evenly "false")) - -(define titles - (let* ((process (open-pipe* OPEN_READ "sh" "-c" cmd)) - (output (get-string-all process))) - (close-pipe process) - output)) - -(define labels - (map (lambda (t) `(eventbox - :onclick ,(string-concatenate `("wmctrl -a \"" ,t "\"")) - (label :class "class" - :text ,t - :truncate true - :valign "center"))) - (filter (lambda (s) (not (string=? s ""))) - (string-split titles #\newline)))) - -(write `(box ,@box-attrs ,@labels)) diff --git a/.config/eww/widgets.yuck b/.config/eww/widgets.yuck deleted file mode 100644 index c7ea4d4..0000000 --- a/.config/eww/widgets.yuck +++ /dev/null @@ -1,92 +0,0 @@ -(defwidget bar [] - (box :class "bar" - :orientation "h" - (classeswidget) - (workspaces) - (power-time-cpu-mem))) - -(defwidget power-time-cpu-mem [] - (box :class "time-cpu-mem" - :halign "end" - :valign "center" - :space-evenly "false" - :orientation "h" - (cpu-and-mem) - (sep) - (weatherwidget) - (sep) - (mailwidget) - (sep) - (t1widget) - (sep) - (batterywidget) - (sep) - (label :text "${date}, " - :class "time-label" - :halign "end" - :valign "center" - :tooltip "time") - (label :text time - :class "time-label" - :halign "end" - :valign "center" - :tooltip "time"))) - -(defwidget cpu-and-mem [] - (box :class "cpu-and-mem" - :orientation "h" - :halign "end" - :valign "center" - :space-evenly "false" - (circular-progress :class "vol" - :value volume - :thickness 6) - (circular-progress :class "cpu" - :value {EWW_CPU.avg} - :thickness 6) - (circular-progress :class "mem" - :value {EWW_RAM.used_mem_perc} - :thickness 6))) - -(defwidget batterywidget [] - (label - :class "battery" - :text batperc)) - -(defwidget t1widget [] - (label - :class "t1" - :text "${t1}")) - -(defwidget mailwidget [] - (label - :class "mail" - :text "${mail}")) - -(defwidget weatherwidget [] - (label - :class "weather" - :text "${weather}")) - -(defwidget classeswidget [] - (literal :content cs)) - -(defwidget iconwidget [] - (image - :path "assets/raven.png" - :class "icon" - :image-height 20 - :preserve-aspect-ratio true)) - -(defwidget workspaces [] - (literal :content ws)) - -(defwidget sep [] - (box :orientation "h" - :valign "center" - (label :class "sepbar" :text "|"))) - -;; Local Variables: -;; mode: scheme -;; compile-command: "eww daemon --restart; eww open bar" -;; End: -- cgit v1.2.3