feat(hardware): graphical driver setup, opened at first boot

New "Pilotes et matériel" window (fws-drivers) with the two paths asked for:
a simple install that puts in whatever the machine needs and then checks and
repairs display, sound, Bluetooth, network and printing, and an advanced one
that lists the groups as checkboxes, pre-ticked from what was detected. Plus a
"check and repair only" entry that installs nothing.

It decides nothing by itself: detection and installation stay in
fws-setup-hardware, which it calls, so there is no second hardware logic to
keep in sync with the kickstart.

No terminal. A computer novice described the previous flow as scary, and she
was right -- a black screen scrolling hundreds of pacman lines with nothing
saying things were going well. Privileges now go through pkexec and a polkit
policy (the mechanism fws-recovery already used, with the authentication agent
already autostarted in the i3 and Hyprland sessions), and progress is shown in
the window itself: a spinner, a plain-French step, a line telling the user
there is nothing to do, and the raw output folded away behind "Afficher les
détails" for whoever wants it or needs to paste it into a bug report.

It opens on its own at first boot, but only when it is needed: the engine
writes /var/lib/fws/hardware-done when pacman succeeded, and --autostart
withdraws silently if that marker is there. An install that had network stays
quiet; one without -- much the more common case -- gets the window to finish
the job. A "ne plus me le proposer" box stops it for good.

Also here: Super+P opens the package manager on i3 and Hyprland, declared with
its description on Hyprland so it shows up in the fws-keys panel, and
profiledef.sh gains the executable bit for fws-drivers.

Signed-off-by: nocode <suzuku295@gmail.com>
This commit is contained in:
nocode committed 2026-09-11 14:18:30 +02:00
1 parent a911fe656d
commit ca94fde8ea
8 files changed
+544 -1

No files matched your search

@@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Name=Pilotes et matériel (FWS)
Name[en]=Drivers & Hardware (FWS)
Comment=Installer les pilotes graphiques, le son, le Bluetooth, les jeux, l'impression
Comment[en]=Install graphics drivers, audio, Bluetooth, gaming and printing
Exec=fws-drivers
Icon=preferences-desktop-display
Terminal=false
Categories=Settings;HardwareSettings;
Keywords=pilote;pilotes;driver;nvidia;amd;intel;gpu;son;audio;bluetooth;luminosité;imprimante;jeux;
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<!--
FWS — autorise « Pilotes et matériel » (fws-drivers, lancée en utilisateur)
à exécuter le MOTEUR fws-setup-hardware via pkexec.
POURQUOI : sans ça il fallait ouvrir un terminal et y lancer sudo. Une
utilisatrice débutante a décrit l'expérience comme « flippante » — un écran
noir qui défile, sans rien pour dire que tout va bien. Avec polkit elle voit
une simple demande de mot de passe, puis la progression dans la fenêtre.
auth_admin_keep : le mot de passe n'est demandé qu'une fois (mémorisé
quelques minutes), pas à chaque groupe installé.
-->
<policyconfig>
<vendor>FWS</vendor>
<action id="org.fws.hardware">
<description>Installer les pilotes et configurer le matériel</description>
<description xml:lang="en">Install drivers and set up hardware</description>
<message>Authentification requise pour installer les pilotes</message>
<message xml:lang="en">Authentication is required to install drivers</message>
<icon_name>preferences-desktop-display</icon_name>
<defaults>
<allow_any>auth_admin_keep</allow_any>
<allow_inactive>auth_admin_keep</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/local/bin/fws-setup-hardware</annotate>
</action>
</policyconfig>