Skip to content

Commit

Permalink
🚧 migrating to chezmoi and mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
aminedjeghri authored and aminedjeghri committed Feb 10, 2025
1 parent b150024 commit 89e77f7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 121 deletions.
1 change: 1 addition & 0 deletions .chezmoidata/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ packages:
brews:
- 'git'
- 'zsh'
- 'chezmoi'
casks:
- 'brave-browser'
- 'raycast'
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ By participating, you are expected to uphold this code. Please report unacceptab
### 4.1 File structure (🌳 Tree)
Check the readme file.

- When you run ``make install``, it will run ``[setup_os.sh](setup_os.sh)`` and ``chezmoi apply``.
- chezmoi apply will run all the scripts that start with ``run_``.
- You can check the [documentation of chezmoi](https://www.chezmoi.io/)

### 4.2 Steps for Installation (Contributors and maintainers)

- The first step is [to install, read and test the project as a user](README.md#-steps-for-installation-users)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ UV := "$$HOME/.local/bin/uv" # keep the quotes incase the path contains spaces

install:
./setup_os.sh
chezmoi apply
@chezmoi apply
# @echo "${YELLOW}=========> Installing dependencies...${NC}"
# @$(UV) sync
@echo "${GREEN}Dependencies installed.${NC}"
# @echo "${GREEN}Dependencies installed.${NC}"

pre-commit:
@echo "${YELLOW}=========> Running pre-commit...${NC}"
Expand Down
20 changes: 3 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ You can follow this repository to get a similar setup on Windows11, Linux or bot
* [Contributing](#contributing)
<!-- TOC -->



## 1. Windows 11-WSL2

Valuable applications & tips for enhancing your Windows user experience, with a focus on creating a productive
Expand Down Expand Up @@ -97,23 +99,7 @@ Based on your needs, you can choose your OS.

## Contributing

- Git clone the repository
- Install and run pre-commit to check the code before pushing it with :
- `pip install pre-commit`
- `pre-commit install`
- `pre-commit run --all-files`

- Generated docs:
- If you modify the README.md file, remember to modify it in the `docs` folder as well and adapt the paths.
- A folder named `docs` contains the docs for generating the website with Jetbrains Writerside plugin.
- Writerside supports only one file named `README.md`, that's why you will find other readme files
like `unix_workflow/README_unix.md` instead of being named `unix_workflow/README.md`.
- Modifying dotfiles like `.zshrc`:
- use `stow` to create symlinks to the dotfiles in your home directory as follows:
- `cd docs/unix_workflow/` then ``stow -t $HOME -R dotfiles ``
- This will create symlinks to the dotfiles in your home directory: ``cd ~ && cat .zshrc``
- WARNING: Windows users can't open the dotfiles in their home directory with their text editor, you can only do it with
the terminal or open them in the repo folder.


**Star History Chart**
[![Star History Chart](https://api.star-history.com/svg?repos=aminedjeghri/awesomewindows11&type=Date)](https://star-history.com/#aminedjeghri/awesomewindows11&Date)
50 changes: 0 additions & 50 deletions dotfiles/dot_zshrc

This file was deleted.

22 changes: 0 additions & 22 deletions dotfiles/run_onchange_1_setup_linux.sh.tmpl

This file was deleted.

13 changes: 0 additions & 13 deletions dotfiles/run_onchange_1_setup_macos.sh.tmpl

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RESET=$(printf '\033[0m')
GREEN=$(printf '\033[0;32m')

echo " ${YELLOW}===========> Second step : running chezmoi apply ${RESET}"
echo " ${YELLOW}===========> Installing apps ${RESET}"
echo " ${YELLOW} Installing apps ${RESET}"
# Function to check for a command and install it if not found
check_and_install() {
local command_name=$1
Expand All @@ -24,18 +24,15 @@ check_and_install() {
fi
}

echo " ${YELLOW} Installing apps ${RESET}"
########## MacOS
{{ if eq .chezmoi.os "darwin" -}}

# Precompute installed brew formulas and casks
installed_brew_apps=$(brew list)

# Install brew formulas
{{ range .packages.darwin.brews -}}
check_and_install {{ . | quote }} "brew install {{ . | quote }}" "${installed_brew_apps}"
{{ end -}}

# Install cask packages
{{ range .packages.darwin.casks -}}
check_and_install {{ . | quote }} "brew install --cask {{ . | quote }}" "${installed_brew_apps}"
{{ end -}}
Expand Down
12 changes: 0 additions & 12 deletions run_onchange_1_setup_linux.sh.tmpl

This file was deleted.

File renamed without changes.

0 comments on commit 89e77f7

Please sign in to comment.