refactor: control panel slides

This commit is contained in:
hesam-init 2024-06-28 21:47:14 +03:30
parent f821a3d37b
commit 5a593d3ea1
4 changed files with 24 additions and 8 deletions

View file

@ -60,12 +60,12 @@
"notifications": [],
"popups": []
}'
"./scripts/notifCatch"
"./scripts/notif.py"
)
; Playerctl
(defpoll pstatus :initial "" :interval "1s" "playerctl status")
(defpoll psong :initial "0" :interval "1s" "playerctl metadata --format '{{ title }}'")
(defpoll psong :initial "" :interval "1s" "playerctl metadata --format '{{ title }}'")
(defpoll partist :initial "" :interval "1s" "playerctl metadata --format '{{ artist }}'")
(deflisten pcover "./scripts/pollcover.sh")
(deflisten ptime

View file

@ -27,7 +27,7 @@
:height 160
:halign "fill"
(timer)
(bigslide))
(bigslides))
(box
:space-evenly false
:orientation "v"
@ -356,7 +356,7 @@
(button :onclick "./scripts/timer.py toggle" (label :style "padding-right: 3px;" :text { !matches(timerdis, ":") ? "󱎫" : "󱫎"}))
(button :onclick "./scripts/timer.py timeinc" (label :text "+")))))
(defwidget bigslide []
(defwidget bigslides []
(box
:valign "fill"
:halign "fill"
@ -364,6 +364,7 @@
:hexpand true
:space-evenly true
(bigvol)
(bigmic)
(bigbright)))
(defwidget bigvol []
@ -372,7 +373,7 @@
:width 50
:class "bigslide"
:value volume
:onchange "pamixer --set-volume {}"
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
:orientation "v"
:tooltip "${volume}%"
:max 100
@ -383,6 +384,23 @@
:valign "end"
:text {volumemute == 'false' ? "󰕾" : "󰖁"})))
(defwidget bigmic []
(overlay
(scale
:width 50
:class "bigslide"
:value mic_volume
:onchange "pactl set-source-volume @DEFAULT_SOURCE@ {}%"
:orientation "v"
:tooltip "${mic_volume}%"
:max 100
:min 0
:flipped true)
(label
:class "slideicon"
:valign "end"
:text {volumemute == 'false' ? "" : "󰖁"})))
(defwidget bigbright []
(overlay
(scale

View file

@ -243,9 +243,7 @@
:orientation "v"
:space-evenly false
:class "sound"
(label :class "icon" :text {volumemute == 'false' ? "" : "󰖁"})
;; {volumemute == 'no' ? volume : " Muted"})
)
(label :class "icon" :text {volumemute == 'false' ? "" : "󰖁"}))
(scale
:class "volslide"
:value mic_volume