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>* {
|
.rightgroup>* {
|
||||||
margin: 10px 0px 10px 5px;
|
margin: 10px 0px 10px 5px;
|
||||||
|
min-width: 25px;
|
||||||
}
|
}
|
||||||
scale trough {
|
scale trough {
|
||||||
background-color: $color1;
|
background-color: $color1;
|
||||||
|
|
|
@ -82,9 +82,12 @@
|
||||||
:revealvar reveal_volume
|
:revealvar reveal_volume
|
||||||
:revealvar-name "reveal_volume"
|
:revealvar-name "reveal_volume"
|
||||||
(button :onclick 'pavucontrol-qt --tab 3'
|
(button :onclick 'pavucontrol-qt --tab 3'
|
||||||
"")
|
{(volume_level == 0) ? "" : ((volume_level > 50) ? "" : "")})
|
||||||
(volume_children)))
|
(volume_children)))
|
||||||
|
|
||||||
|
(defpoll volume_level :initial false
|
||||||
|
:interval "1s"
|
||||||
|
"scripts/getvol")
|
||||||
(defwidget volume_children []
|
(defwidget volume_children []
|
||||||
(box :class "reveal_children"
|
(box :class "reveal_children"
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
|
@ -93,7 +96,7 @@
|
||||||
(scale
|
(scale
|
||||||
:min 0
|
:min 0
|
||||||
:max 100
|
:max 100
|
||||||
:value 50
|
:value {volume_level}
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ {}%")))
|
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ {}%")))
|
||||||
|
|
||||||
|
|
8
de/home/.config/eww/scripts/getvol
Normal file → Executable file
8
de/home/.config/eww/scripts/getvol
Normal file → Executable file
|
@ -1,12 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if command -v pamixer &>/dev/null; then
|
if [ "$(pactl get-sink-mute @DEFAULT_SINK@)" = "Mute: yes" ]; then
|
||||||
if [ true == $(pamixer --get-mute) ]; then
|
|
||||||
echo 0
|
echo 0
|
||||||
exit
|
exit
|
||||||
else
|
|
||||||
pamixer --get-volume
|
|
||||||
fi
|
|
||||||
else
|
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
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue