Skip to content

Commit

Permalink
✨ add powershell script for an automated windows installation
Browse files Browse the repository at this point in the history
  • Loading branch information
AmineDjeghri committed Jan 13, 2024
1 parent b508587 commit e73a379
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 144 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,18 @@ themes like Powerlvl10k, Conda, GPU drivers, and more on Linux/WSL2, again autom

Get started with one command (manual installation can be found in the docs below):
```bash
sh -c "$(wget https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/unix_workflow/auto_linux_setup.sh -O -)"
sh -c "$(wget https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/unix_workflow/setup_linux.sh -O -)"
```
- **My Linux/WSL2 docs**: Read more here: [README](docs/unix_workflow/README_unix.md) / [website](https://setup.aminedjeghri.com/readme-unix.html)

## Windows 11/WSL2
Valuable applications & tips for enhancing your Windows user experience, with a focus on creating a productive environment incorporating WSL 2 (Linux).

Get started with two commands (manual installation can be found in the docs below):
1. Run this command in Powershell to install WSL2 with ubuntu:
Get started with one command (powershell):

```powershell
wsl --install -d ubuntu
```
2. Restart your computer. A WSL window will pop up, choose a username & a password for ubuntu.
3. Run this command in WSL (and not Powershell) to select the Windows apps you want (Powershell solution coming soon):
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/windows_workflow/install_windows_apps.sh)"
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/windows_workflow/setup_windows.ps1'))
```

- **My Windows/WSL2 docs**: Read more here: [windows_workflow_README.](docs/windows_workflow/README_windows.md) / [website](https://setup.aminedjeghri.com/readme-windows.html)
Expand Down Expand Up @@ -75,5 +71,10 @@ 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`.

You can also sync the repository's dotfiles with your local machine with `stow`:
```bash
stow -t ~ <folder_name>
```

