Setup OpenCode in WSL# Install and Set Up OpenCode on Windows with SAIA
## Install Alacritty
Download this terminal emulator:
[here](https://github.com/alacritty/alacritty/releases/download/v0.17.0/Alacritty-v0.17.0-portable.exe)
Save the file to a location where you can easily run it.
## Install OpenCode in WSL
1. Open Alacritty.
2. Install WSL (Windows Subsystem for Linux) by running `wsl --install`.
3. Reboot your system.
4. Reopen PowerShell via Alacritty.
5. Install a distro by running `wsl.exe --install -d Ubuntu-24.04`.
6. Follow the instructions for setting up a username and password. When typing the password, it won't be visible for privacy reasons.
7. If you are not already inside WSL, run `wsl`. You should now see a long path at the beginning of your prompt, starting with `/mnt/c/Users/...`. Everything under the `C:` directory resides on your Windows C: drive.
8. Install OpenCode via: `curl -fsSL https://opencode.ai/install | bash`
9. Close and reopen WSL.
10. Configure OpenCode. In WSL, move to your home directory via `cd ~`. Then navigate to `cd ~/.config/opencode/`.
11. Open the file `opencode.jsonc` with `nano`.
12. Replace the content of the file with the following:
```jsonc
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"myprovider": {
"npm": "@ai-sdk/openai-compatible",
"name": "SAIA",
"options": {
"baseURL": "https://chat-ai.academiccloud.de/v1",
"apiKey": ""
},
"models": {
"devstral-2-123b-instruct-2512": {
"name": "devstral-2-123b-instruct-2512",
"limit": {
"context": 250000,
"output": 65536
}
},
"glm-4.7": {
"name": "GLM-4.7",
"limit": {
"context": 200000,
"output": 65536
}
},
"qwen3-coder-30b-a3b-instruct": {
"name": "QWEN 3 Coder",
"limit": {
"context": 256000,
"output": 65536
}
}
}
}
},
"permission": {
"*": "allow",
"bash": "ask",
"external_directory":"ask",
"doom_loop": "deny"
}
}
```
13. In the `"apiKey"` line, add **your** API key obtained for SAIA: [here](https://docs.hpc.gwdg.de/services/ai-services/saia/index.html#api-request)
14. Close and save the file.
15. You are now set up to use OpenCode.
## Use OpenCode in WSL
1. Open Alacritty and start WSL.
2. `cd` into the desired working directory where you want to use OpenCode.
3. Start OpenCode via `opencode`.
4. In the OpenCode interface, press `Ctrl+P`. This will open a menu. Select the model you want under the SAIA entry. OpenCode will remember this selection.
5. Press `Esc`, then start planning and building with the AI together! :)
Asahi Linux Setup# Set up Asahi Linux for Scientific Work and My Comfort
## Comfort
### Update, Non-Free and DRM
After first boot run
```zsh
sudo dnf update --refresh
```
For Web Spotify run
```zsh
sudo widevine-installer
```
Netflix will still not work, follow the [Asahi Docs FAQ](https://docs.fedoraproject.org/en-US/fedora-asahi-remix/faq/#_how_do_i_access_protected_content_in_browsers_widevine_drm)
[RPM Fusion](https://docs.fedoraproject.org/en-US/quick-docs/rpmfusion-setup/) for restricted codecs (H.265/HEVC,AC-4, etc.)
```zsh
sudo dnf install \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
```
### Reactivate the Notch
Use this command
```zsh
sudo grubby --args=appledrm.show_notch=1 --update-kernel=ALL
```
And reboot
For more info read about the [Unified Grub Config](https://fedoraproject.org/wiki/Changes/UnifyGrubConfig)
### Install zsh with plugins and make it default
```
sudo dnf install zsh
chsh
```
Follow the process and enter `/bin/zsh`. This changed the login shell
```
chsh -s /opt/bin/zsh
```
To change the interactive shell. Now logout and in again for changes to take effect.
Install [oh-my-zsh](https://ohmyz.sh/)
```zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```
Install the plugin [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) for fish like suggestions
Clone
```
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
```
Add the plugin to the list of plugins for Oh My Zsh to load inside the `~/.zshrc`:
```.zshrc
plugins=(
# other plugins...
zsh-autosuggestions
)
```
## Science Stuff
### Install Zotero
- Download Zorero [pre built binary](https://repo.archlinuxcn.org/aarch64/)
- extract
- move content with `rsync -avz $PATH_TO_EXTRACTED_TAR/usr/lib/zotero /opt/`
- create a `zotero.desktop` file in `.local/share/applications/` and fill with the follwing:
```.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/opt/zotero/zotero
Name=Zotero
Icon=/opt/zotero/icons/icon128.png
```
- (optional) install the firefox extension
### Julia
```
curl -fsSL https://install.julialang.org | sh
```
### List of Software available via dnf
- thunderbird: A mail Client
- alacritty: A terminal emulator
- vim-X11: Vim that support the global clipboard, maybe
Pi Pico C/C++ SDK# Pi Pico Projects
## Installation of Pi Pico C/C++ SDK for Asahi Linux F41
This is a setup guide oriented at the offical Getting Started Guide from Pi Pico C/C++ SDK. As Asahi Linux is a Fedora System as of now, these instructions should also work on other Fedota systems, however I have not tested it.
Start by creating a pico project dir and install the necessary toolchain for cross compilation.
```bash
cd ~
mkdir pico && cd pico
git clone https://github.com/raspberrypi/pico-sdk.git --branch maste
cd pico-sdk
git submodule update --init
cd ..
git clone https://github.com/raspberrypi/pico-examples.git --branch master
sudo dnf install arm-none-eabi-gcc-cs arm-none-eabi-newlib arm-none-eabi-gcc-cs-c++
```
Also make sure, that Developer tools are installed, i.e. cmake
Then adding the pi pico sdk to path in `.zshrc`
```zsh
vim ~/.zshenv
```
Then add a line with
```zsh
export PICO_SDK_PATH=$HOME/pico/pico-sdk
```
and source the `.zshenv` file or reopen a new terminal.
For building an example:
```bash
cd ~/pico/pico-examples
mkdir build && cd build
cmake ..
cd blink
make -j4
```
When everything runs without errors, there will be a `blink.uf2`, which can be copied to a RP Pi Pico.
When running the first cmake command, you will get the warning that picotools is not installed.
## Installation of picotool
picotool is used to interact with a RP2040 that is connected via usb.
```bash
cd ~/pico
git clone https://github.com/raspberrypi/picotool.git
cd picotool
mkdir build && cd build
cmake ..
make
```
Now you can run `picotool` from the current directory. If you want global acces cp the `picotool` executable to a place that is availabel on `$PATH`. For me this is
```bash
cp picotool $HOME/.local/bin
```
### References
- [Getting started with Raspberry Pi Pico-series C/C++](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf)
- [C/C++ SDK Documentation](https://www.raspberrypi.com/documentation/microcontrollers/c_sdk.html)
Vim Configuration# My Vim Configuration
This is an detailed explenation of how I set up vim on my machine. In this case I first did this on my Asahi Linux machine, but this guide should be so detailed, that it should wprk on other machines as well.
## Getting Started/Prerequisits
To get started you need a farley new vim version installed. My version by the time of writing is 9.1. Also make sure that your vim version supports clipboard if you want to be able to yank and paste to and from system clipboard. On Fedora I installed vim-x11 and aliased it in my `.zshrc` to vim. You can check if you vim is compiled with clipboard support by running inside vim
```vim
:echo has('clipboard')
```
Create the follwing directories and the main configuration `.vimrc` file
```bash
cd ~
mkdir -p .vim/autoload .vim/plugged
vim .vimrc
```
You should now open an empty file, which will be the main configuration. You can source this file from within vim by typing
```vim
:source %
```
to see changes applied imediately.
## Basic Settings
## Plugins
### Install Dependencies
## Shortcuts
## My Workflows