refactor: use relative script paths in eww.yuck

This is apparently something EWW supports.
This commit is contained in:
Kiana Sheibani 2025-02-23 02:30:56 -05:00
parent d8da49460e
commit f30e0773cc
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -2,7 +2,7 @@
;; Window Info
(deflisten window :initial "{}"
"~/.config/eww/scripts/active-window")
"scripts/active-window")
(defwidget bar_window [class-limit title-limit]
(box :class "bar-window"
@ -21,9 +21,9 @@
;; Workspaces
(deflisten workspaces :initial "[]"
"~/.config/eww/scripts/get-workspaces")
"scripts/get-workspaces")
(deflisten current_workspace :initial "1"
"~/.config/eww/scripts/get-active-workspace")
"scripts/get-active-workspace")
(defwidget bar_workspace_button [workspace]
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
@ -37,7 +37,7 @@
(label :text "${workspace.id}")))))
(defwidget bar_workspaces []
(eventbox :onscroll "~/.config/eww/scripts/change-active-workspace {} ${current_workspace}"
(eventbox :onscroll "scripts/change-active-workspace {} ${current_workspace}"
(box :class "bar-workspaces"
:orientation "h"
:space-evenly true
@ -64,7 +64,7 @@
;; Playerctl
(deflisten mpris :initial "{}"
"~/.config/eww/scripts/mpris-metadata")
"scripts/mpris-metadata")
(defwidget bar_music [width artist-limit title-limit]
(eventbox :onclick "playerctl play-pause"
@ -130,7 +130,7 @@
(defvar volume_reveal false)
(deflisten volume :initial "0"
"~/.config/eww/scripts/volume")
"scripts/volume")
(defwidget bar_volume []
(bar_scale :class "bar-volume ${volume.muted ? "muted" : ""}"
@ -147,7 +147,7 @@
(defvar brightness_reveal false)
(deflisten brightness :initial "0"
"~/.config/eww/scripts/brightness")
"scripts/brightness")
(defwidget bar_brightness []
(bar_scale :class "bar-brightness"
@ -208,11 +208,11 @@
;; Network
(defpoll wifi :interval "5s" :initial "{}"
"~/.config/eww/scripts/network 802-11-wireless")
"scripts/network 802-11-wireless")
(defpoll ethernet :interval "5s" :initial "{}"
"~/.config/eww/scripts/network 802-3-ethernet")
"scripts/network 802-3-ethernet")
(defpoll bluetooth :interval "5s" :initial "{}"
"~/.config/eww/scripts/network bluetooth")
"scripts/network bluetooth")
(defvar internet_reveal false)