Skip to content

Commit

Permalink
📝 update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AmineDjeghri committed Dec 17, 2023
1 parent dd797d9 commit e9a5fc4
Show file tree
Hide file tree
Showing 25 changed files with 1,104 additions and 327 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Build documentation

on:
# If specified, the workflow will be triggered automatically once you push to the `main` branch.
# Replace `main` with your branch’s name
push:
branches: ["main"]
# Specify to run a workflow manually from the Actions tab on GitHub
workflow_dispatch:

# Gives the workflow permissions to clone the repo and create a page deployment
permissions:
id-token: write
pages: write

env:
# Name of module and id separated by a slash
INSTANCE: Writerside/awl
# Replace HI with the ID of the instance in capital letters
ARTIFACT: webHelpAWL2-all.zip
# Writerside docker image version
DOCKER_VERSION: 232.10275
# Add the variable below to upload Algolia indexes
# Replace HI with the ID of the instance in capital letters
ALGOLIA_ARTIFACT: algolia-indexes-AWL.zip

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build Writerside docs using Docker
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}

- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
artifacts/report.json
retention-days: 7

# Add the step below to upload Algolia indexes
- name: Upload algolia-indexes
uses: actions/upload-artifact@v3
with:
name: algolia-indexes
path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
retention-days: 7

# Add the job below and artifacts/report.json on Upload documentation step above if you want to fail the build when documentation contains errors
test:
# Requires build job results
needs: build
runs-on: ubuntu-latest

steps:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: docs
path: artifacts

- name: Test documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Requires the build job results
needs: test
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: docs

- name: Unzip artifact
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir

- name: Setup Pages
uses: actions/configure-pages@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: dir

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Awesome-Windows11-WSL-Linux
<!---![Windows WSL Terminal](resources/windows_wsl_terminal.png)-->
![Windows WSL Terminal with taskbar](resources/windows_wsl_terminal_taskbar.png)
![Windows WSL Terminal with taskbar](images/windows_wsl_terminal_taskbar.png)

The image you are looking at is a screenshot of a WSL Ubuntu terminal in Windows 11. The top bar is an app called GlazeWM.
You can follow this repository to get a similar setup.
Expand Down Expand Up @@ -32,13 +31,13 @@ You can follow this repository to get a similar setup.
- (+) Well-suited for coding with Windows Subsystem for Linux (WSL) and no need for dual boot.
- (-) UI is not smooth and responsive compared to macOS & Linux

Within the domain of development, Unix-based systems such as Linux and macOS frequently garner attention. Nevertheless, the integration of WSL allows smooth coding alongside the utilization of Adobe and Microsoft products that may lack support on Linux. This flexibility, coupled with the ability to handle resource-intensive games beyond MacOS capabilities, positions Windows-WSL as an enticing platform, ensuring a well-rounded computing experience for all users, regardless of their workplace constraints.
Within the domain of development, Unix-based systems such as Linux and macOS frequently garner attention. Nevertheless, the integration of WSL allows smooth coding alongside the utilization of Adobe and Microsoft products that may lack support on Linux. This flexibility, coupled with the ability to handle resource-intensive games beyond macOS capabilities, positions Windows-WSL as an enticing platform, ensuring a well-rounded computing experience for all users, regardless of their workplace constraints.

Based on your needs, you can choose your OS.

## Awesome Piracy :
https://github.com/Igglybuff/awesome-piracy


