New backup 2025-03-04 01:00:02
This commit is contained in:
parent
c23ae5a9aa
commit
9160fdc03f
3 changed files with 10 additions and 10 deletions
|
@ -17,6 +17,7 @@
|
|||
}
|
||||
.rightgroup>* {
|
||||
margin: 10px 0px 10px 5px;
|
||||
min-width: 25px;
|
||||
}
|
||||
scale trough {
|
||||
background-color: $color1;
|
||||
|
|
|
@ -82,9 +82,12 @@
|
|||
:revealvar reveal_volume
|
||||
:revealvar-name "reveal_volume"
|
||||
(button :onclick 'pavucontrol-qt --tab 3'
|
||||
"")
|
||||
{(volume_level == 0) ? "" : ((volume_level > 50) ? "" : "")})
|
||||
(volume_children)))
|
||||
|
||||
(defpoll volume_level :initial false
|
||||
:interval "1s"
|
||||
"scripts/getvol")
|
||||
(defwidget volume_children []
|
||||
(box :class "reveal_children"
|
||||
:orientation "h"
|
||||
|
@ -93,7 +96,7 @@
|
|||
(scale
|
||||
:min 0
|
||||
:max 100
|
||||
:value 50
|
||||
:value {volume_level}
|
||||
:orientation "h"
|
||||
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ {}%")))
|
||||
|
||||
|
|
12
de/home/.config/eww/scripts/getvol
Normal file → Executable file
12
de/home/.config/eww/scripts/getvol
Normal file → Executable file
|
@ -1,12 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
if command -v pamixer &>/dev/null; then
|
||||
if [ true == $(pamixer --get-mute) ]; then
|
||||
echo 0
|
||||
exit
|
||||
else
|
||||
pamixer --get-volume
|
||||
fi
|
||||
if [ "$(pactl get-sink-mute @DEFAULT_SINK@)" = "Mute: yes" ]; then
|
||||
echo 0
|
||||
exit
|
||||
else
|
||||
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
|
||||
echo "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g')"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue