Compare commits

..

No commits in common. "a59b589dca76a2ba69d480ca563ac71c4e39bc63" and "9eb26b34d2e498e450f120c003e0f0cbd383e3a9" have entirely different histories.

4 changed files with 11 additions and 75 deletions

View file

@ -1,15 +0,0 @@
#!/usr/bin/env sh
case "$1" in
up)
set -- -i
;;
down)
set -- -d
;;
*)
;;
esac
set -- pamixer "$@" 5
exec "$@"

View file

@ -3,6 +3,7 @@ window, menubar {
} }
window { window {
color: white;
font-weight: bold; font-weight: bold;
} }
@ -14,10 +15,9 @@ window > box > box > * {
border-top: 2px solid white; border-top: 2px solid white;
} }
:hover { .workspace-button:hover {
border-color: #b0ffb0; border-color: #80ff80;
color: #b0ffb0; color: #e0ffe0;
border-top-width: 2px;
} }
.workspace-button > box { .workspace-button > box {

View file

@ -24,15 +24,10 @@
) )
(deflisten notifications (deflisten notifications
:initial '{"count":0}' :initial '{}'
"swaync-client --subscribe" "swaync-client --subscribe"
) )
(deflisten sound
:initial '{"output-volume":0,"input-volume":0,"output-muted":false}'
"listen/sound"
)
(defvar battery-icon '{ (defvar battery-icon '{
"unknown": "", "unknown": "",
"critical": "", "critical": "",
@ -59,13 +54,6 @@
"dnd": "󰂛" "dnd": "󰂛"
}') }')
(defvar sound-icon '{
"absent": "󰕿",
"moderate": "󰖀",
"loud": "󰕾",
"muted": "󰖁"
}')
(defwidget workspaces [] (defwidget workspaces []
(eventbox :onscroll 'action/hyprland/nearby-workspace "{}"' (eventbox :onscroll 'action/hyprland/nearby-workspace "{}"'
(box :class "workspaces" (box :class "workspaces"
@ -95,11 +83,7 @@
)) ))
(defwidget time [] (defwidget time []
(box (eventbox "${formattime(EWW_TIME, "%Y-%m-%d")} ${formattime(EWW_TIME, "%H:%M:%S")}"
:onclick 'eww open --toggle calendar'
"${formattime(EWW_TIME, "%Y-%m-%d")} ${formattime(EWW_TIME, "%H:%M:%S")}"
))
) )
(defwidget notifications [] (defwidget notifications []
@ -107,7 +91,6 @@
:class "module" :class "module"
:onclick 'swaync-client --toggle-panel' :onclick 'swaync-client --toggle-panel'
:onrightclick 'swaync-client --toggle-dnd' :onrightclick 'swaync-client --toggle-dnd'
:onmiddleclick 'swaync-client --close-all'
"${ "${
notifications.dnd == true notifications.dnd == true
@ -115,30 +98,18 @@
: notifications.count > 0 : notifications.count > 0
? notifications-icon["new"] ? notifications-icon["new"]
: notifications-icon["nothing"] : notifications-icon["nothing"]
} ${notifications.count}" } ${notifications.count}"
)) ))
) )
(defwidget sound [] ; (defwidget sound [] "")
(box (eventbox
:onscroll 'action/volume "{}"'
:onclick 'pavucontrol & disown'
"${
sound.output-muted == true ? sound-icon["muted"] :
sound.output-volume < 33 ? sound-icon["absent"] :
sound.output-volume < 67 ? sound-icon["moderate"] :
sound-icon["loud"]
} ${sound.output-volume} %"
))
)
(defwidget network [] (defwidget network []
"${ "${
network.state == "wireless" network.state == "wireless"
? network-icon["wifi-${network.wifi.signal}"] ? network-icon["wifi-${network.wifi.signal}"]
: network-icon[network.state] : network-icon[network.state]
} ${ } ${
network.state == "disconnected" network.state == "disconnected"
? "no network" : ? "no network" :
network.state == "ethernet" network.state == "ethernet"
@ -149,7 +120,7 @@
) )
(defwidget battery [] (defwidget battery []
"${battery-icon[batterystatus]}${EWW_BATTERY.BAT1.status == "Charging" ? " " : ""} ${EWW_BATTERY.BAT1.capacity} %" "${battery-icon[batterystatus]}${EWW_BATTERY.BAT1.status == "Charging" ? " " : ""} ${EWW_BATTERY.BAT1.capacity} %"
) )
(defwindow bar (defwindow bar
@ -184,22 +155,9 @@
:space-evenly false :space-evenly false
:class "right" :class "right"
(sound) ; (sound)
(network) (network)
(battery) (battery)
) )
) )
) )
(defwindow calendar
:monitor 0
:geometry (geometry
:anchor "bottom center"
:width "350px"
:height "200px"
)
:exclusive false
; :stacking "fg"
(calendar)
)

View file

@ -1,7 +0,0 @@
#!/usr/bin/env sh
pactl subscribe | grep --line-buffered "'change'" | while read -r _unused; do
printf '{"output-volume":%s,"input-volume":%s,"output-muted":%s}\n' \
"$(pamixer --get-volume)" \
"$(pamixer --get-volume --default-source)" \
"$(pamixer --get-mute)"
done