diff --git a/INSTALL_GUIDE.md b/INSTALL_GUIDE.md new file mode 100644 index 0000000000..41d1812105 --- /dev/null +++ b/INSTALL_GUIDE.md @@ -0,0 +1,97 @@ +# Install guide macbook m-series (m1 & m2) + +⚠️⚠️⚠️**This is experimental and might leave your machine in an unusuable state.**⚠️⚠️⚠️ + +## before we start + +Installation requires a dual boot of your macbook. This means Omarchy will live side by side with your existing macOS. + +If you don't have space on your machine I recommend looking at the top comment on this reddit thread: +https://www.reddit.com/r/MacOS/comments/154rp99/how_to_do_i_clear_system_data_on_mac_os/ + +This and removing a bunch of unused files removed about 100gb of data to available space for omarchy. + +You should always back up any data or files that you don't want to lose. + +## Dual boot Asahi-alarm + +### installation + +Follow the instructions on how to dual boot your macbook with asahi-alarm + +**Choose the minimal installation!** + +This will create a new partition on your machine and install arch on it! + +Follow these instructions: https://asahi-alarm.org/ + + +### get internet +Follow these instructions once the installation is complete [manual installation guide](https://github.com/asahi-alarm/asahi-alarm/blob/main/manual-install.md) + +This lets you set up wifi for your laptop. + +### Create a user + +Now we are logged in as root, lets create a user + + ``` + +# Create a new user with home directory +useradd -m youruser # Replace 'youruser' with your desired username + +# Set password for the new user +passwd youruser + +# Add user to the wheel group (for sudo access) +usermod -aG wheel youruser +``` + +run `visudo` and look for the line and uncomment it + + +``` +# %wheel ALL=(ALL:ALL) ALL +``` + + +## Install omarchy + +first we need to install the package wget + +``` +pacman -S wget +``` + +to install omarchy we need to run as the user we just created before, run the command + +``` +su - youruser +``` + + +now lets install omarchy, run the command + + +``` +wget -qO- https://raw.githubusercontent.com/nilszeilon/armarchy/refs/heads/master/boot.sh | OMARCHY_ARM=true bash +``` + +if nothing happens, check that you typed in the correct url before piping to bash with + +``` +wget -qO- https://raw.githubusercontent.com/nilszeilon/armarchy/refs/heads/master/boot.sh +``` + +This step will take some time. + +If you run into problems where the AUR is slow, try to enable mirror repositories by editing `sudo vim /etc/pacman.d/mirrorlist` and uncomment a couple of lines starting with `# Server = ...`. + +**If the installation crashes** - just run the suggested command but with the `OMARCHY_ARM` flag set like this `OMARCHY_ARM=true bash ~/.local/share/omarchy/install.sh` until it finishes. + + +# Uninstall + +Uninstall is super easy, big recommend to this guy + +https://youtu.be/nMnWTq2H-N0?si=7RsKKRSC5n9-aboF diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 5bc88dbd88..11855778cf 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -35,7 +35,11 @@ edit_in_nvim() { } open_web() { - setsid chromium --new-window --app="$1" & + if [ -n "$OMARCHY_ARM" ]; then + setsid brave --new-window --app="$1" & + else + setsid chromium --new-window --app="$1" & + fi } install() { diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index 81607137ec..b74d59e61c 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -39,12 +39,18 @@ else gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue" fi -# Change Chromium colors -if [[ -f ~/.config/omarchy/current/theme/chromium.theme ]] && command -v chromium &>/dev/null; then - chromium --no-startup-window --set-theme-color="$(<~/.config/omarchy/current/theme/chromium.theme)" +if [ -n "$OMARCHY_ARM" ]; then + # Change Brave colors + # TODO: temporary + brave --no-startup-window --set-theme-color="28,32,39" else - # Use a default, neutral grey if theme doesn't have a color - chromium --no-startup-window --set-theme-color="28,32,39" + # Change Chromium colors + if [[ -f ~/.config/omarchy/current/theme/chromium.theme ]] && command -v chromium &>/dev/null; then + chromium --no-startup-window --set-theme-color="$(<~/.config/omarchy/current/theme/chromium.theme)" + else + # Use a default, neutral grey if theme doesn't have a color + chromium --no-startup-window --set-theme-color="28,32,39" + fi fi # Trigger alacritty config reload diff --git a/bin/omarchy-webapp-install b/bin/omarchy-webapp-install index b54a881f47..b37e1daa32 100755 --- a/bin/omarchy-webapp-install +++ b/bin/omarchy-webapp-install @@ -27,7 +27,20 @@ if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then return 1 fi -cat >"$DESKTOP_FILE" <"$DESKTOP_FILE" <"$DESKTOP_FILE" <>~/.config/hypr/envs.conf +fi + # Setup GPG configuration with multiple keyservers for better reliability sudo mkdir -p /etc/gnupg sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/ diff --git a/install/desktop/audio.sh b/install/desktop/audio.sh new file mode 100644 index 0000000000..14e0e6e289 --- /dev/null +++ b/install/desktop/audio.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# on macbook m-series we need pipewire +if [ -n "$OMARCHY_ASAHI_ARM" ]; then + yay -S --needed --noconfirm pipewire-alsa pipewire-pulse wireplumber pipewire-jack asahi-audio +fi diff --git a/install/desktop/desktop.sh b/install/desktop/desktop.sh index 45d893217d..d7836754ec 100644 --- a/install/desktop/desktop.sh +++ b/install/desktop/desktop.sh @@ -5,8 +5,13 @@ yay -S --noconfirm --needed \ fcitx5 fcitx5-gtk fcitx5-qt wl-clip-persist \ nautilus sushi ffmpegthumbnailer gvfs-mtp \ slurp satty \ - mpv evince imv \ - omarchy-chromium-bin + mpv evince imv + +if [ -n "$OMARCHY_ARM" ]; then + curl -fsS https://dl.brave.com/install.sh | sh +else + yay -S --noconfirm --needed omarchy-chromium-bin +fi # Add screen recorder based on GPU if lspci | grep -qi 'nvidia'; then diff --git a/install/development/development.sh b/install/development/development.sh index 20d895738d..8f1d761c1d 100644 --- a/install/development/development.sh +++ b/install/development/development.sh @@ -1,8 +1,17 @@ #!/bin/bash -yay -S --noconfirm --needed \ - cargo clang llvm mise \ - imagemagick \ - mariadb-libs postgresql-libs \ - github-cli \ - lazygit lazydocker-bin +if [ -z "$OMARCHY_ARM" ]; then + yay -S --noconfirm --needed \ + cargo clang llvm mise \ + imagemagick \ + mariadb-libs postgresql-libs \ + github-cli \ + lazygit lazydocker-bin +else + yay -S --noconfirm --needed \ + cargo clang llvm mise \ + imagemagick \ + mariadb-libs postgresql-libs \ + github-cli \ + lazygit lazydocker +fi diff --git a/install/preflight/guard.sh b/install/preflight/guard.sh index 9d90c2280b..bc2b4117a6 100644 --- a/install/preflight/guard.sh +++ b/install/preflight/guard.sh @@ -17,8 +17,21 @@ done # Must not be running as root [ "$EUID" -eq 0 ] && abort "Running as user (not root)" -# Must be x86 only to fully work -[ "$(uname -m)" != "x86_64" ] && abort "x86_64 CPU" +# Auto-detect ARM architecture and set flags +arch=$(uname -m) +if [[ "$arch" == "aarch64" || "$arch" == "arm64" ]]; then + export OMARCHY_ARM=true + export OMARCHY_BARE=true + echo "Auto-detected ARM architecture: $arch" + echo "Setting OMARCHY_ARM=true and OMARCHY_BARE=true" +fi + +# Must be x86 or ARM architecture +if [ -z "$OMARCHY_ARM" ]; then + [ "$(uname -m)" != "x86_64" ] && abort "x86_64 CPU" +else + [[ "$arch" != "aarch64" && "$arch" != "arm64" ]] && abort "ARM CPU" +fi # Must not have Gnome or KDE already install pacman -Qe gnome-shell &>/dev/null && abort "Fresh + Vanilla Arch" diff --git a/migrations/1755244361.sh b/migrations/1755244361.sh new file mode 100644 index 0000000000..8011a7f3fd --- /dev/null +++ b/migrations/1755244361.sh @@ -0,0 +1,8 @@ +# Add state for arm achitecture +if [[ $(uname -m) == "arm"* || $(uname -m) == "aarch64" || -n "$OMARCHY_ARM" ]]; then + # Do something for ARM + echo "Running on ARM architecture" + + mkdir -p ~/.local/state/omarchy + touch ~/.local/state/omarchy/arm.mode +fi