fix(Calamares): Installater will ask the desktop env before the calamares install
- The installer is still W.I.P
This commit is contained in:
Regular → Executable
+40
-2
@@ -5,8 +5,46 @@ set -euo pipefail
|
||||
|
||||
first_user="$(fws_first_user)"
|
||||
|
||||
fws_install_packages hyprland xdg-desktop-portal-hyprland xdg-desktop-portal-gtk waybar wofi kitty swaybg swayidle swaylock xorg-xwayland wl-clipboard grim slurp qt5-wayland qt6-wayland sddm
|
||||
# Config Hyprland minimale + autostart (agent polkit, barre, applet réseau,
|
||||
# notifications). Sans config ni agent polkit, la session est inutilisable
|
||||
# pour un non-technicien (pas de raccourcis, pas d'élévation de privilèges GUI).
|
||||
fws_write_hyprland_config() {
|
||||
local user_name="$1"
|
||||
[ -n "$user_name" ] && [ -d "/home/$user_name" ] || return 0
|
||||
local cfg_dir="/home/$user_name/.config/hypr"
|
||||
install -d -m 755 "$cfg_dir"
|
||||
if [ -f /usr/share/hypr/hyprland.conf ]; then
|
||||
cp -f /usr/share/hypr/hyprland.conf "$cfg_dir/hyprland.conf"
|
||||
else
|
||||
cat > "$cfg_dir/hyprland.conf" <<'EOF'
|
||||
$terminal = kitty
|
||||
$menu = wofi --show drun
|
||||
bind = SUPER, Q, exec, $terminal
|
||||
bind = SUPER, R, exec, $menu
|
||||
bind = SUPER, C, killactive
|
||||
bind = SUPER, M, exit
|
||||
EOF
|
||||
fi
|
||||
cat >> "$cfg_dir/hyprland.conf" <<'EOF'
|
||||
|
||||
# ── FWS : démarrage automatique de la session ──
|
||||
exec-once = systemctl --user start hyprpolkitagent
|
||||
exec-once = waybar
|
||||
exec-once = nm-applet --indicator
|
||||
exec-once = mako
|
||||
EOF
|
||||
chown -R "$user_name:$user_name" "/home/$user_name/.config"
|
||||
}
|
||||
|
||||
# PipeWire/applet NM/polices viennent de FWS_BASE_PACKAGES ; hyprpolkitagent
|
||||
# fournit l'agent d'authentification polkit pour Wayland/Hyprland.
|
||||
fws_install_packages "${FWS_BASE_PACKAGES[@]}" \
|
||||
hyprland xdg-desktop-portal-hyprland xdg-desktop-portal-gtk \
|
||||
waybar wofi kitty mako swaybg swayidle swaylock \
|
||||
xorg-xwayland wl-clipboard grim slurp \
|
||||
qt5-wayland qt6-wayland hyprpolkitagent sddm
|
||||
fws_disable_services lightdm.service gdm.service
|
||||
fws_enable_services sddm.service
|
||||
fws_set_graphical_default
|
||||
fws_write_sddm_config "$first_user" hyprland
|
||||
fws_write_dmrc "$first_user" hyprland
|
||||
fws_write_hyprland_config "$first_user"
|
||||
Reference in New Issue
Block a user