-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·78 lines (63 loc) · 2.62 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·78 lines (63 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env bash
# ─────────────────────────────────────────────────────────────────
# install.sh — VoiceDicto setup complet Fedora 44 / GNOME 50
# ─────────────────────────────────────────────────────────────────
set -euo pipefail
APP_DIR="$HOME/.local/share/voicedicto"
BIN="$APP_DIR/main.py"
echo "=== VoiceDicto — Installation ==="
# 1. Dépendances système
echo "[1/5] Paquets système…"
sudo dnf install -y \
python3-gobject \
python3-gst \
gstreamer1-plugins-good \
gstreamer1-plugins-bad-free \
wl-clipboard \
libnotify \
libappindicator-gtk3
# 2. Dépendances Python
echo "[2/5] Dépendances Python…"
pip install --user faster-whisper
# 3. Copier les fichiers
echo "[3/5] Copie des fichiers…"
mkdir -p "$APP_DIR"
cp main.py "$APP_DIR/"
chmod +x "$BIN"
# 4. Service systemd utilisateur
echo "[4/5] Service systemd…"
mkdir -p "$HOME/.config/systemd/user"
cat > "$HOME/.config/systemd/user/voicedicto.service" << EOF
[Unit]
Description=VoiceDicto — Dictée vocale IA locale
After=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 ${BIN}
Restart=on-failure
RestartSec=3
Environment=DISPLAY=:0
Environment=WAYLAND_DISPLAY=wayland-0
Environment=XDG_RUNTIME_DIR=/run/user/%i
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now voicedicto.service
echo "[4/5] Service actif."
# 5. Raccourci GNOME (custom shortcut → gsettings)
echo "[5/5] Raccourci GNOME…"
SHORTCUT_PATH="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/voicedicto/"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings \
"['${SHORTCUT_PATH}']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"${SHORTCUT_PATH}" \
name "VoiceDicto Toggle"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"${SHORTCUT_PATH}" \
command "gdbus call --session --dest ovh.batoucode.VoiceDicto --object-path /ovh/batoucode/VoiceDicto --method org.gtk.Actions.Activate toggle [] {}"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"${SHORTCUT_PATH}" \
binding "<Super>d"
echo ""
echo "✓ Installation terminée."
echo " Raccourci : Super+D (modifiable dans Paramètres GNOME → Clavier)"
echo " Logs : journalctl --user -u voicedicto -f"
echo " Statut : systemctl --user status voicedicto"