added pactl this time fr

main
Your Name 2025-05-27 12:49:46 +02:00
parent 65ca9df0ad
commit 6a6d731e68
3 changed files with 19 additions and 13 deletions

View File

@ -30,10 +30,12 @@
(box :class "music" {"󰛳 ${IP}"}) (box :class "music" {"󰛳 ${IP}"})
(metric :label "󰓃" (metric :label "󰓃"
:value volume :value volume
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%") :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
:onclick "hyprctl dispatch exec \[tag +mixer\] pavucontrol")
(metric :label "" (metric :label ""
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "") :onchange ""
:onclick "")
(clock) (clock)
(systray :class "music" :orientation "h" :spacing 2 :space-evenly true) (systray :class "music" :orientation "h" :spacing 2 :space-evenly true)
)) ))
@ -47,11 +49,11 @@
{music != "" ? " ${music}" : " None"})) {music != "" ? " ${music}" : " None"}))
(defwidget metric [label value onchange] (defwidget metric [label value onchange onclick]
(box :orientation "h" (box :orientation "h"
:class "metric" :class "metric"
:space-evenly false :space-evenly false
(box :class "label" label) (button :class "label" :onclick onclick label)
(scale :min 0 (scale :min 0
:max 101 :max 101
:active {onchange != ""} :active {onchange != ""}

View File

@ -36,10 +36,12 @@
(box :class "music" {"󰛳 ${IP}"}) (box :class "music" {"󰛳 ${IP}"})
(metric :label "󰓃" (metric :label "󰓃"
:value volume :value volume
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%") :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
:onclick "hyprctl dispatch exec \[tag +mixer\] pavucontrol")
(metric :label "" (metric :label ""
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "") :onchange ""
:onclick "")
(clock) (clock)
(systray :class "music" :orientation "h" :spacing 2 :space-evenly true) (systray :class "music" :orientation "h" :spacing 2 :space-evenly true)
)) ))
@ -62,11 +64,11 @@
) )
) )
(defwidget metric [label value onchange] (defwidget metric [label value onchange onclick]
(box :orientation "h" (box :orientation "h"
:class "metric" :class "metric"
:space-evenly false :space-evenly false
(box :class "label" label) (button :class "label" :onclick onclick label)
(scale :min 0 (scale :min 0
:max 101 :max 101
:active {onchange != ""} :active {onchange != ""}

View File

@ -35,13 +35,15 @@
(box :class "music" {"󰛳 ${IP}"}) (box :class "music" {"󰛳 ${IP}"})
(metric :label "󰓃" (metric :label "󰓃"
:value volume :value volume
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%") :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
:onclick "hyprctl dispatch exec \[tag +mixer\] pavucontrol")
(metric :label "" (metric :label ""
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "") :onchange ""
:onclick "")
(clock) (clock)
(systray :class "music" :orientation "h" :spacing 2 :space-evenly true) (systray :class "music" :orientation "h" :spacing 2 :space-evenly true)
)) ))
(defwidget music [] (defwidget music []
(button :class "music" (button :class "music"
@ -52,11 +54,11 @@
{music != "" ? " ${music}" : " None"})) {music != "" ? " ${music}" : " None"}))
(defwidget metric [label value onchange] (defwidget metric [label value onchange onclick]
(box :orientation "h" (box :orientation "h"
:class "metric" :class "metric"
:space-evenly false :space-evenly false
(box :class "label" label) (button :class "label" :onclick onclick label)
(scale :min 0 (scale :min 0
:max 101 :max 101
:active {onchange != ""} :active {onchange != ""}