107 lines
2.3 KiB
Markdown
107 lines
2.3 KiB
Markdown
# Dotfiles
|
|
|
|
Configuration personnelle de Zsh, Zellij et Spaceship, gérée avec [GNU Stow](https://www.gnu.org/software/stow/) et installée automatiquement sur Debian/Ubuntu.
|
|
|
|
## Structure
|
|
|
|
```text
|
|
~/.dotfiles/
|
|
├── dotfiles/
|
|
│ ├── zellij/
|
|
│ │ └── dot-config/
|
|
│ │ └── zellij/
|
|
│ │ ├── config.kdl
|
|
│ │ ├── layouts/
|
|
│ │ │ └── default.kdl
|
|
│ │ └── plugins/
|
|
│ │ └── monocle.wasm
|
|
│ └── zsh/
|
|
│ ├── dot-zsh/
|
|
│ │ └── spaceship.zsh
|
|
│ ├── dot-zshrc
|
|
│ └── dot-zshrc.perso
|
|
├── install/
|
|
│ └── install.sh
|
|
├── LICENSE
|
|
└── README.md
|
|
```
|
|
|
|
L'option `--dotfiles` de Stow transforme automatiquement les fichiers `dot-*` en fichiers cachés :
|
|
|
|
```text
|
|
dot-zshrc → ~/.zshrc
|
|
dot-zshrc.perso → ~/.zshrc.perso
|
|
dot-zsh → ~/.zsh/
|
|
```
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
git clone https://gitlabns.nameshield.net/an.ginder/dotfiles.git ~/.dotfiles
|
|
cd ~/.dotfiles
|
|
./install/install.sh
|
|
```
|
|
|
|
Le script installe :
|
|
|
|
- les dépendances système (`zsh`, `stow`, `fzf`, `zoxide`, etc.) ;
|
|
- Rust/Cargo si nécessaire ;
|
|
- Zellij via Cargo ;
|
|
- Spaceship dans `~/.zsh/spaceship-prompt` ;
|
|
- les outils Rust `bat`, `bottom`, `diskus`, `procs` et `cargo-update` ;
|
|
- les configurations avec Stow.
|
|
|
|
## Gestion des fichiers existants
|
|
|
|
L'installation est non destructive.
|
|
Si un fichier existe déjà :
|
|
|
|
- un symlink correct est conservé ;
|
|
- un fichier ou symlink différent est sauvegardé avant l'installation.
|
|
|
|
Les backups sont placés dans :
|
|
|
|
```text
|
|
~/.dotfiles-backup/YYYYMMDD-HHMMSS/
|
|
```
|
|
|
|
## Après installation
|
|
|
|
Les configurations sont des symlinks vers le dépôt :
|
|
|
|
```bash
|
|
readlink -f ~/.zshrc
|
|
readlink -f ~/.config/zellij/config.kdl
|
|
```
|
|
|
|
Les modifications effectuées dans `dotfiles/` sont donc immédiatement prises en compte.
|
|
|
|
Pour mettre à jour le dépôt :
|
|
|
|
```bash
|
|
cd ~/.dotfiles
|
|
git pull
|
|
```
|
|
|
|
Pour sauvegarder ses modifications :
|
|
|
|
```bash
|
|
git add -A
|
|
git commit -m "update config"
|
|
git push
|
|
```
|
|
|
|
## Stow manuellement
|
|
|
|
Réinstaller les configurations :
|
|
|
|
```bash
|
|
cd ~/.dotfiles/dotfiles
|
|
stow --dotfiles --restow --target="$HOME" zsh zellij
|
|
```
|
|
|
|
Simuler l'opération :
|
|
|
|
```bash
|
|
stow --dotfiles --restow --simulate --verbose --target="$HOME" zsh zellij
|
|
``` |