Give EWW scripts proper extensions

This commit is contained in:
Michael Bradley 2025-06-22 14:25:02 -04:00
parent 448bdfc231
commit 287df92d65
Signed by: MichaelBradley
SSH key fingerprint: SHA256:BKO2eI2LPsCbQS3n3i5SdwZTAIV3F1lHezR07qP+Ob0
13 changed files with 11 additions and 11 deletions

View file

@ -16,7 +16,7 @@
(label :text " " :class "space")) (label :text " " :class "space"))
(deflisten workspaces :initial "[]" "~/.config/eww/scripts/get-workspaces") (deflisten workspaces :initial "[]" "~/.config/eww/scripts/get-workspaces.sh")
(defwidget workspaces [monitor ?all] (defwidget workspaces [monitor ?all]
(box :space-evenly false :class "workspaces" (box :space-evenly false :class "workspaces"
(for workspace in workspaces (for workspace in workspaces
@ -24,20 +24,20 @@
(label :text {workspace.name}))))) (label :text {workspace.name})))))
(deflisten window :initial "..." "~/.config/eww/scripts/get-window-title") (deflisten window :initial "..." "~/.config/eww/scripts/get-window-title.sh")
(defwidget window [] (defwidget window []
(box (box
(label :text {window ?: ""}))) (label :text {window ?: ""})))
(deflisten audio :initial "--" "~/.config/eww/scripts/get-audio") (deflisten audio :initial "--" "~/.config/eww/scripts/get-audio.sh")
(defwidget volume [] (defwidget volume []
(eventbox :cursor {audio.muted ? "pointer" : "row-resize"} :onscroll "~/.config/eww/scripts/adjust-volume {}" :onclick "pactl set-sink-mute @DEFAULT_SINK@ toggle" (eventbox :cursor {audio.muted ? "pointer" : "row-resize"} :onscroll "~/.config/eww/scripts/adjust-volume.sh {}" :onclick "pactl set-sink-mute @DEFAULT_SINK@ toggle"
(label_value :text {audio.muted ? "󰝟" : "󰕾"} :value "${audio.volume}%" :value_class {audio.muted ? "muted" : ""}))) (label_value :text {audio.muted ? "󰝟" : "󰕾"} :value "${audio.volume}%" :value_class {audio.muted ? "muted" : ""})))
(defwidget audio_source [] (defwidget audio_source []
(eventbox :onclick "~/.config/eww/scripts/swap-audio-source" :cursor "pointer" (eventbox :onclick "~/.config/eww/scripts/swap-audio-source.sh" :cursor "pointer"
(label :text {audio.source} :class "audio-info"))) (label :text {audio.source} :class "audio-info")))
(defwidget audio_sink [] (defwidget audio_sink []
(eventbox :onclick "~/.config/eww/scripts/swap-audio-sink" :cursor "pointer" (eventbox :onclick "~/.config/eww/scripts/swap-audio-sink.sh" :cursor "pointer"
(label :text {audio.sink} :class "audio-info"))) (label :text {audio.sink} :class "audio-info")))
@ -53,7 +53,7 @@
(label_circle :text "" :value {EWW_CPU.avg})) (label_circle :text "" :value {EWW_CPU.avg}))
(defvar combined_interface true) (defvar combined_interface true)
(deflisten interfaces :initial '{}' "~/.config/eww/scripts/network-statistics-shell 5") (deflisten interfaces :initial '{}' "~/.config/eww/scripts/network-statistics-shell.sh 5")
(defwidget network_speed [label interface] (defwidget network_speed [label interface]
(eventbox :onclick "${EWW_CMD} update combined_interface=${!combined_interface}" :cursor {interfaces?.[interface]?.up ? "pointer" : ""} (eventbox :onclick "${EWW_CMD} update combined_interface=${!combined_interface}" :cursor {interfaces?.[interface]?.up ? "pointer" : ""}
(tooltip (tooltip
@ -114,7 +114,7 @@
;(defwidget colour_selector [] ;(defwidget colour_selector []
;(clicker :text "" :command "uwsm-app -- hyprpicker -a")) ;(clicker :text "" :command "uwsm-app -- hyprpicker -a"))
(defwidget wallpaper [] (defwidget wallpaper []
(clicker :text "󰸉" :command "~/.config/eww/scripts/wallpaper-shell")) (clicker :text "󰸉" :command "~/.config/eww/scripts/wallpaper-shell.sh"))
(defwidget sunset [] (defwidget sunset []
(clicker :text "" :command "python -OO ~/scripts/sunset.py")) (clicker :text "" :command "python -OO ~/scripts/sunset.py"))
(defvar docked false) (defvar docked false)
@ -122,13 +122,13 @@
(clicker :text {docked ? "󰌢" : "󰛧"} :command "${EWW_CMD} update docked=${!docked} ; hyprctl keyword monitor eDP-1,${docked ? "" : "disabled"}")) (clicker :text {docked ? "󰌢" : "󰛧"} :command "${EWW_CMD} update docked=${!docked} ; hyprctl keyword monitor eDP-1,${docked ? "" : "disabled"}"))
(defpoll brightness :interval 60 "~/.config/eww/scripts/backlight get") (defpoll brightness :interval 60 "~/.config/eww/scripts/backlight.sh get")
(defwidget brightness [] (defwidget brightness []
(eventbox :onscroll "~/.config/eww/scripts/backlight {}" :cursor "row-resize" (eventbox :onscroll "~/.config/eww/scripts/backlight.sh {}" :cursor "row-resize"
(label_value :text "󰌵" :value "${brightness}%"))) (label_value :text "󰌵" :value "${brightness}%")))
(defpoll battery :interval 30 "~/.config/eww/scripts/get-battery") (defpoll battery :interval 30 "~/.config/eww/scripts/get-battery.sh")
(defwidget battery [] (defwidget battery []
(label_value :text {battery.charging ? "󰂄" : battery.icon} :value "${battery.charge}%" :value_class {battery.charge < 30 ? "alert" : ""})) (label_value :text {battery.charging ? "󰂄" : battery.icon} :value "${battery.charge}%" :value_class {battery.charge < 30 ? "alert" : ""}))