**Star History Chart**
[![Star History Chart](https://api.star-history.com/svg?repos=aminedjeghri/awesomewindows11&type=Date)](https://star-history.com/#aminedjeghri/awesomewindows11&Date)
10 changes: 6 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ themes like Powerlvl10k, Conda, GPU drivers, and more on Linux/WSL2, again autom

Get started with one command :
```bash
sh -c "$(wget https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/unix_workflow/auto_linux_setup.sh -O -)"
sh -c "$(wget https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/unix_workflow/setup_linux.sh -O -)"
```
Read more about it here: [README](unix_workflow/README_unix.md) / [website](https://setup.aminedjeghri.com/readme-unix.html)

## Windows 11/WSL2
Valuable applications & tips for enhancing your Windows user experience, with a focus on creating a productive environment incorporating WSL 2 (Linux).

Get started with one command (works on WSL only, Powershell solution coming soon):
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/windows_workflow/install_windows_apps.sh)"
Get started with one command (powershell):

```powershell
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/windows_workflow/setup_windows.ps1'))
```

Read more about it here: [windows_workflow_README.](windows_workflow/README_windows.md) / [Website](https://setup.aminedjeghri.com/readme-windows.html)
Expand Down
2 changes: 1 addition & 1 deletion docs/unix_workflow/README_unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ While it's particularly useful for Python developers, feel free to customize it
## Step 2 - Run the script :
- Run this command & choose what to install: oh-my-zsh, pl10k theme, 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 -)"
sh -c "$(wget https://raw.githubusercontent.com/AmineDjeghri/Awesome-Windows11-WSL-Linux/master/unix_workflow/setup_linux.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.
Expand Down
15 changes: 15 additions & 0 deletions docs/unix_workflow/dotfiles/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,18 @@ alias fz='selected_dir=$(find $HOME -maxdepth 8 -type d | fzf); [ -n "$selected_
# fzf
export FZF_DEFAULT_COMMAND="find ."
bindkey -s '^f' 'fz'

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/amine/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/amine/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/amine/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/amine/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
File renamed without changes.
39 changes: 21 additions & 18 deletions docs/windows_workflow/README_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ You can follow this repository to get a similar setup.
* [4. More (deprecated)](#4-more-deprecated)
<!-- TOC -->

Get started with one command (powershell):

```powershell
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/windows_workflow/setup_windows.ps1'))
```

## 1. Windows account & configuration
### 1.1. Windows account
1. If you already have a key: activate windows with your key
Expand All @@ -50,10 +56,6 @@ You can follow this repository to get a similar setup.
- 🎧 Deactivate lowering communication sounds in advanced audio settings.

## 2. Software
You can install most of the apps with the following command (works on WSL only, Powershell solution coming soon):
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/AmineDjeghri/awesome-os-setup/main/docs/windows_workflow/install_windows_apps.sh)"
```
### 2.1. Mainstream Software
- <ins> Browser</ins>: I recommend Brave (or Edge or Firefox). Remember to change your sync settings to import your passwords, bookmarks...ect.
- [browser_extensions.md](browser_extensions.md): useful extensions for productivity & security
Expand Down Expand Up @@ -81,15 +83,12 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/AmineDjeghri/awesome-os-
- <ins> Audio </ins> : ear trumpet
- <ins> Nvidia Driver </ins> : Geforce Experience (no need for cuda if you code using WSL)
- <ins> Screen recording </ins> : Screen recorder: OBS or native windows screen recorder `⊞ + G` or `⊞ + alt + R`
- <ins> Screenshot </ins> : ShareX (portable) - screen capturing with regions and GIF recording , use CTRL + print screen key `ctrl + print`
- <ins> Streaming services </ins> : Netflix, Prime in Windows store and browser. Browser is better in terms of stability, lists, content and vpn use. On the other hand, Netflix from the store app and Netflix on Edge browser can handle 7.1 and 4k streaming. To add windows apps downloaded from windows store in the taskbar or the desktop :Press Windows key + R then enter shell:appsfolder then drag and drop .
- <ins> Screenshot </ins> : ShareX (portable) - screen capturing with regions and GIF recording, use `ctrl + print` (you can also import your settings, follow this [link](https://techunwrapped.com/can-i-take-my-sharex-capture-settings-to-another-pc/))
- <ins> Streaming services </ins> : Netflix, Prime in Windows store and browser. Browser is better in terms of stability, lists, content and vpn use. On the other hand, Netflix from the store app and Netflix on Edge browser can handle 7.1 and 4k streaming. To add Windows apps downloaded from windows store in the taskbar or the desktop :Press Windows key + R then enter shell:appsfolder then drag and drop .
- <ins> other apps </ins> :
- Privacy apps: O&O ShutUp 10: privacy control windows
- WinAero Tweaker: Customize the Windows context menu & other stuff
- DS4Windows: make playstation controllers work on PC: https://github.com/Ryochan7/DS4Windows/releases
- Hide the Windows taskbar (right-click on the taskbar -> taskbar settings-> taskbar behavior (at the bottom) -> hide automatically the taskbar).
- Pin some folders and drivers, Recycle Bin in the file explorer. Fast browsing: right-click on the file explorer in the taskbar to show the shortcut to the pinned folders.
- Auto lock screen after x minutes of inactivity: search for `screen saver` in windows and select the number of minutes before your computer auto locks itself.

### 2.2. UI/UX Software
- PowerToys:
Expand All @@ -112,31 +111,35 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/AmineDjeghri/awesome-os-
- Download [Files](https://files.community/). There are two version : direct installer (free) & Microsoft Store (paid)
- Replace Windows File explorer with Files: [link](https://files.community/docs/configuring/replace-file-explorer/)
- You can import my settings: [link](Files_3.0.15.0.zip). Open Files -> Settings -> advanced -> import settings
- Tips:
- Hide the Windows taskbar (right-click on the taskbar -> taskbar settings-> taskbar behavior (at the bottom) -> automatically hide the taskbar).
- Pin some folders and drivers, Recycle Bin in the file explorer. Fast browsing: right-click on the file explorer in the taskbar to show the shortcut to the pinned folders.
- Auto lock screen after x minutes of inactivity: search for `screen saver` in windows and select the number of minutes before your computer auto locks itself.

### 2.3. Dev Software
#### 2.3.1. <ins>PyCharm</ins>:
### 2.3. Dev Software & Websites
#### 2.3.1. PyCharm:
- I prefer to use PyCharm (the Pro version is free for students)
- CAREFUL when creating a project, you should use the anaconda env (windows/WSL) and not install a new python interpreter or using virtualenv
- Sync pycharm settings : https://www.jetbrains.com/help/pycharm/sharing-your-ide-settings.html#IDE_settings_sync
- [pycharm settings, tips & tricks](https://github.com/AmineDjeghri/Awesome-Windows11-WSL/blob/master/Pycharm_WSL_Anaconda.md)

#### 2.3.2. <ins>Windows Terminal</ins>
#### 2.3.2. Windows Terminal
- Always use Windows terminal. It contains all the terminals in one place (ubuntu, powershell, wsl, cmd...ect). You can right-click on any folder to open it.
- Configure Windows Terminal UI
- 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).
- Copy my [settings.json](settings.json) for the Windows Terminal to the following location: `C:\Users\%UserProfile%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState` (the theme used is called night owl).
- Alternatively, you can open the Windows Terminal and navigate to Settings -> Profiles (bottom left) -> default -> Additional Parameters -> Appearance -> Change the font to FiraCode, the opacity to 85% and the background color to night owl.
- wget on Windows terminal: add it to your terminal: https://www.programmersought.com/article/90723524682/

#### 2.3.3. <ins>Docker Desktop</ins>
#### 2.3.3. Docker Desktop
Requires WSL (see the WSL section). You can start, stop, delete containers easily, access & edit files right inside the container without the need of a terminal.
#### 2.3.4. <ins>Sublime Text</ins> (Free):

#### 2.3.4. Sublime Text
- Extremely lightweight.
- (recommended) CheatSheet
- (optional) Run from CLI: add it to your path and run `subl` to open a file.

#### 2.3.5. <ins>Other apps </ins>
- <ins>ssh key</ins>: If you have WSL, you can generate an ssh key with `ssh-keygen -t rsa` (when prompted, enter an empty password).
#### 2.3.5. Other apps, websites & tips
- <ins>Pycharm Jupyter Notebook</ins>: Use the one provided in Pycharm. It provides better autocomplete.
- <ins>Free Cloud GPU </ins> Google Colab/Kaggle you can either put your git repositories inside Google Drive to use them in colab, or git clone inside colab.
- <ins>Filezilla</ins>: for SFTP (work with a private key: add it in edit/connection/sftp or use pageant)
Expand Down Expand Up @@ -175,12 +178,12 @@ The most amazing thing about WSL (WSL2.0 exactly) is: You can run Linux in Windo
systemd=true
```
- Restart the terminal and run `systemctl list-unit-files --type=service` in WSL to see some processes running.
- If you don't have an SSH key, generate a new SSH key using : `ssh-keygen -t rsa` inside linux.
- If you have an ssh key in windows in `C:\Users\%UserProfile%\.ssh`, copy it (both keys) to linux `~/.ssh` folder or using Windows file explorer or power toys `\\wsl$\Ubuntu\home\%USERNAME%\.ssh` and change its rights using: `chmod 600 ~/.ssh/id_rsa` and `chmod 600 ~/.ssh/id_rsa.pub`.
- If you don't have an SSH key, generate a new SSH key using: `ssh-keygen -t rsa` inside linux (when prompted, you can enter an empty password).

### 3.2. Linux/WSL Setup - terminal, shell, Miniconda, CUDA & More:
[Linux Setup Guide](../unix_workflow/README_unix.md): 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.


Advanced configuration:
- [Cuda & Pytorch installation inside conda](../unix_workflow/1_cuda_pytorch_install.md)
- [Pycharm settings, tips & tricks](../unix_workflow/2_pycharm_wsl_conda.md)
Expand Down
3 changes: 0 additions & 3 deletions docs/windows_workflow/install_windows_apps.bat

This file was deleted.

109 changes: 0 additions & 109 deletions docs/windows_workflow/install_windows_apps.sh

This file was deleted.

Loading

0 comments on commit e73a379

Please sign in to comment.