Files
Matteo Benedetto 5528581848 feat: Tema sonoro Voyager per KDE Plasma
- index.theme con Directories=stereo, OutputProfile=stereo,
  Inherits=freedesktop ed Example=theme-demo
- 61 cue sintetizzati da zero (Ogg Vorbis 48 kHz stereo) piu' il montaggio
  di anteprima theme-demo.oga
- tools/gen_sounds.py: motore di sintesi riproducibile (radio a banda stretta
  con AM a onda quadra, quantizzazione a 7 bit, beep di telemetria, sweep)
- tools/verify_theme.py: verifica della spec, igiene audio (clipping, DC,
  click ai bordi) e copertura dei nomi suono richiesti dai notifyrc di KDE
- preview/index.html: player nel browser per ogni cue del tema
- Makefile, install.sh, LICENSES (audio CC-BY-SA-4.0, codice BSD-2-Clause)
2026-09-20 16:12:48 +02:00

57 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
# Voyager — user-local installer for the Voyager sound theme.
# SPDX-License-Identifier: BSD-2-Clause
#
# Usage:
# ./install.sh install into ~/.local/share/sounds
# ./install.sh -d /some/dir install into <dir>/sounds
# ./install.sh -s install into /usr/share/sounds (needs root)
# ./install.sh -y activate the theme without asking
set -eu
THEME=Voyager
SRC=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
DEST="${HOME}/.local/share"
ASSUME_YES=0
usage() {
sed -n '3,10p' "$0" | sed 's/^# \{0,1\}//'
exit "${1:-0}"
}
while [ $# -gt 0 ]; do
case "$1" in
-d) DEST="${2:?-d richiede un percorso}"; shift 2 ;;
-s) DEST=/usr; shift ;;
-y) ASSUME_YES=1; shift ;;
-h|--help) usage 0 ;;
*) usage 1 ;;
esac
done
TARGET="$DEST/share/sounds/$THEME"
mkdir -p "$TARGET"
cp -r "$SRC/$THEME/." "$TARGET/"
echo "installato: $TARGET"
echo "cue installati: $(find "$TARGET/stereo" -name '*.oga' | wc -l)"
if command -v kwriteconfig6 >/dev/null 2>&1; then
echo
if [ "$ASSUME_YES" = 1 ]; then
answer=y
elif [ -t 0 ]; then
printf 'attivare ora %s come tema sonoro? [s/N] ' "$THEME"
read -r answer || answer=n
else
answer=n
fi
case "$answer" in
s|S|y|Y)
kwriteconfig6 --file kdeglobals --group Sounds --key Theme "$THEME"
echo "tema attivo: $THEME"
;;
*) echo "tema non attivato (Impostazioni di sistema > Colori e temi > Suoni)" ;;
esac
fi