Skip to content

Commit

Permalink
📝 update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AmineDjeghri committed Jul 28, 2024
1 parent 9c001bb commit 1e45b1f
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Read more about it here:
WSL2 enables users to run Linux applications and use command-line tools natively on their Windows machines.
This integration allows users
to enjoy the familiarity of Windows while simultaneously harnessing the power and flexibility of Linux.
Also, a surprising number of Linux GUI apps can run on WSL. GUI applications are officially supported on WSL2 and referred to as [WSLg](https://github.com/microsoft/wslg)(No installation required).

| | macOS | Linux | Windows with WSL |
|--------------|-------------------------------------------------------------------------------|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Read more about it here:
WSL2 enables users to run Linux applications and use command-line tools natively on their Windows machines.
This integration allows users
to enjoy the familiarity of Windows while simultaneously harnessing the power and flexibility of Linux.
Also, a surprising number of Linux GUI apps can run on WSL. GUI applications are officially supported on WSL2 and referred to as [WSLg](https://github.com/microsoft/wslg)(No installation required).

| | macOS | Linux | Windows with WSL |
|--------------|-------------------------------------------------------------------------------|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down
1 change: 1 addition & 0 deletions docs/shortcuts_and_apps_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ shortcuts: You can read more about the shortcuts [here](https://github.com/glaze
- Use the debug function when needed.
- Every time you start a project, edit the configuration template of python and python tests(autodetect and pytest) to select a default working directory for all your scripts. This will prevent you from having problems with working directory location when running from the terminal and pycharm.
- You can Run pytest just by right-clicking on a function bloc, file, or folder!
- Git Clone : You can directly clone a repository from your git accounts by going to the Menu bar | VCS | Get from Version Control | GitHub | and select the right repository.
- Commits : [doc](https://www.jetbrains.com/help/pycharm/log-tab.html)
- pre-commit hooks: If you use conda as an interpreter in pycharm, you need to install pre-commit with pip in the environment that you are using. After the installation, see in the commit options (wheel button) next to the message if `Run git hooks` is there. If it isn't, then restart pycharm.
- When you write in your terminal: `pip list | grep pre-commit` you should see the package. Running `pre-commit --version` should also work.
Expand Down
6 changes: 4 additions & 2 deletions docs/unix_workflow/README_unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

A set of configurations, dotfiles and a script to automatically set up a powerful terminal & shell utilities(zsh, fzf...), themes like Powerlvl10k, Conda, GPU drivers, and more on Linux/WSL2.

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).
I developed this tool to streamline the setup process when working on various servers,
such as AWS & Azure VM 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).


## Step 1 - Terminal customization :
Expand Down
2 changes: 1 addition & 1 deletion docs/unix_workflow/cuda_pytorch_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ if device.type == 'cuda':
print('Cached: ', round(torch.cuda.memory_reserved(0)/1024**3,1), 'GB')
```

- When utilizing pre-commit hooks, ensure to exclude the file requirements-cuda.txt to prevent sorting the packages.
- When using pre-commit hooks, ensure to exclude the file requirements-cuda.txt to prevent sorting the packages.
- Prioritize the installation of applications using pip; if pip is not applicable, resort to conda; and if conda is not an option, utilize apt-get. For instance, when installing Tesseract through conda, it is preferable to install it within the conda environment rather than globally using apt-get.
Binary file added docs/windows_workflow/DisplayFusion Backup.reg
Binary file not shown.
17 changes: 12 additions & 5 deletions docs/windows_workflow/README_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercon
- Always use the Windows search bar to search for functionalities, settings, apps, files, folders, and more. Even the deep settings are accessible from the search bar.
- Change the display settings if you want to adjust the refresh rate, resolution etc.. (windows + p) -> display settings
- Disconnect/extend/ duplicate a monitor if you have multiple ones (windows + p) -> display settings -> select the monitor monitor -> next to identify, select the right option.
-Remember, each monitor configuration requires its own settings adjustments. Here's how it works:
- Remember, each monitor configuration requires its own settings adjustments. Here's how it works:
- If you have one monitor and customize the refresh rate, then you moved to two monitors, you need to adjust the refresh rate for this new configuration. Next time when you switch between a single monitor and a dual monitor, Windows will remember your settings for both configurations.
- If you switch to three monitors, you need to customize the settings (like the refresh rate) for each one for this new configuration (triple monitor settings),
- When you return to the two-monitor/ single monitor setup, Windows will remember your previous settings, so you won't need to change them again.
Expand All @@ -126,8 +126,9 @@ iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercon
- You can import my settings: [link](Files_3.0.15.0.zip). Open Files -> Settings -> advanced -> import settings
- DisplayFusion (paid):
- use the Steam version (it can be used on multiple computers with the same steam account)
- it adds lot of features to windows monitor settings.
- There are 4 apps available after the installation . The main ones are : DisplayFusion and "monitor settings displayfusion"
- it adds a lot of features to Windows monitor settings.
- There are four apps available after the installation. The main ones are: DisplayFusion and "monitor settings displayfusion"
-
### 2.3. Dev Software & Websites
#### 2.3.1. PyCharm:
- I prefer to use PyCharm (the Pro version is free for students)
Expand Down Expand Up @@ -168,7 +169,7 @@ The most amazing thing about WSL (WSL2.0 exactly) is: You can run Linux in Windo

### 3.1. Install WSL:
- Automatic installation of WSL available with this [command](#2-software)
- Or manual installation: Run this command in powershell ``` wsl --install ```
- Or manual installation: Run this command in PowerShell ``` wsl --install ```

- Restart your computer
- When installing WSL, it comes with Ubuntu (you can always install other distibutions from the microsoft store)
Expand Down Expand Up @@ -201,7 +202,12 @@ shell, install Miniconda, CUDA, and more:
- [4. Python package example](../unix_workflow/package_example)


### 3.3. WSL2 Tips & Tricks :
### 3.3. WSL2 Utilities, Tips & Tricks :
- Take a look at [awesome-wsl](https://github.com/sirredbeard/awesome-wsl)
- A surprising number of Linux GUI apps can run on WSL. GUI applications are officially supported on WSL2 and referred to as [WSLg](https://github.com/microsoft/wslg)(No installation required).
- [Windows Hello on WSL]( https://github.com/nullpo-head/WSL-Hello-sudo)
-

- Find WSL path: `\\wsl$\Ubuntu\home` or `\\wsl$\Ubuntu` then ping it in Windows Explorer's sidebar.
- You can use `wslpath` command to convert a Windows path to wsl path: `wslpath 'C:\Users\AmineDjeghri\Desktop\'`
- Folder size for current directory: `du -h`, `du -h | sort -h`. For specific directory: `du -h /folder`
Expand All @@ -222,6 +228,7 @@ wsl --setdefault <name_of_your_distro>
- (pycharm) Use WSL/ubuntu as the default terminal in pycharm: `settings -> tools -> terminal` and put in a shell path: `ubuntu run`
- (pycharm) Add WSL conda interpreter in Pycharm (add interpreter -> WSL -> conda) and select the global conda: `/home/amine/miniconda3/bin/conda`. Then click on load environments, and it will automatically detect all the conda envs.


### 3.4. backup and restore WSL
You can export wsl image after finishing all the steps to save it in case you move to a new computer :
- wsl --terminate ubuntu
Expand Down
10 changes: 9 additions & 1 deletion docs/windows_workflow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,29 @@ workspaces:
display_name: "1.🌐 Browser"
# Optionally prevent workspace from being deactivated when empty.
keep_alive: true
bind_to_monitor: 1
- name: "2"
display_name: "2.💻Pycharm"
keep_alive: true
# Optionally force the workspace on a specific monitor if it exists. Use the monitor's number
# as shown in the Windows display settings (eg. 1, 2, 3...).
bind_to_monitor: 2
- name: "3"
display_name: "3.📂Explorer"
keep_alive: true
bind_to_monitor: 1
- name: "4"
display_name: "4.📝Editors"
keep_alive: true
bind_to_monitor: 2
- name: "5"
display_name: "5.💬Social"
keep_alive: true
bind_to_monitor: 1
- name: "6"
display_name: "6.🎮Gaming"
keep_alive: true
bind_to_monitor: 1
- name: "7"
- name: "8"
- name: "9"
Expand Down Expand Up @@ -315,4 +323,4 @@ keybindings:
- commands: ["move to workspace 8"] #, "focus workspace 8"]
binding: "Alt+Shift+8"
- commands: ["move to workspace 9"] #, "focus workspace 9"]
bindings: ["Alt+Shift+9"]
bindings: ["Alt+Shift+9"]

0 comments on commit 1e45b1f

Please sign in to comment.