diff --git a/iso/airootfs/etc/skel/.config/autostart/archimedeos-wallpaper.desktop b/iso/airootfs/etc/skel/.config/autostart/archimedeos-wallpaper.desktop new file mode 100644 index 0000000..fd7f774 --- /dev/null +++ b/iso/airootfs/etc/skel/.config/autostart/archimedeos-wallpaper.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Name=ArchimedeOS Wallpaper Setup +Name[fr]=Configuration fond d'écran ArchimedeOS +Comment=Configure ArchimedeOS default wallpaper +Comment[fr]=Configure le fond d'écran par défaut d'ArchimedeOS +Exec=/usr/local/bin/archimedeos-setup-wallpaper +Icon=preferences-desktop-wallpaper +StartupNotify=false +NoDisplay=true +X-KDE-autostart-after=kded5 +OnlyShowIn=KDE; diff --git a/iso/airootfs/etc/skel/.config/kdeglobals b/iso/airootfs/etc/skel/.config/kdeglobals index fd15ca3..501dffe 100644 --- a/iso/airootfs/etc/skel/.config/kdeglobals +++ b/iso/airootfs/etc/skel/.config/kdeglobals @@ -1,3 +1,44 @@ [General] +BrowserApplication=firefox.desktop ColorScheme=Breeze -Name=liveuser \ No newline at end of file +Name=Breeze +shadeSortColumn=true + +[Icons] +Theme=breeze + +[KDE] +LookAndFeelPackage=org.kde.breeze.desktop +SingleClick=false +widgetStyle=Breeze + +[KFileDialog Settings] +Allow Expansion=false +Automatically select filename extension=true +Breadcrumb Navigation=true +Decoration position=2 +LocationCombo Completionmode=5 +PathCombo Completionmode=5 +Show Bookmarks=false +Show Full Path=false +Show Inline Previews=true +Show Preview=false +Show Speedbar=true +Show hidden files=false +Sort by=Name +Sort directories first=true +Sort hidden files last=false +Sort reversed=false +Speedbar Width=138 +View Style=Detail + +[PreviewSettings] +MaximumRemoteSize=0 + +[WM] +activeBackground=71,80,87 +activeBlend=255,255,255 +activeForeground=255,255,255 +inactiveBackground=239,240,241 +inactiveBlend=75,71,67 +inactiveForeground=189,195,199 \ No newline at end of file diff --git a/iso/airootfs/etc/skel/.config/kwinrc b/iso/airootfs/etc/skel/.config/kwinrc new file mode 100644 index 0000000..73afd0a --- /dev/null +++ b/iso/airootfs/etc/skel/.config/kwinrc @@ -0,0 +1,36 @@ +[Desktops] +Id_1=8b0b8c4b-4e61-4c04-a7f1-4d67e5f96e3c +Name_1=Bureau 1 +Number=1 +Rows=1 + +[Effect-kwin4_effect_translucency] +Decorations=85 +Dialogs=85 +DropdownMenus=85 +Menus=85 +PopupMenus=85 +TornOffMenus=85 + +[NightColor] +Active=true +LatitudeAuto=48.8566 +LongitudeAuto=2.3522 + +[Plugins] +kwin4_effect_translucencyEnabled=true +slideEnabled=true + +[Tiling] +padding=4 + +[Tiling][213ef4a8-97cf-5452-903c-0bcc8e48b76d] +tiles={"layoutDirection":"horizontal","tiles":[{"width":0.25},{"width":0.5},{"width":0.25}]} + +[Windows] +DelayFocusInterval=300 +FocusPolicy=ClickToFocus +FocusStealingPreventionLevel=1 +GeometryTip=false +RollOverDesktops=true +SeparateScreenFocus=false diff --git a/iso/airootfs/etc/skel/.config/plasma-org.kde.plasma.desktop-appletsrc b/iso/airootfs/etc/skel/.config/plasma-org.kde.plasma.desktop-appletsrc index f0098f5..f1daf6a 100644 --- a/iso/airootfs/etc/skel/.config/plasma-org.kde.plasma.desktop-appletsrc +++ b/iso/airootfs/etc/skel/.config/plasma-org.kde.plasma.desktop-appletsrc @@ -1,9 +1,81 @@ +[ActionPlugins][0] +RightButton;NoModifier=org.kde.contextmenu + +[ActionPlugins][1] +MidButton;NoModifier=org.kde.paste + [Containments][1] activityId= -formfactor=0 +formFactor=0 immutability=1 lastScreen=0 -plugin=org.kde.desktopcontainment +location=0 +plugin=org.kde.plasma.folder wallpaperplugin=org.kde.image + +[Containments][1][ConfigDialog] +DialogHeight=540 +DialogWidth=720 + +[Containments][1][Configuration] +PreloadWeight=0 + +[Containments][1][General] +ToolBoxButtonState=topcenter +ToolBoxButtonX=537 + [Containments][1][Wallpaper][org.kde.image][General] -Image=file://$HOME/.local/share/wallpapers/MonFondEcran/contents/images/archimedeoswallpaper.jpg \ No newline at end of file +Image=/usr/share/backgrounds/archimede/archimede-wallpaper.png +PreviewImage=/usr/share/backgrounds/archimede/archimede-wallpaper.png +SlidePaths=/usr/share/backgrounds/archimede/ + +[Containments][2] +activityId= +formFactor=2 +immutability=1 +lastScreen=0 +location=3 +plugin=org.kde.panel +wallpaperplugin=org.kde.image + +[Containments][2][Applets][3] +immutability=1 +plugin=org.kde.plasma.kickoff + +[Containments][2][Applets][4] +immutability=1 +plugin=org.kde.plasma.pager + +[Containments][2][Applets][5] +immutability=1 +plugin=org.kde.plasma.icontasks + +[Containments][2][Applets][6] +immutability=1 +plugin=org.kde.plasma.marginsseparator + +[Containments][2][Applets][7] +immutability=1 +plugin=org.kde.plasma.systemtray + +[Containments][2][Applets][8] +immutability=1 +plugin=org.kde.plasma.digitalclock + +[Containments][2][Applets][9] +immutability=1 +plugin=org.kde.plasma.showdesktop + +[Containments][2][ConfigDialog] +DialogHeight=84 +DialogWidth=1920 + +[Containments][2][Configuration] +PreloadWeight=26 + +[Containments][2][General] +AppletOrder=3;4;5;6;7;8;9 + +[ScreenMapping] +itemsOnDisabledScreens= +screenMapping= \ No newline at end of file diff --git a/iso/airootfs/etc/skel/.config/plasmarc b/iso/airootfs/etc/skel/.config/plasmarc new file mode 100644 index 0000000..f4d77f5 --- /dev/null +++ b/iso/airootfs/etc/skel/.config/plasmarc @@ -0,0 +1,14 @@ +[Wallpapers] +usersWallpapers=/usr/share/backgrounds/archimede/archimede-wallpaper.png + +[Theme] +name=default + +[PlasmaViews][Panel 2] +floating=0 + +[PlasmaViews][Panel 2][Defaults] +thickness=44 + +[Updates] +performed=/usr/share/kservices5/,/usr/share/kservices5/ServiceMenus/,/usr/share/kservices5/kded/ diff --git a/iso/airootfs/etc/systemd/system/archimedeos-wallpaper.service b/iso/airootfs/etc/systemd/system/archimedeos-wallpaper.service new file mode 100644 index 0000000..9085cc7 --- /dev/null +++ b/iso/airootfs/etc/systemd/system/archimedeos-wallpaper.service @@ -0,0 +1,15 @@ +[Unit] +Description=ArchimedeOS Wallpaper Configuration +After=display-manager.service +Wants=display-manager.service + +[Service] +Type=oneshot +ExecStart=/usr/local/bin/archimedeos-setup-wallpaper +RemainAfterExit=yes +User=live +Environment=HOME=/home/live +Environment=DISPLAY=:0 + +[Install] +WantedBy=graphical.target diff --git a/iso/airootfs/etc/systemd/system/graphical.target.wants/archimedeos-wallpaper.service b/iso/airootfs/etc/systemd/system/graphical.target.wants/archimedeos-wallpaper.service new file mode 120000 index 0000000..1b06bed --- /dev/null +++ b/iso/airootfs/etc/systemd/system/graphical.target.wants/archimedeos-wallpaper.service @@ -0,0 +1 @@ +../archimedeos-wallpaper.service \ No newline at end of file diff --git a/iso/airootfs/usr/local/bin/archimedeos-post-install-wallpaper b/iso/airootfs/usr/local/bin/archimedeos-post-install-wallpaper new file mode 100755 index 0000000..0a20e1a --- /dev/null +++ b/iso/airootfs/usr/local/bin/archimedeos-post-install-wallpaper @@ -0,0 +1,52 @@ +#!/bin/bash + +# Script de post-installation pour configurer le fond d'écran ArchimedeOS +# Peut être appelé depuis l'installateur ou manuellement + +WALLPAPER_PATH="/usr/share/backgrounds/archimede/archimede-wallpaper.png" +TARGET_USER="${1:-live}" +TARGET_HOME="/home/$TARGET_USER" + +echo "Configuration du fond d'écran ArchimedeOS pour l'utilisateur: $TARGET_USER" + +# Créer les répertoires de configuration KDE s'ils n'existent pas +mkdir -p "$TARGET_HOME/.config/autostart" +mkdir -p "$TARGET_HOME/.local/share/plasma" + +# Copier les fichiers de configuration +if [[ -f "/etc/skel/.config/plasma-org.kde.plasma.desktop-appletsrc" ]]; then + cp "/etc/skel/.config/plasma-org.kde.plasma.desktop-appletsrc" "$TARGET_HOME/.config/" +fi + +if [[ -f "/etc/skel/.config/plasmarc" ]]; then + cp "/etc/skel/.config/plasmarc" "$TARGET_HOME/.config/" +fi + +if [[ -f "/etc/skel/.config/kdeglobals" ]]; then + cp "/etc/skel/.config/kdeglobals" "$TARGET_HOME/.config/" +fi + +if [[ -f "/etc/skel/.config/kwinrc" ]]; then + cp "/etc/skel/.config/kwinrc" "$TARGET_HOME/.config/" +fi + +if [[ -f "/etc/skel/.config/autostart/archimedeos-wallpaper.desktop" ]]; then + cp "/etc/skel/.config/autostart/archimedeos-wallpaper.desktop" "$TARGET_HOME/.config/autostart/" +fi + +# Ajuster les permissions +chown -R "$TARGET_USER:$TARGET_USER" "$TARGET_HOME/.config" + +# Configurer le fond d'écran directement si possible +if [[ -f "$WALLPAPER_PATH" ]]; then + # Utiliser kwriteconfig5 si disponible + if command -v kwriteconfig5 &> /dev/null; then + sudo -u "$TARGET_USER" kwriteconfig5 --file "$TARGET_HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group "Containments" --group "1" --group "Wallpaper" --group "org.kde.image" --group "General" --key "Image" "file://$WALLPAPER_PATH" + fi + + echo "Fond d'écran configuré: $WALLPAPER_PATH" +else + echo "Attention: Le fichier de fond d'écran $WALLPAPER_PATH n'existe pas" +fi + +echo "Configuration terminée pour l'utilisateur $TARGET_USER" diff --git a/iso/airootfs/usr/local/bin/archimedeos-setup-wallpaper b/iso/airootfs/usr/local/bin/archimedeos-setup-wallpaper new file mode 100755 index 0000000..fd2b1b9 --- /dev/null +++ b/iso/airootfs/usr/local/bin/archimedeos-setup-wallpaper @@ -0,0 +1,49 @@ +#!/bin/bash + +# Script pour configurer automatiquement le fond d'écran ArchimedeOS +# Ce script sera exécuté lors du premier démarrage + +WALLPAPER_PATH="/usr/share/backgrounds/archimede/archimede-wallpaper.png" +USER_HOME="$HOME" + +# Attendre que KDE soit complètement chargé +sleep 5 + +# Vérifier si le fichier de fond d'écran existe +if [[ ! -f "$WALLPAPER_PATH" ]]; then + echo "Erreur: Le fond d'écran $WALLPAPER_PATH n'existe pas" + exit 1 +fi + +# Configurer le fond d'écran via DBus (méthode la plus fiable) +if command -v qdbus &> /dev/null; then + # Essayer avec qdbus (Qt5) + qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript " + var allDesktops = desktops(); + for (i=0;i/dev/null +elif command -v qdbus-qt5 &> /dev/null; then + # Essayer avec qdbus-qt5 + qdbus-qt5 org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript " + var allDesktops = desktops(); + for (i=0;i/dev/null +fi + +# Alternative: utiliser kwriteconfig5 pour une configuration persistante +if command -v kwriteconfig5 &> /dev/null; then + kwriteconfig5 --file plasma-org.kde.plasma.desktop-appletsrc --group "Containments" --group "1" --group "Wallpaper" --group "org.kde.image" --group "General" --key "Image" "file://$WALLPAPER_PATH" + kwriteconfig5 --file plasma-org.kde.plasma.desktop-appletsrc --group "Containments" --group "1" --group "Wallpaper" --group "org.kde.image" --group "General" --key "PreviewImage" "file://$WALLPAPER_PATH" +fi + +echo "Fond d'écran ArchimedeOS configuré: $WALLPAPER_PATH" diff --git a/iso/profiledef.sh b/iso/profiledef.sh index 8cfa845..1c6e090 100644 --- a/iso/profiledef.sh +++ b/iso/profiledef.sh @@ -24,4 +24,6 @@ file_permissions=( ["/root/.gnupg"]="0:0:700" ["/etc/sudoers.d"]="0:0:750" ["/etc/sudoers.d/g_wheel"]="0:0:440" + ["/usr/local/bin/archimedeos-setup-wallpaper"]="0:0:755" + ["/usr/local/bin/archimedeos-post-install-wallpaper"]="0:0:755" )