## Star History (do not forget to star the repo 😁 )
## Star History (remember to star the repo 😁)
[![Star History Chart](https://api.star-history.com/svg?repos=aminedjeghri/awesomewindows11&type=Date)](https://star-history.com/#aminedjeghri/awesomewindows11&Date)
21 changes: 21 additions & 0 deletions Writerside/awl.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE instance-profile
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">

<instance-profile id="awl"
name="Awesome Windows Linux" start-page="README.md">

<toc-element topic="README.md"/>
<toc-element toc-title="unix_workflow">
<toc-element topic="2_pycharm_wsl_conda.md"/>
<toc-element topic="1_cuda_pytorch_install.md"/>
<toc-element topic="0_unix_workflow_README.md"/>
<toc-element toc-title="package_example">
<toc-element topic="package_example_README.md"/>
</toc-element>
</toc-element>
<toc-element toc-title="windows_workflow">
<toc-element topic="browser_extensions.md"/>
<toc-element topic="0_windows_workflow_README.md"/>
</toc-element>
</instance-profile>
6 changes: 6 additions & 0 deletions Writerside/c.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE categories
SYSTEM "https://resources.jetbrains.com/writerside/1.0/categories.dtd">
<categories>
<category id="wrs" name="Writerside documentation" order="1"/>
</categories>
12 changes: 12 additions & 0 deletions Writerside/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<variables></variables>
<build-profile instance="awl">
<variables>
<noindex-content>true</noindex-content>
</variables>
</build-profile>

</buildprofiles>
File renamed without changes
File renamed without changes
43 changes: 43 additions & 0 deletions Writerside/topics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Awesome-Windows11-WSL-Linux
![Windows WSL Terminal with taskbar](windows_wsl_terminal_taskbar.png)

The image you are looking at is a screenshot of a WSL Ubuntu terminal in Windows 11. The top bar is an app called GlazeWM.
You can follow this repository to get a similar setup.

## Content of repository
- Linux (Ubuntu 22.04): [unix_workflow/README](0_unix_workflow_README.md).
- can be used for Linux and WSL2.
- Windows 11 & WSL2: [windows_workflow/README](0_windows_workflow_README.md).
- Valuable tips for enhancing your Windows user experience, with a focus on creating a productive environment incorporating WSL 2 (Linux).
- Windows apps to enhance your productivity.
- Includes a guide for installing WSL 2 and configuring it to work with Windows Terminal.
- WSL setup & Linux guides & automated scripts [unix_workflow/README](0_unix_workflow_README.md) to automate the installation of essential components like terminal utilities, Conda, GPU drivers, and more.
- No need for dual boot anymore, and includes SSH, SFTP with UI (Pycharm/FileZilla).
- Browser extensions: [browser_extensions.md](windows_workflow/browser_extensions.md).

## Why this repository
#### Why Windows mixed with Linux (WSL)? Linux's users, please read till the end and don't be mad. 😅
**macOS:**
- (+) Excellent for coding and video editing. Supports Adobe & Office products.
- (-) Limited gaming capabilities compared to Windows & Linux.

**Linux:**
- (+) Ideal for coding and gaming, providing good performance in both areas.
- (-) Lacks support for Adobe & Office products and certain software.

**Windows with WSL:**
- (+) Seamless compatibility with diverse software, including Adobe & Office products.
- (+) Optimal choice for gaming enthusiasts.
- (+) Well-suited for coding with Windows Subsystem for Linux (WSL) and no need for dual boot.
- (-) UI is not smooth and responsive compared to macOS & Linux

Within the domain of development, Unix-based systems such as Linux and macOS frequently garner attention. Nevertheless, the integration of WSL allows smooth coding alongside the utilization of Adobe and Microsoft products that may lack support on Linux. This flexibility, coupled with the ability to handle resource-intensive games beyond macOS capabilities, positions Windows-WSL as an enticing platform, ensuring a well-rounded computing experience for all users, regardless of their workplace constraints.

Based on your needs, you can choose your OS.

## Awesome Piracy :
https://github.com/Igglybuff/awesome-piracy


## Star History (remember to star the repo 😁)
[![Star History Chart](https://api.star-history.com/svg?repos=aminedjeghri/awesomewindows11&type=Date)](https://star-history.com/#aminedjeghri/awesomewindows11&Date)
111 changes: 111 additions & 0 deletions Writerside/topics/unix_workflow/0_unix_workflow_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
Linux / WSL2 (Ubuntu 22.04) Workflow
==================
![Windows WSL Terminal](windows_wsl_terminal.png)

Welcome to the guide for setting up a powerful terminal & python environment on Linux/WSL.

**Table of Contents**
<!-- TOC -->
* [Linux / WSL2 (Ubuntu 22.04) Workflow](#linux--wsl2-ubuntu-2204-workflow.)
* [1. Setup Linux automatically](#1-setup-linux-automatically.)
* [1.1. Terminal customization](#11-terminal-customization.)
* [1.2. Run the script](#12-run-the-script.)
* [2. Setup Linux manually](#2-setup-linux-manually.)
* [2.1. Terminal customization](#21-terminal-customization.)
* [2.2. Linux shell customization](#22-linux-shell-customization.)
* [2.2.1. Install ZSH](#221-install-zsh.)
* [2.2.2. Install Oh-my-zsh](#222-install-oh-my-zsh.)
* [2.2.3. Install the power-level-10k theme](#223-install-the-power-level-10k-theme.)
* [2.2.4. install miniconda in WSL](#224-install-miniconda-in-wsl.)
* [2.2.5. Install Cuda using conda](#225-install-cuda-using-conda.)
<!-- TOC -->

The repository contains an automated script to install the main elements I use in Linux/WSL. The repository is currently in development (maybe will add an Ansible version in the future).
My workflow involves utilizing WSL for development tasks and relying on Windows for all other activities. You can check the parent README here: https://github.com/AmineDjeghri/Awesome-Windows11-WSL


## 1. Setup Linux automatically
I developed this tool to streamline the setup process when working on various servers, such as AWS instances and not having to install everything manually every time.
While it's particularly useful for Python developers, feel free to customize it for your specific needs. The script is in bash (might move to Ansible in the future).

### 1.1. Terminal customization
- Download and install the [Firacode font](https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/FiraCode.zip) on your primary operating system (Windows if you are using WSL).
- Configure your terminal to utilize the newly installed font. For Windows, check this [link](README.md#23-dev-software--pycharm-sublime-text-windows-terminal-docker-desktop). For Linux ##TODO.
### 1.2. Run the script
- Run this command to install customize the shell: oh-my-zsh, pl10k theme, and install miniconda & cuda (if you have a GPU) automatically:
```bash
sh -c "$(wget https://raw.githubusercontent.com/AmineDjeghri/Awesome-Windows11-WSL-Linux/master/unix_workflow/auto_linux_setup.sh -O -)"
```
- Do not run the script with `sudo` otherwise it will install some packages in `/root` instead of `/home`.
- Also, make sure to type `yes` when installing conda. If you are facing some problems, take a look at section 2.2.
- (Optional) If you have custom configurations in your `.bashrc`, consider copying them to the `.zshrc` file.
- (Optional) If you have ssh keys, copy them to the `.ssh` folder.

## 2. Setup Linux manually

### 2.1. Terminal customization
This step involves installing the font and is the same as in the previous [section](unix_workflow_#11-terminal-customization.)
### 2.2. Linux shell customization
##### 2.2.1. Install ZSH
1. install Zsh:
- With the package manager of your choice, _e.g._ `sudo apt install zsh`
2. Verify installation by running `zsh --version`. Expected result: `zsh 5.8.1` or more recent.
3. Run `zsh` to start configuring it (You can create an empty file with 0, will configure it later). You can delete .zshrc and run `zsh` to configure
it again.
4. Log out and log back in again to use your new default shell.
5. Optional:Make it your default shell: `chsh -s $(which zsh)` but doesn't work on every system. If it doesn't work, will do it later with oh-my-zsh. Test that it worked with `echo $SHELL`. Expected result: `/bin/zsh` or similar.Test with `$SHELL --version`. Expected result: 'zsh 5.8' or similar

source : https://github.com/ohmyzsh/wiki/edit/main/Installing-ZSH.md

##### 2.2.2. Install Oh-my-zsh
- Oh My Zsh is an open source, community-driven framework for managing your zsh configuration.
- Run `sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"` and hit yes to make it the default terminal.
- Test if it worked with `echo $SHELL`. Expected result: `/bin/zsh` or similar. Test with `$SHELL --version`: An expected result: 'zsh 5.8' or similar
- If you have conda / cuda or something installed: copy the content from `.bashrc` to `.zshrc` (`vim .zshrc` or use Windows explorer / sublime text. Run again `zsh`, you should see the `(base)` name before the command.

<ins>Zsh Plugins</ins>
A Zsh plugin is a set of useful aliases and functions designed to make you more productive. Here are some useful & popular plugins :

```
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git $ZSH_CUSTOM/plugins/zsh-autocomplete
```

Open your .zshrc file at ~/.zshrc (you can do that through Windows explorer and sublime text as you did before) and search for `plugins=(git)`.
If you don't find it, then create it and complete it with the missing plugins as shown in the example bellow :
```
plugins=(git
dirhistory
history
colored-man-pages
jsontools
zsh-autosuggestions
zsh-syntax-highlighting
zsh-autocomplete
```
- Run `zsh` to restart the terminal, now you can see the changes when you try to write a command like `cd`
- If there are some problems, test the solutions available [here](https://stackoverflow.com/a/37175174/8354747) & [here](https://stackoverflow.com/a/36994356/8354747)
Others :
- Auto update oh my zsh: uncomment this: `zstyle ':omz:update' mode auto`
- Add the following alias to the end of .zshrc file to easily open sublime Text from windows: `alias sublime="subl.exe"`. Try it with: `sublime .zshrc`
- You can visit this [website](https://www.linkedin.com/pulse/how-install-start-using-oh-my-zsh-boost-your-mantas-levinas/?trk=pulse-article_more-articles_related-content-card) to understand more about the installed plugins. you can skip directly to `7. Enable Zsh Plugins` section and start reading. You will see that you have installed most of the commands there.

##### 2.2.3. Install the power-level-10k theme
- This theme requires the font Firacode. Check the section setup terminal if you didn't install it yet.
- Power-level10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.
- `git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k`
- Open .zshrc and set `ZSH_THEME="powerlevel10k/powerlevel10k"`.
- reload ubuntu terminal with `zsh` and configure your theme.

##### 2.2.4. install miniconda in WSL
- run `wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh` (Conda 23.3.1 Python 3.10.10 released April 24, 2023)
- run `chmod +x Miniconda3-latest-Linux-x86_64.sh`
- run `bash Miniconda3-latest-Linux-x86_64.sh`
- restart the shell with `bash` command (or `zsh` if you changed your shell)
- if `(base)` is not showing and `.bachrc` file doesn't contain the init of conda, go to `~/miniconda3/bin` and run `conda init`
- close and reopen ubuntu terminal or run `bash`, you should see `(base)` at the left of any command.
- run `conda env list` to check the installed environments and their path.

##### 2.2.5. Install Cuda using conda
- Follow this [conda_cuda_installation guide](1_cuda_pytorch_install.md)
Loading

0 comments on commit e9a5fc4

Please sign in to comment.