Compare commits
4
Commits
fb22fa8af7
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8d48baad8 | ||
|
|
52e182a334
|
||
|
|
9af9974a09
|
||
|
|
e07b3c8753
|
No files matched your search
@@ -26,7 +26,8 @@ violet-dotfiles/
|
||||
├── README.md ← ce fichier
|
||||
│
|
||||
│ ── le thème, prêt à installer (modèles avec chemins à substituer) ──
|
||||
├── hypr/ ← Hyprland : hyprland.conf, hyprlock, hyprpaper
|
||||
├── hypr/ ← Hyprland : hyprland.lua (format lu depuis 0.57),
|
||||
│ hyprland.conf (même contenu, référence), hyprlock, hyprpaper
|
||||
├── waybar/ ← barre du haut : config, style.css, icons/logo.png
|
||||
│ └── scripts/ ← modules média : media-cover, media-panel
|
||||
├── mako/ ← notifications (popups violets assortis à la barre)
|
||||
@@ -125,6 +126,13 @@ sudo cp -a system/usr/. /usr/
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg # régénère le menu avec le thème
|
||||
```
|
||||
|
||||
`./install.sh --system` fait ces copies pour toi (avec sauvegardes
|
||||
`<fichier>.bak-<date>` et sans toucher à `/etc/default/grub`) :
|
||||
|
||||
```bash
|
||||
./install.sh --system # ou --all pour tout
|
||||
```
|
||||
|
||||
### `live-2026-09-21/`
|
||||
|
||||
Copie **telle quelle** des configs qui tournaient le 21/09/2026, avec les
|
||||
@@ -164,9 +172,14 @@ fond d'écran — **en sauvegardant d'abord tes configs existantes** dans
|
||||
| `--bash` | ajoute aussi le prompt violet à `~/.bashrc` |
|
||||
| `--grub` | installe le thème GRUB (sudo) + régénère grub.cfg |
|
||||
| `--sddm` | installe le thème SDDM de connexion (sudo) |
|
||||
| `--system` | copie `system/` vers `/` : scripts FWS de `/usr/local/bin` (dont `fws-powermenu`), ressources de `/usr/local/share/fws`, thèmes GRUB, sessions Wayland (sudo) |
|
||||
| `--install-deps` | installe les paquets manquants (pacman, sudo) |
|
||||
| `--all` | tout ce qui précède |
|
||||
|
||||
`--system` sauvegarde chaque fichier remplacé en `<fichier>.bak-<date>` et
|
||||
laisse volontairement `/etc/default/grub` de côté : c'est `--grub` qui gère ce
|
||||
fichier (sinon le thème GRUB repasse sur catppuccin au lieu de violet).
|
||||
|
||||
Exemple complet :
|
||||
|
||||
```bash
|
||||
@@ -368,7 +381,8 @@ Exemple pour remplacer le bouton d'alimentation de Waybar :
|
||||
| Fond d'écran noir | vérifie que `hyprpaper` est lancé (`pgrep hyprpaper`) et que le chemin dans `hypr/hyprpaper.conf` existe |
|
||||
| Thème GRUB inchangé après reboot | vérifie `GRUB_THEME` dans `/etc/default/grub`, relance `sudo grub-mkconfig -o /boot/grub/grub.cfg` |
|
||||
| Waybar ne démarre pas | lance `waybar --log level=debug` pour voir l'erreur |
|
||||
| Config Hyprland invalide | `hyprctl --config ~/.config/hypr/hyprland.conf verify` |
|
||||
| Config Hyprland invalide | `Hyprland --verify-config -c ~/.config/hypr/hyprland.lua` |
|
||||
| Thème ignoré, style par défaut (0.57+) | seul `hyprland.lua` est lu : vérifie qu'il existe dans `~/.config/hypr/` (`./install.sh` le copie) |
|
||||
| L'ancienne config me manque | tout est dans `~/.violet-backup-<date>/` |
|
||||
|
||||
---
|
||||
|
||||
@@ -7,10 +7,13 @@
|
||||
# Texte/chemin : bleu clair #89b4fa (137,180,250)
|
||||
# $ / erreur : rose #f4c1e6 (244,193,230)
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
MAUVE=$'\e[38;2;203;166;247m' # mauve — boîtes et bordures (tty.png)
|
||||
BLEU=$'\e[38;2;137;180;250m' # bleu clair — texte et chemin (tty.png)
|
||||
ROSE=$'\e[38;2;244;193;230m' # rose — $ et code d'erreur (tty.png)
|
||||
RESET=$'\e[0m'
|
||||
# \[ \] = séquence non imprimable : indispensable pour que bash calcule la
|
||||
# bonne largeur du prompt. Sans ces marqueurs, bash sur-estime la largeur et
|
||||
# le retour à la ligne / redessin des longues commandes se chevauche.
|
||||
MAUVE=$'\[\e[38;2;203;166;247m\]' # mauve — boîtes et bordures (tty.png)
|
||||
BLEU=$'\[\e[38;2;137;180;250m\]' # bleu clair — texte et chemin (tty.png)
|
||||
ROSE=$'\[\e[38;2;244;193;230m\]' # rose — $ et code d'erreur (tty.png)
|
||||
RESET=$'\[\e[0m\]'
|
||||
|
||||
# Branche git courante : parenthèses mauve, nom en bleu
|
||||
__fws_git_branch() {
|
||||
|
||||
+7
-4
@@ -17,10 +17,13 @@ alias grep='grep --color=auto'
|
||||
# Texte/chemin : bleu clair #89b4fa (137,180,250)
|
||||
# $ / erreur : rose #f4c1e6 (244,193,230)
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
MAUVE=$'\e[38;2;203;166;247m' # mauve — boîtes et bordures (tty.png)
|
||||
BLEU=$'\e[38;2;137;180;250m' # bleu clair — texte et chemin (tty.png)
|
||||
ROSE=$'\e[38;2;244;193;230m' # rose — $ et code d'erreur (tty.png)
|
||||
RESET=$'\e[0m'
|
||||
# \[ \] = séquence non imprimable : indispensable pour que bash calcule la
|
||||
# bonne largeur du prompt. Sans ces marqueurs, bash sur-estime la largeur et
|
||||
# le retour à la ligne / redessin des longues commandes se chevauche.
|
||||
MAUVE=$'\[\e[38;2;203;166;247m\]' # mauve — boîtes et bordures (tty.png)
|
||||
BLEU=$'\[\e[38;2;137;180;250m\]' # bleu clair — texte et chemin (tty.png)
|
||||
ROSE=$'\[\e[38;2;244;193;230m\]' # rose — $ et code d'erreur (tty.png)
|
||||
RESET=$'\[\e[0m\]'
|
||||
|
||||
# Branche git courante : parenthèses mauve, nom en bleu
|
||||
__fws_git_branch() {
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
-- 💜 FWS — configuration Hyprland (format Lua, Hyprland ≥ 0.56).
|
||||
-- Depuis Hyprland 0.57, le format lu est hyprland.lua : si ce fichier existe,
|
||||
-- hyprland.conf est ignoré. Même contenu, mêmes raccourcis, mêmes couleurs.
|
||||
-- Raccourcis : transposition de la config i3/sway FWS (mêmes touches).
|
||||
-- ⚠ Pas de virgule dans les descriptions (séparateur de champs Hyprland).
|
||||
|
||||
local mod = "SUPER"
|
||||
|
||||
---------------------
|
||||
---- MONITEURS ----
|
||||
---------------------
|
||||
|
||||
hl.monitor({ output = "", mode = "preferred", position = "auto", scale = 1 })
|
||||
|
||||
--------------------------
|
||||
---- RÉGLAGES GÉNÉRAUX ----
|
||||
--------------------------
|
||||
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "ch",
|
||||
kb_variant = "fr",
|
||||
follow_mouse = 1,
|
||||
numlock_by_default = true,
|
||||
touchpad = {
|
||||
natural_scroll = true,
|
||||
tap_to_click = true,
|
||||
},
|
||||
},
|
||||
|
||||
general = {
|
||||
gaps_in = 4,
|
||||
gaps_out = 8,
|
||||
border_size = 2,
|
||||
-- Palette de l'image : mauve #cba6f7 → lavande #c3b6f6 en dégradé.
|
||||
col = {
|
||||
active_border = { colors = { "rgba(cba6f7ff)", "rgba(c3b6f6ff)" }, angle = 45 },
|
||||
inactive_border = "rgba(313244ff)",
|
||||
},
|
||||
layout = "dwindle",
|
||||
},
|
||||
|
||||
decoration = {
|
||||
rounding = 8,
|
||||
-- Flou et ombres COUPÉS : rendu logiciel (llvmpipe) en VM.
|
||||
-- Sur un vrai GPU : enabled = true.
|
||||
blur = { enabled = false },
|
||||
shadow = { enabled = false },
|
||||
},
|
||||
|
||||
animations = { enabled = true },
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true,
|
||||
disable_splash_rendering = true, -- pas de « Thanks xxx! » en bas d'écran
|
||||
force_default_wallpaper = 0,
|
||||
background_color = "rgba(1f1a2eff)", -- violet profond
|
||||
},
|
||||
})
|
||||
|
||||
-- Courbes et animations (équivalent de « bezier = fws, 0.22, 1.0, 0.36, 1.0 »)
|
||||
hl.curve("fws", { type = "bezier", points = { { 0.22, 1.0 }, { 0.36, 1.0 } } })
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 3, bezier = "fws" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 3, bezier = "fws" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 2, bezier = "default" })
|
||||
|
||||
--------------------
|
||||
---- DÉMARRAGE ----
|
||||
--------------------
|
||||
|
||||
-- Barre d'état, notifications, réseau dans le tray, agent d'authentification
|
||||
-- GUI (indispensable aux apps qui demandent les droits admin), fond d'écran.
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("hyprpaper")
|
||||
hl.exec_cmd("waybar")
|
||||
hl.exec_cmd("mako")
|
||||
-- playerctld suit le LECTEUR ACTIF (les modules média restent à jour).
|
||||
hl.exec_cmd("playerctld daemon")
|
||||
hl.exec_cmd("nm-applet")
|
||||
-- Applet Bluetooth : seulement si un adaptateur existe (en VM il n'y en a
|
||||
-- pas → blueman afficherait « Connection to BlueZ failed »).
|
||||
hl.exec_cmd('sh -c \'[ -n "$(ls -A /sys/class/bluetooth 2>/dev/null)" ] && exec blueman-applet\'')
|
||||
hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1")
|
||||
-- Fenêtre de bienvenue (1er démarrage seulement — se retire ensuite).
|
||||
hl.exec_cmd("fws-hello --autostart")
|
||||
end)
|
||||
|
||||
--------------------
|
||||
---- RACCOURCIS ----
|
||||
--------------------
|
||||
|
||||
-- Applications
|
||||
hl.bind(mod .. " + Return", hl.dsp.exec_cmd("kitty"), { description = "Ouvrir un terminal (kitty)" })
|
||||
hl.bind(mod .. " + SHIFT + Return", hl.dsp.exec_cmd("kitty --class floating-term"), { description = "Terminal flottant" })
|
||||
hl.bind(mod .. " + R", hl.dsp.exec_cmd("wofi --show drun"), { description = "Menu des applications" })
|
||||
hl.bind(mod .. " + E", hl.dsp.exec_cmd("dolphin"), { description = "Gestionnaire de fichiers" })
|
||||
hl.bind(mod .. " + B", hl.dsp.exec_cmd("firefox"), { description = "Ouvrir Firefox" })
|
||||
hl.bind(mod .. " + K", hl.dsp.exec_cmd("fws-keys"), { description = "Afficher les raccourcis clavier" })
|
||||
hl.bind(mod .. " + X", hl.dsp.exec_cmd("fws-powermenu"), { description = "Menu d'alimentation (arrêt/redémarrage…)" })
|
||||
-- Panneau multimédia (même fenêtre que le clic sur la pochette de la barre).
|
||||
hl.bind(mod .. " + M", hl.dsp.exec_cmd(os.getenv("HOME") .. "/.config/waybar/scripts/media-panel"),
|
||||
{ description = "Panneau multimédia (lecture en cours)" })
|
||||
|
||||
-- Fenêtres
|
||||
hl.bind(mod .. " + Q", hl.dsp.window.close(), { description = "Fermer la fenêtre" })
|
||||
hl.bind(mod .. " + V", hl.dsp.window.float({ action = "toggle" }), { description = "Fenêtre flottante ou ancrée" })
|
||||
hl.bind(mod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }), { description = "Plein écran" })
|
||||
hl.bind(mod .. " + J", hl.dsp.layout("togglesplit"), { description = "Basculer la découpe horizontale/verticale" })
|
||||
hl.bind(mod .. " + L", hl.dsp.exec_cmd("hyprlock"), { description = "Verrouiller l'écran" })
|
||||
hl.bind(mod .. " + SHIFT + E", hl.dsp.exit(), { description = "Quitter la session (retour à SDDM)" })
|
||||
hl.bind(mod .. " + SHIFT + C", hl.dsp.reload_config(), { description = "Recharger la configuration Hyprland" })
|
||||
|
||||
-- Focus (flèches)
|
||||
hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" }), { description = "Focus à gauche" })
|
||||
hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" }), { description = "Focus à droite" })
|
||||
hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" }), { description = "Focus en haut" })
|
||||
hl.bind(mod .. " + down", hl.dsp.focus({ direction = "down" }), { description = "Focus en bas" })
|
||||
|
||||
-- Déplacer la fenêtre (Maj + flèches)
|
||||
hl.bind(mod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" }), { description = "Déplacer la fenêtre à gauche" })
|
||||
hl.bind(mod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" }), { description = "Déplacer la fenêtre à droite" })
|
||||
hl.bind(mod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" }), { description = "Déplacer la fenêtre en haut" })
|
||||
hl.bind(mod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" }), { description = "Déplacer la fenêtre en bas" })
|
||||
|
||||
-- Redimensionner (Ctrl + flèches, maintien possible)
|
||||
hl.bind(mod .. " + CTRL + left", hl.dsp.window.resize({ x = -30, y = 0 }), { repeating = true })
|
||||
hl.bind(mod .. " + CTRL + right", hl.dsp.window.resize({ x = 30, y = 0 }), { repeating = true })
|
||||
hl.bind(mod .. " + CTRL + up", hl.dsp.window.resize({ x = 0, y = -30 }), { repeating = true })
|
||||
hl.bind(mod .. " + CTRL + down", hl.dsp.window.resize({ x = 0, y = 30 }), { repeating = true })
|
||||
|
||||
-- Espaces de travail 1-10 (0 = espace 10, comme i3)
|
||||
for i = 1, 10 do
|
||||
local key = i % 10
|
||||
hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i }), { description = "Aller à l'espace " .. i })
|
||||
hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }), { description = "Envoyer la fenêtre vers l'espace " .. i })
|
||||
end
|
||||
|
||||
-- Multi-écrans (comme i3 : Super+Ctrl+1/2 = écran gauche/droit)
|
||||
hl.bind(mod .. " + CTRL + 1", hl.dsp.window.move({ monitor = "l" }), { description = "Envoyer la fenêtre vers l'écran de gauche" })
|
||||
hl.bind(mod .. " + CTRL + 2", hl.dsp.window.move({ monitor = "r" }), { description = "Envoyer la fenêtre vers l'écran de droite" })
|
||||
|
||||
-- Molette = changer d'espace de travail
|
||||
hl.bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }), { description = "Espace de travail précédent" })
|
||||
hl.bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }), { description = "Espace de travail suivant" })
|
||||
|
||||
-- Scratchpad (espace spécial)
|
||||
hl.bind(mod .. " + S", hl.dsp.workspace.toggle_special("magic"), { description = "Afficher le scratchpad" })
|
||||
hl.bind(mod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }), { description = "Envoyer la fenêtre au scratchpad" })
|
||||
|
||||
-- Captures d'écran (grim/slurp → presse-papier ou ~/Images)
|
||||
hl.bind("Print", hl.dsp.exec_cmd("grim - | wl-copy"),
|
||||
{ description = "Capture plein écran vers le presse-papier" })
|
||||
hl.bind(mod .. " + Print", hl.dsp.exec_cmd('grim -g "$(slurp)" - | wl-copy'),
|
||||
{ description = "Capture d'une zone vers le presse-papier" })
|
||||
hl.bind(mod .. " + SHIFT + Print",
|
||||
hl.dsp.exec_cmd('sh -c \'mkdir -p ~/Images && grim -g "$(slurp)" ~/Images/capture_$(date +%Y-%m-%d_%H-%M-%S).png\''),
|
||||
{ description = "Capture d'une zone vers ~/Images" })
|
||||
|
||||
-- Multimédia (touches XF86 : volume via PipeWire, lecture via playerctl)
|
||||
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
|
||||
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true })
|
||||
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true })
|
||||
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
|
||||
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
|
||||
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
|
||||
|
||||
-- Luminosité de l'écran (portables : touches Fn)
|
||||
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("fws-brightness up"), { locked = true, repeating = true })
|
||||
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("fws-brightness down"), { locked = true, repeating = true })
|
||||
|
||||
-- Souris : déplacer / redimensionner les fenêtres
|
||||
hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
--------------------------
|
||||
---- RÈGLES DE FENÊTRE ---
|
||||
--------------------------
|
||||
|
||||
hl.window_rule({ name = "floating-term", match = { class = "^(floating-term)$" }, float = true, size = "900 550" })
|
||||
hl.window_rule({ name = "pavucontrol", match = { class = "^([Pp]avucontrol|org.pulseaudio.pavucontrol)$" }, float = true })
|
||||
hl.window_rule({ name = "blueman", match = { class = "^([Bb]lueman-manager.*)$" }, float = true })
|
||||
hl.window_rule({ name = "fws-hello", match = { class = "^([Ff]ws-hello)$" }, float = true })
|
||||
hl.window_rule({ name = "fws-about", match = { class = "^([Ff]ws-about)$" }, float = true })
|
||||
hl.window_rule({ name = "fws-bugreport", match = { class = "^([Ff]ws-bugreport)$" }, float = true })
|
||||
hl.window_rule({ name = "pip", match = { title = "^(Picture-in-Picture)$" }, float = true })
|
||||
-- Panneau multimédia (script media-panel) : flottant, à sa taille, au-dessus.
|
||||
hl.window_rule({ name = "fws-media", match = { class = "^(fws[.]media)$" }, float = true, size = "460 214" })
|
||||
+62
-5
@@ -9,6 +9,7 @@
|
||||
# ║ ./install.sh --bash + prompt bash dans ~/.bashrc ║
|
||||
# ║ ./install.sh --grub + thème GRUB (demande sudo) ║
|
||||
# ║ ./install.sh --sddm + thème SDDM (demande sudo) ║
|
||||
# ║ ./install.sh --system + fichiers système (sudo) ║
|
||||
# ║ ./install.sh --install-deps + paquets manquants (pacman) ║
|
||||
# ║ ./install.sh --all tout ce qui précède ║
|
||||
# ║ ║
|
||||
@@ -23,6 +24,7 @@ HOME_DIR="${HOME:-$HOME}"
|
||||
DO_BASH=false
|
||||
DO_GRUB=false
|
||||
DO_SDDM=false
|
||||
DO_SYSTEM=false
|
||||
DO_DEPS=false
|
||||
|
||||
for arg in "$@"; do
|
||||
@@ -30,8 +32,9 @@ for arg in "$@"; do
|
||||
--bash) DO_BASH=true ;;
|
||||
--grub) DO_GRUB=true ;;
|
||||
--sddm) DO_SDDM=true ;;
|
||||
--system) DO_SYSTEM=true ;;
|
||||
--install-deps) DO_DEPS=true ;;
|
||||
--all) DO_BASH=true; DO_GRUB=true; DO_SDDM=true; DO_DEPS=true ;;
|
||||
--all) DO_BASH=true; DO_GRUB=true; DO_SDDM=true; DO_SYSTEM=true; DO_DEPS=true ;;
|
||||
*) echo "⚠ Option inconnue : $arg (voir l'en-tête du script)" ;;
|
||||
esac
|
||||
done
|
||||
@@ -80,6 +83,33 @@ install_dir() { # install_dir <src> <dst> [sed-remplacements...]
|
||||
fi
|
||||
}
|
||||
|
||||
# ── Déploiement d'un sous-arbre de system/ vers la racine (sudo requis) ──
|
||||
# sys_deploy <sous-arbre> <racine cible> [chemin relatif à ignorer]
|
||||
# Recopie fichier par fichier : sauvegarde ce qui existe déjà au format
|
||||
# <fichier>.bak-<date>, conserve le bit exécutable des scripts et remet la
|
||||
# propriété à root (les fichiers du dépôt appartiennent à l'utilisateur).
|
||||
sys_deploy() {
|
||||
local src="$1" dest="$2" skip="${3:-}" n=0
|
||||
[[ -d "$src" ]] || return 0
|
||||
while IFS= read -r -d '' f; do
|
||||
local rel="${f#$src/}"
|
||||
# artefacts Python éventuels : jamais déployés
|
||||
case "$rel" in
|
||||
*/__pycache__/*|*.pyc) continue ;;
|
||||
esac
|
||||
if [[ -n "$skip" && "$rel" == "$skip" ]]; then
|
||||
continue
|
||||
fi
|
||||
local target="$dest/$rel"
|
||||
if [[ -e "$target" ]] && ! cmp -s "$f" "$target"; then
|
||||
$SUDO cp -a "$target" "$target.bak-$(date +%Y%m%d-%H%M%S)"
|
||||
fi
|
||||
$SUDO install -D -m "$(stat -c '%a' "$f")" -o root -g root "$f" "$target"
|
||||
n=$((n + 1))
|
||||
done < <(find "$src" -type f -print0)
|
||||
say " → $dest ($n fichier(s))"
|
||||
}
|
||||
|
||||
say "Installation du thème violet 💜"
|
||||
say "Source : $SRC_DIR"
|
||||
say "Cible : $HOME_DIR"
|
||||
@@ -99,13 +129,17 @@ else
|
||||
fi
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
# 2. Hyprland (hyprland.conf, hyprlock, hyprpaper)
|
||||
# 2. Hyprland (hyprland.lua, hyprland.conf, hyprlock, hyprpaper)
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
# Depuis Hyprland 0.57 la config est lue en Lua : un hyprland.lua présent
|
||||
# prend le pas sur hyprland.conf. On installe les deux (le .conf reste la
|
||||
# référence lisible, le .lua est celui qui s'applique).
|
||||
HYPR_DST="$HOME_DIR/.config/hypr"
|
||||
for f in hyprland.conf hyprlock.conf hyprlock-violet.conf; do
|
||||
for f in hyprland.lua hyprland.conf hyprlock.conf hyprlock-violet.conf; do
|
||||
backup "$HYPR_DST/$f"
|
||||
done
|
||||
mkdir -p "$HYPR_DST"
|
||||
cp "$SRC_DIR/hypr/hyprland.lua" "$HYPR_DST/"
|
||||
cp "$SRC_DIR/hypr/hyprland.conf" "$HYPR_DST/"
|
||||
cp "$SRC_DIR/hypr/hyprlock.conf" "$HYPR_DST/"
|
||||
cp "$SRC_DIR/hypr/hyprlock-violet.conf" "$HYPR_DST/"
|
||||
@@ -263,7 +297,30 @@ if $DO_SDDM; then
|
||||
fi
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
# 9. Dépendances (option --install-deps, paquets Arch)
|
||||
# 9. Fichiers système (option --system, sudo requis)
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
# Recopie l'arborescence system/ du dépôt vers la racine réelle : scripts FWS
|
||||
# de /usr/local/bin (dont fws-powermenu), ressources de /usr/local/share/fws,
|
||||
# thèmes GRUB de /boot, sessions Wayland, conf SDDM…
|
||||
# /etc/default/grub est volontairement ignoré : c'est l'option --grub qui le
|
||||
# gère, sinon le thème GRUB repasserait sur catppuccin au lieu de violet.
|
||||
if $DO_SYSTEM; then
|
||||
if [[ ! -d "$SRC_DIR/system" ]]; then
|
||||
warn "dossier system/ introuvable — étape système ignorée"
|
||||
else
|
||||
SUDO=""
|
||||
[[ $EUID -ne 0 ]] && SUDO="sudo"
|
||||
say "copie des fichiers système (sudo requis)…"
|
||||
warn "les fichiers remplacés sont conservés en <fichier>.bak-<date>"
|
||||
sys_deploy "$SRC_DIR/system/usr" /usr
|
||||
sys_deploy "$SRC_DIR/system/boot" /boot
|
||||
sys_deploy "$SRC_DIR/system/etc" /etc default/grub
|
||||
say "scripts et ressources FWS à jour dans /usr/local (dont fws-powermenu)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
# 10. Dépendances (option --install-deps, paquets Arch)
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
DEPS=(hyprland hyprlock hyprpaper waybar wofi kitty btop mako grim slurp wl-clipboard \
|
||||
playerctl pavucontrol noto-fonts ttf-nerd-fonts-symbols network-manager-applet \
|
||||
@@ -279,7 +336,7 @@ if $DO_DEPS; then
|
||||
fi
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
# 10. Scripts FWS manquants (rappel)
|
||||
# 11. Scripts FWS manquants (rappel)
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
MISSING=()
|
||||
for cmd in fws-powermenu fws-keys fws-updates-check fws-update fws-brightness fws-hello; do
|
||||
|
||||
@@ -9,7 +9,14 @@ import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
_WOFI_STYLE = "/usr/local/share/fws/wofi-style.css"
|
||||
# Style passé à wofi, par ordre de préférence : d'abord le style violet
|
||||
# installé par le thème dans le profil utilisateur (Super+X — alimentation —
|
||||
# et Super+R — applications — partagent ainsi le même look), sinon le style
|
||||
# système FWS s'il est présent.
|
||||
_WOFI_STYLE_CANDIDATES = (
|
||||
os.path.expanduser("~/.config/wofi/style.css"),
|
||||
"/usr/local/share/fws/wofi-style.css",
|
||||
)
|
||||
_HYPR = bool(os.environ.get("HYPRLAND_INSTANCE_SIGNATURE"))
|
||||
|
||||
# (libellé affiché, commande shell). L'icône Nerd Font aide au repérage.
|
||||
@@ -34,8 +41,10 @@ def _menu(entries):
|
||||
if _HYPR:
|
||||
cmd = ["wofi", "--dmenu", "--prompt", "Alimentation",
|
||||
"--width", "300", "--height", "260", "--cache-file", "/dev/null"]
|
||||
if os.path.exists(_WOFI_STYLE):
|
||||
cmd += ["--style", _WOFI_STYLE]
|
||||
style = next((s for s in _WOFI_STYLE_CANDIDATES
|
||||
if os.path.exists(s)), None)
|
||||
if style:
|
||||
cmd += ["--style", style]
|
||||
else:
|
||||
cmd = ["rofi", "-dmenu", "-i", "-p", "Alimentation", "-no-custom",
|
||||
"-theme-str", "window { width: 300px; } listview { lines: 5; }"]
|
||||
|
||||
Reference in new issue
Block a user