fix(install): corriger le thème GTK sur fresh install
- Ajouter adw-gtk3 aux paquets apt (base du dark theme GTK3) - Déployer violet-chaton-gtk.css sur gtk-3.0 ET gtk-4.0 - Appliquer gsettings gtk-theme=adw-gtk3-dark + color-scheme=prefer-dark - Réécrire violet-chaton-gtk.css avec les variables exactes de COSMIC dark.css (les anciennes règles CSS explicites étaient ignorées par adw-gtk3-dark) - Corriger deploy_file pour ne pas suivre les symlinks COSMIC (évite d'écraser cosmic/dark.css par erreur) - Bloquer l'exécution en tant que root (causait des erreurs mkdir) - Renommer CosmicTheme.Light/name en Violet-chaton pour cohérence
This commit is contained in:
@@ -12,6 +12,14 @@ export INSTALL_LOG="$HOME/violet-chaton-install-$(date +%Y%m%d-%H%M%S).log"
|
|||||||
|
|
||||||
source "$SCRIPT_DIR/scripts/lib.sh"
|
source "$SCRIPT_DIR/scripts/lib.sh"
|
||||||
|
|
||||||
|
# ── Refus root ────────────────────────────────────────────────────────────────
|
||||||
|
if [ "$EUID" -eq 0 ]; then
|
||||||
|
echo -e "${RED}${BOLD} ERREUR : Ne pas lancer ce script en tant que root !${RESET}"
|
||||||
|
echo -e " Lance-le en tant qu'utilisateur normal : ${CYAN}bash install.sh${RESET}"
|
||||||
|
echo -e " ${MUTED}(sudo sera demandé automatiquement quand nécessaire)${RESET}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# ── Vérifications préalables ──────────────────────────────────────────────────
|
# ── Vérifications préalables ──────────────────────────────────────────────────
|
||||||
check_requirements() {
|
check_requirements() {
|
||||||
local ok=true
|
local ok=true
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ PACKAGES=(
|
|||||||
chafa
|
chafa
|
||||||
jq
|
jq
|
||||||
libgtk-3-bin
|
libgtk-3-bin
|
||||||
|
adw-gtk3
|
||||||
nemo
|
nemo
|
||||||
nemo-fileroller
|
nemo-fileroller
|
||||||
# fastfetch → installé via .deb GitHub (voir 02-packages-manual.sh)
|
# fastfetch → installé via .deb GitHub (voir 02-packages-manual.sh)
|
||||||
|
|||||||
@@ -11,7 +11,14 @@ deploy_file() {
|
|||||||
local src="$1"
|
local src="$1"
|
||||||
local dst="$2"
|
local dst="$2"
|
||||||
ensure_dir "$(dirname "$dst")"
|
ensure_dir "$(dirname "$dst")"
|
||||||
if [ -f "$dst" ]; then
|
if [ -L "$dst" ]; then
|
||||||
|
# Symlink géré par COSMIC : sauvegarder la cible réelle puis supprimer le lien
|
||||||
|
local real; real=$(readlink -f "$dst")
|
||||||
|
local rel="${dst#"$HOME/"}"
|
||||||
|
ensure_dir "$BACKUP_DIR/$(dirname "$rel")"
|
||||||
|
cp "$real" "$BACKUP_DIR/$rel" 2>/dev/null
|
||||||
|
rm "$dst"
|
||||||
|
elif [ -f "$dst" ]; then
|
||||||
local rel="${dst#"$HOME/"}"
|
local rel="${dst#"$HOME/"}"
|
||||||
ensure_dir "$BACKUP_DIR/$(dirname "$rel")"
|
ensure_dir "$BACKUP_DIR/$(dirname "$rel")"
|
||||||
cp "$dst" "$BACKUP_DIR/$rel" 2>/dev/null
|
cp "$dst" "$BACKUP_DIR/$rel" 2>/dev/null
|
||||||
@@ -118,11 +125,27 @@ else
|
|||||||
fail "CosmicTerm"
|
fail "CosmicTerm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── GTK3 — thème violet-chaton ─────────────────────────────────────────────
|
# ── GTK3 / GTK4 — thème violet-chaton ─────────────────────────────────────
|
||||||
section "GTK3 — thème violet-chaton"
|
section "GTK — thème violet-chaton"
|
||||||
|
|
||||||
|
step "Thème GTK3 (adw-gtk3-dark + couleurs violet-chaton)..."
|
||||||
ensure_dir "$HOME/.config/gtk-3.0"
|
ensure_dir "$HOME/.config/gtk-3.0"
|
||||||
deploy_file "$THEMES/violet-chaton-gtk.css" "$HOME/.config/gtk-3.0/gtk.css"
|
deploy_file "$THEMES/violet-chaton-gtk.css" "$HOME/.config/gtk-3.0/gtk.css"
|
||||||
|
|
||||||
|
step "Thème GTK4 / libadwaita (couleurs violet-chaton)..."
|
||||||
|
ensure_dir "$HOME/.config/gtk-4.0"
|
||||||
|
deploy_file "$THEMES/violet-chaton-gtk.css" "$HOME/.config/gtk-4.0/gtk.css"
|
||||||
|
|
||||||
|
step "Activation adw-gtk3-dark + dark mode (gsettings)..."
|
||||||
|
if has_cmd gsettings; then
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3-dark' 2>/dev/null && \
|
||||||
|
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' 2>/dev/null && \
|
||||||
|
ok "gtk-theme=adw-gtk3-dark, color-scheme=prefer-dark" || \
|
||||||
|
warn "gsettings GTK échoué — thème à appliquer manuellement"
|
||||||
|
else
|
||||||
|
warn "gsettings non disponible — thème GTK à appliquer manuellement"
|
||||||
|
fi
|
||||||
|
|
||||||
# ── Nemo — gestionnaire de fichiers ────────────────────────────────────────
|
# ── Nemo — gestionnaire de fichiers ────────────────────────────────────────
|
||||||
section "Nemo — configuration et thème"
|
section "Nemo — configuration et thème"
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
"cosmic-light"
|
"Violet-chaton"
|
||||||
@@ -1,247 +1,122 @@
|
|||||||
/* ── violet-chaton GTK3 theme — Nemo & GTK apps ───────────────────────────────
|
/* ── violet-chaton GTK theme (adw-gtk3-dark compatible) ────────────────────
|
||||||
*
|
*
|
||||||
* Couleurs extraites du thème COSMIC violet-chaton :
|
* Contenu identique au dark.css généré par COSMIC pour le thème violet-chaton.
|
||||||
* bg #341C4A background.base
|
* adw-gtk3-dark et libadwaita lisent ces variables @define-color.
|
||||||
* surface #493161 background.component.base
|
* Sur le PC principal, COSMIC gère ce fichier via symlink — ce fichier
|
||||||
* hover #5B4671 background.component.hover
|
* sert de fallback lors de la première installation.
|
||||||
* accent #E79CFE accent.base
|
|
||||||
* text #FCFCF6 background.on
|
|
||||||
* muted #7F849C neutral_7
|
|
||||||
* border #5C496C background.divider
|
|
||||||
* sidebar #2B1540 (bg légèrement plus sombre)
|
|
||||||
* ─────────────────────────────────────────────────────────────────────────── */
|
* ─────────────────────────────────────────────────────────────────────────── */
|
||||||
|
|
||||||
@define-color theme_bg_color #341C4A;
|
@define-color window_bg_color rgba(52, 28, 74, 1.00);
|
||||||
@define-color theme_fg_color #FCFCF6;
|
@define-color window_fg_color rgba(252, 252, 246, 1.00);
|
||||||
@define-color theme_base_color #493161;
|
|
||||||
@define-color theme_selected_bg_color #E79CFE;
|
|
||||||
@define-color theme_selected_fg_color #341C4A;
|
|
||||||
@define-color theme_text_color #FCFCF6;
|
|
||||||
@define-color borders #5C496C;
|
|
||||||
|
|
||||||
/* ── Fenêtre principale ────────────────────────────────────────────────────── */
|
@define-color view_bg_color rgba(56, 35, 75, 1.00);
|
||||||
window, .background {
|
@define-color view_fg_color rgba(193, 193, 187, 1.00);
|
||||||
background-color: #341C4A;
|
|
||||||
color: #FCFCF6;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Barre de titre / headerbar ───────────────────────────────────────────── */
|
@define-color headerbar_bg_color rgba(52, 28, 74, 1.00);
|
||||||
headerbar, .titlebar {
|
@define-color headerbar_fg_color rgba(252, 252, 246, 1.00);
|
||||||
background-color: #493161;
|
@define-color headerbar_border_color_color rgba(92, 73, 108, 1.00);
|
||||||
color: #FCFCF6;
|
@define-color headerbar_backdrop_color rgba(52, 28, 74, 1.00);
|
||||||
border-bottom: 1px solid #5C496C;
|
|
||||||
}
|
|
||||||
|
|
||||||
headerbar button, .titlebar button {
|
@define-color sidebar_bg_color rgba(56, 35, 75, 1.00);
|
||||||
background-color: transparent;
|
@define-color sidebar_fg_color rgba(193, 193, 187, 1.00);
|
||||||
color: #FCFCF6;
|
@define-color sidebar_shade_color rgba(0, 0, 0, 0.08);
|
||||||
border: none;
|
@define-color sidebar_backdrop_color rgba(72, 53, 89, 1.00);
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
headerbar button:hover, .titlebar button:hover {
|
@define-color secondary_sidebar_bg_color rgba(69, 71, 90, 1.00);
|
||||||
background-color: #5B4671;
|
@define-color secondary_sidebar_fg_color rgba(225, 225, 219, 1.00);
|
||||||
}
|
@define-color secondary_sidebar_shade_color rgba(0, 0, 0, 0.08);
|
||||||
|
@define-color secondary_sidebar_backdrop_color rgba(84, 86, 103, 1.00);
|
||||||
|
|
||||||
headerbar button:active, .titlebar button:active {
|
@define-color card_bg_color rgba(73, 49, 97, 1.00);
|
||||||
background-color: #E79CFE;
|
@define-color card_fg_color rgba(212, 212, 206, 1.00);
|
||||||
color: #341C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Sidebar Nemo (paneau des emplacements) ───────────────────────────────── */
|
@define-color thumbnail_bg_color rgba(73, 49, 97, 1.00);
|
||||||
.sidebar, placessidebar {
|
@define-color thumbnail_fg_color rgba(212, 212, 206, 1.00);
|
||||||
background-color: #2B1540;
|
|
||||||
color: #FCFCF6;
|
|
||||||
border-right: 1px solid #5C496C;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar row, placessidebar row {
|
@define-color dialog_bg_color rgba(56, 35, 75, 1.00);
|
||||||
border-radius: 6px;
|
@define-color dialog_fg_color rgba(193, 193, 187, 1.00);
|
||||||
padding: 2px 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar row:hover, placessidebar row:hover {
|
@define-color popover_bg_color rgba(73, 49, 97, 1.00);
|
||||||
background-color: #5B4671;
|
@define-color popover_fg_color rgba(212, 212, 206, 1.00);
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar row:selected, placessidebar row:selected {
|
@define-color shade_color rgba(0, 0, 0, 0.32);
|
||||||
background-color: #E79CFE;
|
@define-color scrollbar_outline_color rgba(52, 28, 74, 0.50);
|
||||||
color: #341C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .sidebar-section-header, placessidebar .sidebar-section-header {
|
@define-color accent_color rgba(231, 156, 254, 1.00);
|
||||||
color: #7F849C;
|
@define-color accent_bg_color rgba(231, 156, 254, 1.00);
|
||||||
font-size: smaller;
|
@define-color accent_fg_color rgba(0, 0, 0, 1.00);
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Vue fichiers (icônes + liste) ───────────────────────────────────────── */
|
@define-color destructive_color rgba(243, 139, 168, 1.00);
|
||||||
.view, iconview, treeview {
|
@define-color destructive_bg_color rgba(243, 139, 168, 1.00);
|
||||||
background-color: #341C4A;
|
@define-color destructive_fg_color rgba(0, 0, 0, 1.00);
|
||||||
color: #FCFCF6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view:selected, iconview:selected,
|
@define-color warning_color rgba(249, 226, 175, 1.00);
|
||||||
treeview:selected, .view:focus:selected {
|
@define-color warning_bg_color rgba(249, 226, 175, 1.00);
|
||||||
background-color: #E79CFE;
|
@define-color warning_fg_color rgba(0, 0, 0, 1.00);
|
||||||
color: #341C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* En-têtes de colonnes (vue liste) */
|
@define-color success_color rgba(166, 227, 161, 1.00);
|
||||||
treeview header button {
|
@define-color success_bg_color rgba(166, 227, 161, 1.00);
|
||||||
background-color: #493161;
|
@define-color success_fg_color rgba(0, 0, 0, 1.00);
|
||||||
color: #FCFCF6;
|
|
||||||
border: none;
|
|
||||||
border-right: 1px solid #5C496C;
|
|
||||||
border-bottom: 1px solid #5C496C;
|
|
||||||
}
|
|
||||||
|
|
||||||
treeview header button:hover {
|
@define-color accent_color rgba(231, 156, 254, 1.00);
|
||||||
background-color: #5B4671;
|
@define-color accent_bg_color rgba(231, 156, 254, 1.00);
|
||||||
}
|
@define-color accent_fg_color rgba(0, 0, 0, 1.00);
|
||||||
|
|
||||||
/* ── Barre d'outils / pathbar ─────────────────────────────────────────────── */
|
@define-color error_color rgba(243, 139, 168, 1.00);
|
||||||
toolbar, .path-bar {
|
@define-color error_bg_color rgba(243, 139, 168, 1.00);
|
||||||
background-color: #493161;
|
@define-color error_fg_color rgba(0, 0, 0, 1.00);
|
||||||
border-bottom: 1px solid #5C496C;
|
|
||||||
}
|
|
||||||
|
|
||||||
.path-bar button {
|
@define-color blue_1 rgba(151, 195, 255, 1.00);
|
||||||
background-color: transparent;
|
@define-color blue_2 rgba(144, 187, 255, 1.00);
|
||||||
color: #FCFCF6;
|
@define-color blue_3 rgba(137, 180, 250, 1.00);
|
||||||
border: none;
|
@define-color blue_4 rgba(114, 156, 224, 1.00);
|
||||||
border-radius: 6px;
|
@define-color blue_5 rgba(91, 132, 199, 1.00);
|
||||||
}
|
|
||||||
|
|
||||||
.path-bar button:hover {
|
@define-color green_1 rgba(175, 236, 170, 1.00);
|
||||||
background-color: #5B4671;
|
@define-color green_2 rgba(171, 232, 165, 1.00);
|
||||||
}
|
@define-color green_3 rgba(166, 227, 161, 1.00);
|
||||||
|
@define-color green_4 rgba(139, 199, 134, 1.00);
|
||||||
|
@define-color green_5 rgba(113, 171, 108, 1.00);
|
||||||
|
|
||||||
.path-bar button:checked {
|
@define-color yellow_1 rgba(254, 231, 180, 1.00);
|
||||||
background-color: #5B4671;
|
@define-color yellow_2 rgba(252, 229, 178, 1.00);
|
||||||
color: #E79CFE;
|
@define-color yellow_3 rgba(249, 226, 175, 1.00);
|
||||||
}
|
@define-color yellow_4 rgba(219, 196, 146, 1.00);
|
||||||
|
@define-color yellow_5 rgba(189, 167, 118, 1.00);
|
||||||
|
|
||||||
/* ── Barre de recherche / entrée texte ────────────────────────────────────── */
|
@define-color red_1 rgba(255, 154, 183, 1.00);
|
||||||
entry {
|
@define-color red_2 rgba(252, 147, 176, 1.00);
|
||||||
background-color: #5B4671;
|
@define-color red_3 rgba(243, 139, 168, 1.00);
|
||||||
color: #FCFCF6;
|
@define-color red_4 rgba(217, 116, 145, 1.00);
|
||||||
border: 1px solid #5C496C;
|
@define-color red_5 rgba(191, 93, 122, 1.00);
|
||||||
border-radius: 6px;
|
|
||||||
padding: 4px 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
entry:focus {
|
@define-color orange_1 rgba(255, 190, 146, 1.00);
|
||||||
border-color: #E79CFE;
|
@define-color orange_2 rgba(255, 185, 140, 1.00);
|
||||||
box-shadow: 0 0 0 2px alpha(#E79CFE, 0.3);
|
@define-color orange_3 rgba(250, 179, 135, 1.00);
|
||||||
}
|
@define-color orange_4 rgba(222, 153, 110, 1.00);
|
||||||
|
@define-color orange_5 rgba(195, 128, 85, 1.00);
|
||||||
|
|
||||||
entry placeholder {
|
@define-color purple_1 rgba(192, 202, 255, 1.00);
|
||||||
color: #7F849C;
|
@define-color purple_2 rgba(186, 196, 255, 1.00);
|
||||||
}
|
@define-color purple_3 rgba(180, 190, 254, 1.00);
|
||||||
|
@define-color purple_4 rgba(155, 164, 226, 1.00);
|
||||||
|
@define-color purple_5 rgba(130, 139, 200, 1.00);
|
||||||
|
@define-color light_0 rgba(0, 0, 0, 1.00);
|
||||||
|
@define-color light_1 rgba(3, 3, 16, 1.00);
|
||||||
|
@define-color light_2 rgba(24, 25, 43, 1.00);
|
||||||
|
@define-color light_3 rgba(50, 53, 72, 1.00);
|
||||||
|
@define-color light_4 rgba(79, 82, 103, 1.00);
|
||||||
|
@define-color dark_0 rgba(110, 114, 135, 1.00);
|
||||||
|
@define-color dark_1 rgba(143, 147, 169, 1.00);
|
||||||
|
@define-color dark_2 rgba(177, 181, 205, 1.00);
|
||||||
|
@define-color dark_3 rgba(213, 217, 241, 1.00);
|
||||||
|
@define-color dark_4 rgba(255, 255, 255, 1.00);
|
||||||
|
|
||||||
/* ── Scrollbar ────────────────────────────────────────────────────────────── */
|
/* ── Variables GTK3 classiques (compat apps legacy) ─────────────────────── */
|
||||||
scrollbar {
|
@define-color theme_bg_color rgba(52, 28, 74, 1.00);
|
||||||
background-color: transparent;
|
@define-color theme_fg_color rgba(252, 252, 246, 1.00);
|
||||||
}
|
@define-color theme_base_color rgba(73, 49, 97, 1.00);
|
||||||
|
@define-color theme_selected_bg_color rgba(231, 156, 254, 1.00);
|
||||||
scrollbar slider {
|
@define-color theme_selected_fg_color rgba(52, 28, 74, 1.00);
|
||||||
background-color: #5C496C;
|
@define-color theme_text_color rgba(252, 252, 246, 1.00);
|
||||||
border-radius: 10px;
|
@define-color borders rgba(92, 73, 108, 1.00);
|
||||||
min-width: 6px;
|
|
||||||
min-height: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
scrollbar slider:hover {
|
|
||||||
background-color: #E79CFE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Menu contextuel ──────────────────────────────────────────────────────── */
|
|
||||||
menu, .context-menu, .popup {
|
|
||||||
background-color: #493161;
|
|
||||||
color: #FCFCF6;
|
|
||||||
border: 1px solid #5C496C;
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
menuitem {
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 4px 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
menuitem:hover {
|
|
||||||
background-color: #E79CFE;
|
|
||||||
color: #341C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
menuitem accelerator {
|
|
||||||
color: #7F849C;
|
|
||||||
}
|
|
||||||
|
|
||||||
separator, menuitem separator {
|
|
||||||
background-color: #5C496C;
|
|
||||||
min-height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Barre de statut ──────────────────────────────────────────────────────── */
|
|
||||||
.statusbar, statusbar {
|
|
||||||
background-color: #493161;
|
|
||||||
color: #7F849C;
|
|
||||||
border-top: 1px solid #5C496C;
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Boutons génériques ───────────────────────────────────────────────────── */
|
|
||||||
button {
|
|
||||||
background-color: #5B4671;
|
|
||||||
color: #FCFCF6;
|
|
||||||
border: 1px solid #5C496C;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 4px 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover {
|
|
||||||
background-color: #E79CFE;
|
|
||||||
color: #341C4A;
|
|
||||||
border-color: #E79CFE;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.suggested-action {
|
|
||||||
background-color: #E79CFE;
|
|
||||||
color: #341C4A;
|
|
||||||
border-color: #E79CFE;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.destructive-action {
|
|
||||||
background-color: #F38BA8;
|
|
||||||
color: #341C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Notebooks / onglets ─────────────────────────────────────────────────── */
|
|
||||||
notebook tab {
|
|
||||||
background-color: #493161;
|
|
||||||
color: #7F849C;
|
|
||||||
border-radius: 6px 6px 0 0;
|
|
||||||
padding: 4px 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
notebook tab:checked {
|
|
||||||
background-color: #5B4671;
|
|
||||||
color: #FCFCF6;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Popover ─────────────────────────────────────────────────────────────── */
|
|
||||||
popover {
|
|
||||||
background-color: #493161;
|
|
||||||
color: #FCFCF6;
|
|
||||||
border: 1px solid #5C496C;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Tooltip ─────────────────────────────────────────────────────────────── */
|
|
||||||
tooltip {
|
|
||||||
background-color: #5B4671;
|
|
||||||
color: #FCFCF6;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 4px 8px;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user