Finalize verified 2720 Flip release source and untrack image outputs

This commit is contained in:
Luxferre committed 2026-11-09 23:04:13 +02:00
1 parent 2a3078e42c
commit 1c011b360a
121 files changed
+8467 -686

No files matched your search

+46 -6
View File
@@ -470,17 +470,39 @@ EOF
if [ "$eff_pct" -gt 0 ]; then
printf "0\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1 || true
if [ "$dev" = "Bluetooth" ]; then
pactl set-sink-volume @DEFAULT_SINK@ "${eff_pct}%" >/dev/null 2>&1 || true
else
pactl set-sink-volume @DEFAULT_SINK@ 100% >/dev/null 2>&1 || true
fi
bananarchy_set_sink_volume "$eff_pct"
else
printf "1\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
pactl set-sink-mute @DEFAULT_SINK@ 1 >/dev/null 2>&1 || true
fi
}
# Bananarchy: the MSM8905 mainline kernel exposes no ALSA card yet, so the
# amixer csets below are no-ops and PipeWire's null sink is the real output.
# @DEFAULT_SINK@ does not resolve when wireplumber has no default configured
# node, so resolve the first live sink id and set its volume directly.
bananarchy_set_sink_volume() {
pct="$1"
if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
XDG_RUNTIME_DIR="/run/user/$(id -u)"
export XDG_RUNTIME_DIR
fi
if command -v wpctl >/dev/null 2>&1; then
sink="$(wpctl status 2>/dev/null | sed -n '/Sinks:/,/Sources:/p' \
| sed -n 's/^[^0-9]*\([0-9][0-9]*\)\..*/\1/p' | head -n 1)"
if [ -n "$sink" ]; then
wpctl set-volume "$sink" "${pct}%" >/dev/null 2>&1 || true
if [ "$pct" -le 0 ]; then
wpctl set-mute "$sink" 1 >/dev/null 2>&1 || true
else
wpctl set-mute "$sink" 0 >/dev/null 2>&1 || true
fi
return 0
fi
fi
pactl set-sink-volume @DEFAULT_SINK@ "${pct}%" >/dev/null 2>&1 || true
}
apply_vol_out() {
dev="$(normalize_out_dev "${1:-$(fast_out_dev)}")"
pct="$(clamp_pct "${2:-$(read_dev_vol "$dev")}" 85)"
@@ -568,13 +590,14 @@ EOF
if [ "$pw_muted" != "0" ]; then
printf "0\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1 || true
pactl set-sink-volume @DEFAULT_SINK@ 100% >/dev/null 2>&1 || true
fi
bananarchy_set_sink_volume "$eff_pct"
else
if [ "$pw_muted" != "1" ]; then
printf "1\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
pactl set-sink-mute @DEFAULT_SINK@ 1 >/dev/null 2>&1 || true
fi
bananarchy_set_sink_volume 0
fi
}
@@ -849,7 +872,23 @@ volset() {
fi
}
# A direct evdev volume daemon and the X11 binding can both react to one
# physical key press. Collapse calls that arrive within 300 ms so the volume
# only steps once per press.
bananarchy_vol_debounce() {
# Timestamp based, no background subshell: a stale lock directory could
# otherwise block every future volume step forever.
now="$(awk '{printf "%d", $1 * 100}' /proc/uptime 2>/dev/null || printf 0)"
last="$(cat /tmp/bananarchy_vol_step 2>/dev/null || printf 0)"
[ -n "$now" ] || now=0
[ -n "$last" ] || last=0
[ $((now - last)) -lt 30 ] && return 1
printf '%s\n' "$now" > /tmp/bananarchy_vol_step 2>/dev/null || true
return 0
}
volup() {
bananarchy_vol_debounce || return 0
step="${1:-5}"
target_dev="$(normalize_out_dev "${2:-$(fast_out_dev)}")"
cur="$(read_dev_vol "$target_dev")"
@@ -859,6 +898,7 @@ volup() {
}
voldown() {
bananarchy_vol_debounce || return 0
step="${1:-5}"
target_dev="$(normalize_out_dev "${2:-$(fast_out_dev)}")"
cur="$(read_dev_vol "$target_dev")"