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
grubby --args=apple_dcp.show_notch=1 --update-kernel=ALL
```
Or edit `/etc/default/grub` and add `apple_dcp.show_notch=1` to `GRUB_CMDLINE_LINUX_DEFAULT`. Then use the command
```zsh
sudo grub2-mkconfig -o /etc/grub2.cfg
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
OpenMP on Mac (ARM64)# How to build a C++ project with OpenMP dependence on Mac Arm arch64
Have homebrew installed
```bash
export OpenMP_ROOT=$(brew --prefix)/opt/libomp
export LDFLAGS=-L$(brew --prefix)/lib
export CPPFLAGS=-I$(brew --prefix)/include
```
As of 02.07.2025
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