Initial commit: SkyOS source code
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
e641720a3c
30 files changed
+5836
No files matched your search
Executable
+167
@@ -0,0 +1,167 @@
|
||||
#!/usr/bin/env bash
|
||||
# SkyOS base system builder
|
||||
# Builds a bootable ISO from an Arch Linux base with the SkyWM desktop.
|
||||
# Run this on an existing Arch Linux install or in a Docker container.
|
||||
#
|
||||
# Usage: sudo ./build-base.sh
|
||||
# Output: skyos.iso
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
WORK=/tmp/skyos-build
|
||||
ISO_NAME=skyos.iso
|
||||
SKYOS_PKGS=(
|
||||
# base
|
||||
base linux linux-firmware
|
||||
# bootloader (EFI + BIOS — covers Intel Macs via rEFInd)
|
||||
grub efibootmgr refind
|
||||
# X11 stack (no display manager, just startx)
|
||||
xorg-server xorg-xinit xorg-xrandr xorg-xsetroot
|
||||
xterm
|
||||
# fonts
|
||||
ttf-dejavu ttf-liberation noto-fonts
|
||||
# hardware support for Intel Macs
|
||||
broadcom-wl-dkms # WiFi
|
||||
xf86-video-intel # GPU (older iGPU Macs)
|
||||
xf86-input-libinput
|
||||
alsa-utils # audio
|
||||
# tools
|
||||
thunar # file manager
|
||||
mousepad # text editor (GTK, lightweight)
|
||||
feh # desktop wallpaper setter
|
||||
picom # compositor (optional shadows)
|
||||
networkmanager # networking
|
||||
sudo git nano
|
||||
)
|
||||
|
||||
echo ">>> Creating chroot at $WORK"
|
||||
mkdir -p "$WORK"
|
||||
|
||||
echo ">>> Bootstrapping Arch base"
|
||||
pacstrap "$WORK" "${SKYOS_PKGS[@]}"
|
||||
|
||||
echo ">>> Configuring system"
|
||||
arch-chroot "$WORK" /bin/bash -s <<'CHROOT'
|
||||
# locale
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
locale-gen
|
||||
echo "LANG=en_US.UTF-8" > /etc/locale.conf
|
||||
|
||||
# hostname
|
||||
echo "skyos" > /etc/hostname
|
||||
cat > /etc/hosts <<EOF
|
||||
127.0.0.1 localhost
|
||||
::1 localhost
|
||||
127.0.1.1 skyos.localdomain skyos
|
||||
EOF
|
||||
|
||||
# timezone
|
||||
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
|
||||
hwclock --systohc
|
||||
|
||||
# default user
|
||||
useradd -m -G wheel,audio,video,storage -s /bin/bash sky
|
||||
echo "sky:skyos" | chpasswd
|
||||
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
|
||||
|
||||
# enable services
|
||||
systemctl enable NetworkManager
|
||||
|
||||
# initramfs
|
||||
mkinitcpio -P
|
||||
CHROOT
|
||||
|
||||
echo ">>> Installing SkyWM & Deskbar binaries"
|
||||
cp "$(dirname "$0")/../wm/skywm" "$WORK/usr/local/bin/skywm"
|
||||
cp "$(dirname "$0")/../deskbar/skydeskbar" "$WORK/usr/local/bin/skydeskbar"
|
||||
chmod 755 "$WORK/usr/local/bin/skywm" "$WORK/usr/local/bin/skydeskbar"
|
||||
|
||||
echo ">>> Writing xinitrc"
|
||||
cat > "$WORK/home/sky/.xinitrc" <<'XINITRC'
|
||||
#!/bin/sh
|
||||
# Set wallpaper (restores saved choice, or uses default)
|
||||
skywallpaper
|
||||
|
||||
# Apply GTK theme
|
||||
export GTK_THEME=SkyOS
|
||||
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
||||
cat > "$HOME/.gtkrc-2.0" <<EOF
|
||||
include "/usr/share/themes/SkyOS/gtk-2.0/gtkrc"
|
||||
EOF
|
||||
mkdir -p "$HOME/.config/gtk-3.0"
|
||||
cat > "$HOME/.config/gtk-3.0/settings.ini" <<EOF
|
||||
[Settings]
|
||||
gtk-theme-name=SkyOS
|
||||
gtk-font-name=Sans 10
|
||||
gtk-icon-theme-name=Adwaita
|
||||
gtk-cursor-theme-name=DMZ-White
|
||||
gtk-button-images=false
|
||||
gtk-menu-images=false
|
||||
EOF
|
||||
|
||||
# Compositor (subtle shadows, fast fade)
|
||||
picom --config /etc/skyos/picom.conf &
|
||||
|
||||
# Alt+F1 global hotkey for launcher (via xbindkeys)
|
||||
xbindkeys &
|
||||
|
||||
# Launch Deskbar
|
||||
skydeskbar &
|
||||
|
||||
# Launch window manager (last, takes over the session)
|
||||
exec skywm
|
||||
XINITRC
|
||||
chmod 755 "$WORK/home/sky/.xinitrc"
|
||||
arch-chroot "$WORK" chown sky:sky /home/sky/.xinitrc
|
||||
|
||||
echo ">>> Writing xbindkeys config (Alt+F1 = launcher)"
|
||||
cat > "$WORK/home/sky/.xbindkeysrc" <<'XBK'
|
||||
"skylauncher"
|
||||
Mod1 + F1
|
||||
XBK
|
||||
arch-chroot "$WORK" chown sky:sky /home/sky/.xbindkeysrc
|
||||
|
||||
echo ">>> Installing picom config"
|
||||
mkdir -p "$WORK/etc/skyos"
|
||||
cp "$(dirname "$0")/../themes/picom.conf" "$WORK/etc/skyos/picom.conf"
|
||||
|
||||
echo ">>> Installing GTK theme"
|
||||
mkdir -p "$WORK/usr/share/themes"
|
||||
cp -r "$(dirname "$0")/../themes/SkyOS" "$WORK/usr/share/themes/"
|
||||
|
||||
echo ">>> Installing skywallpaper helper"
|
||||
cp "$(dirname "$0")/../themes/skywallpaper" "$WORK/usr/local/bin/skywallpaper"
|
||||
chmod 755 "$WORK/usr/local/bin/skywallpaper"
|
||||
|
||||
echo ">>> Generating default wallpaper"
|
||||
mkdir -p "$WORK/usr/share/skyos/wallpapers"
|
||||
(cd "$WORK/usr/share/skyos/wallpapers" && bash "$(dirname "$0")/../themes/wallpapers/generate-default.sh") || true
|
||||
|
||||
echo ">>> Installing rEFInd bootloader config for Intel Macs"
|
||||
mkdir -p "$WORK/boot/EFI/refind"
|
||||
cat > "$WORK/boot/EFI/refind/refind.conf" <<'REFIND'
|
||||
timeout 5
|
||||
use_graphics_for linux
|
||||
scanfor manual
|
||||
menuentry "SkyOS" {
|
||||
icon /EFI/refind/icons/os_linux.png
|
||||
volume "SkyOS"
|
||||
loader /boot/vmlinuz-linux
|
||||
initrd /boot/initramfs-linux.img
|
||||
options "root=LABEL=SkyOS rw quiet splash"
|
||||
}
|
||||
REFIND
|
||||
|
||||
echo ">>> Creating ISO"
|
||||
# mkarchiso requires archiso package
|
||||
if command -v mkarchiso &>/dev/null; then
|
||||
# Minimal archiso profile pointing to our chroot
|
||||
mkarchiso -v -w /tmp/skyos-iso-work -o . "$WORK"
|
||||
mv *.iso "$ISO_NAME"
|
||||
else
|
||||
echo "WARNING: archiso not installed. To build the ISO:"
|
||||
echo " pacman -S archiso && rerun this script"
|
||||
echo " OR: use the chroot at $WORK to install manually."
|
||||
fi
|
||||
|
||||
echo ">>> Done. Output: $ISO_NAME (or chroot at $WORK)"
|
||||
@@ -0,0 +1,57 @@
|
||||
# SkyOS ISO builder
|
||||
# Uses official Arch Linux as the base — provides pacman, pacstrap, archiso.
|
||||
# Build context: the repo root (OS/)
|
||||
#
|
||||
# Build: docker build -t skyos-builder -f iso/docker/Dockerfile .
|
||||
# Run: docker run --privileged -v $(pwd)/dist:/dist skyos-builder
|
||||
# Output: dist/skyos.iso
|
||||
|
||||
FROM archlinux:latest
|
||||
|
||||
# ── disable pacman seccomp sandbox (breaks under QEMU on Apple Silicon) ──
|
||||
RUN echo "DisableSandbox" >> /etc/pacman.conf
|
||||
|
||||
# ── install build tools ────────────────────────────────────────────────
|
||||
RUN pacman -Syu --noconfirm && \
|
||||
pacman -S --noconfirm \
|
||||
archiso \
|
||||
base-devel \
|
||||
libx11 \
|
||||
libxft \
|
||||
fontconfig \
|
||||
freetype2 \
|
||||
imagemagick \
|
||||
fakeroot \
|
||||
git \
|
||||
sudo \
|
||||
&& pacman -Scc --noconfirm
|
||||
|
||||
# ── build OnlyOffice from AUR (as a non-root build user) ─────────────
|
||||
RUN useradd -m builder && \
|
||||
echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder
|
||||
RUN su builder -c " \
|
||||
git clone --depth=1 https://aur.archlinux.org/onlyoffice-bin.git /tmp/onlyoffice && \
|
||||
cd /tmp/onlyoffice && \
|
||||
makepkg -s --noconfirm 2>&1 | tail -5 \
|
||||
" && \
|
||||
find /tmp/onlyoffice -name '*.pkg.tar.zst' -exec cp {} /onlyoffice.pkg.tar.zst \; || \
|
||||
echo "OnlyOffice AUR build failed — will be skipped in ISO"
|
||||
|
||||
# ── show which mkinitcpio hooks archiso installed (helps debugging) ───
|
||||
RUN echo "=== archiso initcpio hooks ===" && \
|
||||
ls /usr/lib/initcpio/hooks/ 2>/dev/null || echo "(none found)"
|
||||
|
||||
# ── copy the entire SkyOS source tree ────────────────────────────────
|
||||
WORKDIR /skyos
|
||||
COPY . .
|
||||
|
||||
# ── build the SkyOS binaries inside the container ────────────────────
|
||||
# pkg-config finds X11/Xft headers automatically on Arch — no overrides needed
|
||||
RUN make
|
||||
|
||||
# ── generate the default wallpaper ───────────────────────────────────
|
||||
RUN bash themes/wallpapers/generate-default.sh || true
|
||||
|
||||
# ── run the ISO build script ──────────────────────────────────────────
|
||||
# --privileged is required for loop device mounts inside the container
|
||||
ENTRYPOINT ["/skyos/iso/docker/entrypoint.sh"]
|
||||
Executable
+685
@@ -0,0 +1,685 @@
|
||||
#!/usr/bin/env bash
|
||||
# Runs inside the Docker container.
|
||||
# Produces /dist/skyos.iso using archiso's "releng" profile as a base.
|
||||
set -euo pipefail
|
||||
|
||||
DIST="${DIST:-/dist}"
|
||||
WORK=/tmp/skyos-work
|
||||
PROFILE=/tmp/skyos-profile
|
||||
SRC=/skyos
|
||||
|
||||
echo "════════════════════════════════════════"
|
||||
echo " SkyOS ISO Builder"
|
||||
echo "════════════════════════════════════════"
|
||||
|
||||
# ── 1. Start from archiso's releng profile ────────────────────────────
|
||||
echo ">>> Copying archiso releng profile..."
|
||||
cp -r /usr/share/archiso/configs/releng "$PROFILE"
|
||||
|
||||
# ── 2. Package list — trim releng defaults, add what we need ─────────
|
||||
cat > "$PROFILE/packages.x86_64" <<'PKGS'
|
||||
base
|
||||
linux
|
||||
linux-firmware
|
||||
mkinitcpio
|
||||
archiso
|
||||
grub
|
||||
efibootmgr
|
||||
syslinux
|
||||
xorg-server
|
||||
xorg-xinit
|
||||
xorg-xrandr
|
||||
xorg-xset
|
||||
xorg-xsetroot
|
||||
xterm
|
||||
ttf-dejavu
|
||||
ttf-liberation
|
||||
noto-fonts
|
||||
libxft
|
||||
fontconfig
|
||||
xf86-video-intel
|
||||
xf86-video-vesa
|
||||
mesa
|
||||
xf86-input-libinput
|
||||
alsa-utils
|
||||
alsa-firmware
|
||||
sof-firmware
|
||||
pipewire
|
||||
pipewire-alsa
|
||||
pipewire-pulse
|
||||
wireplumber
|
||||
networkmanager
|
||||
networkmanager-openvpn
|
||||
broadcom-wl
|
||||
thunar
|
||||
gvfs
|
||||
gvfs-smb
|
||||
tumbler
|
||||
ffmpegthumbnailer
|
||||
file-roller
|
||||
mousepad
|
||||
feh
|
||||
picom
|
||||
xbindkeys
|
||||
arandr
|
||||
pavucontrol
|
||||
brightnessctl
|
||||
dunst
|
||||
network-manager-applet
|
||||
polkit-gnome
|
||||
xdg-user-dirs
|
||||
xdg-utils
|
||||
shared-mime-info
|
||||
desktop-file-utils
|
||||
adwaita-icon-theme
|
||||
gnome-themes-extra
|
||||
hicolor-icon-theme
|
||||
firefox
|
||||
mpv
|
||||
evince
|
||||
viewnior
|
||||
xscreensaver
|
||||
xfce4-power-manager
|
||||
bluez
|
||||
blueman
|
||||
xclip
|
||||
zip
|
||||
unzip
|
||||
p7zip
|
||||
wget
|
||||
curl
|
||||
man-db
|
||||
noto-fonts-emoji
|
||||
playerctl
|
||||
xorg-xkill
|
||||
rsync
|
||||
arch-install-scripts
|
||||
htop
|
||||
nano
|
||||
git
|
||||
sudo
|
||||
bash-completion
|
||||
fastfetch
|
||||
PKGS
|
||||
|
||||
# ── 3. airootfs overlay — files that land in the live system ─────────
|
||||
AIROOTFS="$PROFILE/airootfs"
|
||||
|
||||
# ── Ship our own archiso mkinitcpio hooks ────────────────────────────
|
||||
# Archiso v78+ removed the mkinitcpio hook binaries from the package.
|
||||
# We provide them ourselves so the live initramfs can mount the squashfs.
|
||||
mkdir -p "$AIROOTFS/usr/lib/initcpio/hooks"
|
||||
mkdir -p "$AIROOTFS/usr/lib/initcpio/install"
|
||||
|
||||
# -- archiso hook (runtime: mounts squashfs and sets up overlay) ------
|
||||
cat > "$AIROOTFS/usr/lib/initcpio/hooks/archiso" <<'HOOK'
|
||||
run_hook() {
|
||||
export mount_handler="archiso_mount_handler"
|
||||
}
|
||||
|
||||
archiso_mount_handler() {
|
||||
local _newroot="${1}"
|
||||
local _dev _sfs _i
|
||||
|
||||
[ -z "${archisobasedir}" ] && archisobasedir="arch"
|
||||
if [ -z "${archisolabel}" ]; then
|
||||
echo "ERROR: archisolabel not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Wait up to 30 s for the USB/CD device to appear
|
||||
_i=0
|
||||
while [ "${_i}" -lt 30 ]; do
|
||||
_dev=$(blkid --match-token LABEL="${archisolabel}" --output device 2>/dev/null | head -1)
|
||||
[ -n "${_dev}" ] && break
|
||||
sleep 1
|
||||
_i=$((_i + 1))
|
||||
done
|
||||
if [ -z "${_dev}" ]; then
|
||||
echo "ERROR: archiso: cannot find device with label '${archisolabel}'"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Mount the boot medium (ISO/USB)
|
||||
mkdir -p /run/archiso/bootmnt
|
||||
mount -r "${_dev}" /run/archiso/bootmnt
|
||||
|
||||
# Mount the squashfs
|
||||
_sfs="/run/archiso/bootmnt/${archisobasedir}/x86_64/airootfs.sfs"
|
||||
mkdir -p /run/archiso/airootfs
|
||||
mount -r -t squashfs "${_sfs}" /run/archiso/airootfs
|
||||
|
||||
# Writable tmpfs overlay (so the live session can write)
|
||||
mkdir -p /run/archiso/cowspace
|
||||
mount -t tmpfs -o "size=75%,mode=0755" tmpfs /run/archiso/cowspace
|
||||
mkdir -p /run/archiso/cowspace/upper /run/archiso/cowspace/work
|
||||
|
||||
# Overlay squashfs (ro) + tmpfs (rw) → new root
|
||||
mount -t overlay overlay \
|
||||
-o "lowerdir=/run/archiso/airootfs,upperdir=/run/archiso/cowspace/upper,workdir=/run/archiso/cowspace/work" \
|
||||
"${_newroot}"
|
||||
}
|
||||
HOOK
|
||||
|
||||
# -- archiso install script (build-time: adds binaries/modules to initramfs)
|
||||
cat > "$AIROOTFS/usr/lib/initcpio/install/archiso" <<'INSTALL'
|
||||
build() {
|
||||
add_runscript
|
||||
add_binary blkid
|
||||
add_binary sleep
|
||||
add_module squashfs
|
||||
add_module overlay
|
||||
add_module iso9660
|
||||
add_module vfat
|
||||
add_dir /run/archiso/bootmnt
|
||||
add_dir /run/archiso/airootfs
|
||||
add_dir /run/archiso/cowspace
|
||||
}
|
||||
help() {
|
||||
echo "Mounts the archiso squashfs for live boot."
|
||||
}
|
||||
INSTALL
|
||||
|
||||
# Override the releng archiso.conf — drop memdisk/pxe hooks (memdiskfind
|
||||
# is no longer shipped by syslinux), keep only what we actually provide.
|
||||
mkdir -p "$AIROOTFS/etc/mkinitcpio.conf.d"
|
||||
cat > "$AIROOTFS/etc/mkinitcpio.conf.d/archiso.conf" <<'MKCONF'
|
||||
MODULES=()
|
||||
BINARIES=()
|
||||
FILES=()
|
||||
HOOKS=(base udev microcode archiso block filesystems keyboard)
|
||||
MKCONF
|
||||
echo ">>> Live initramfs HOOKS: base udev microcode archiso block filesystems keyboard"
|
||||
|
||||
# passwd / shadow / group
|
||||
cat > "$AIROOTFS/etc/hostname" <<'EOF'
|
||||
skyos
|
||||
EOF
|
||||
|
||||
# Create 'sky' user in the live environment
|
||||
mkdir -p "$AIROOTFS/etc/sudoers.d"
|
||||
echo "%wheel ALL=(ALL) ALL" > "$AIROOTFS/etc/sudoers.d/wheel"
|
||||
|
||||
# ── 3b. OnlyOffice — create a local pacman repo so mkarchiso can find it
|
||||
if [[ -f /onlyoffice.pkg.tar.zst ]]; then
|
||||
echo ">>> Setting up local OnlyOffice repo..."
|
||||
mkdir -p /skyos-local-repo
|
||||
cp /onlyoffice.pkg.tar.zst /skyos-local-repo/
|
||||
OO_PKG="$(find /skyos-local-repo -name '*.pkg.tar.zst' | head -1)"
|
||||
repo-add /skyos-local-repo/skyos-local.db.tar.gz "$OO_PKG"
|
||||
|
||||
# Prepend [skyos-local] to the profile's pacman.conf
|
||||
sed -i 's/^\[core\]/[skyos-local]\nSigLevel = Never\nServer = file:\/\/\/skyos-local-repo\n\n[core]/' \
|
||||
"$PROFILE/pacman.conf"
|
||||
|
||||
echo "onlyoffice-bin" >> "$PROFILE/packages.x86_64"
|
||||
echo ">>> OnlyOffice repo ready."
|
||||
else
|
||||
echo ">>> OnlyOffice build not available — skipping."
|
||||
fi
|
||||
|
||||
# ── 4. Install SkyOS binaries ─────────────────────────────────────────
|
||||
echo ">>> Installing SkyOS binaries..."
|
||||
mkdir -p "$AIROOTFS/usr/local/bin"
|
||||
install -m755 "$SRC/wm/skywm" "$AIROOTFS/usr/local/bin/skywm"
|
||||
install -m755 "$SRC/deskbar/skydeskbar" "$AIROOTFS/usr/local/bin/skydeskbar"
|
||||
install -m755 "$SRC/launcher/skylauncher" "$AIROOTFS/usr/local/bin/skylauncher"
|
||||
install -m755 "$SRC/themes/skywallpaper" "$AIROOTFS/usr/local/bin/skywallpaper"
|
||||
install -m755 "$SRC/installer/skyinstall" "$AIROOTFS/usr/local/bin/skyinstall"
|
||||
# GUI installer (compiled binary; falls back gracefully if not built)
|
||||
if [[ -f "$SRC/installer/skyinstall-gui" ]]; then
|
||||
install -m755 "$SRC/installer/skyinstall-gui" "$AIROOTFS/usr/local/bin/skyinstall-gui"
|
||||
fi
|
||||
|
||||
# ── 5. GTK theme ──────────────────────────────────────────────────────
|
||||
echo ">>> Installing GTK theme..."
|
||||
mkdir -p "$AIROOTFS/usr/share/themes"
|
||||
cp -r "$SRC/themes/SkyOS" "$AIROOTFS/usr/share/themes/"
|
||||
|
||||
# ── 6. picom config ───────────────────────────────────────────────────
|
||||
mkdir -p "$AIROOTFS/etc/skyos"
|
||||
install -m644 "$SRC/themes/picom.conf" "$AIROOTFS/etc/skyos/picom.conf"
|
||||
|
||||
# ── 7. Default wallpaper ──────────────────────────────────────────────
|
||||
echo ">>> Generating default wallpaper..."
|
||||
mkdir -p "$AIROOTFS/usr/share/skyos/wallpapers"
|
||||
if convert -size 1920x1080 gradient:"#1E3A5A-#0E1A28" \
|
||||
"$AIROOTFS/usr/share/skyos/wallpapers/skyos-default.png" 2>/dev/null; then
|
||||
echo " Wallpaper generated."
|
||||
else
|
||||
echo " (ImageMagick unavailable in container — wallpaper skipped, solid color will be used)"
|
||||
fi
|
||||
|
||||
# ── 8. User skeleton (.xinitrc, GTK config, xbindkeys) ───────────────
|
||||
echo ">>> Writing user skeleton..."
|
||||
SKEL="$AIROOTFS/etc/skel"
|
||||
mkdir -p "$SKEL/.config/gtk-3.0"
|
||||
|
||||
cat > "$SKEL/.xinitrc" <<'XINITRC'
|
||||
#!/bin/sh
|
||||
# SkyOS session startup
|
||||
|
||||
# Merge X resources if present
|
||||
[ -f "$HOME/.Xresources" ] && xrdb -merge "$HOME/.Xresources"
|
||||
|
||||
# Key repeat: 250ms delay, 30/s rate — comfortable for typing
|
||||
xset r rate 250 30
|
||||
|
||||
# HiDPI hint for GTK/Qt (96 DPI default; bump to 144 for HiDPI Macs)
|
||||
xrandr --dpi 96
|
||||
|
||||
# Wallpaper
|
||||
skywallpaper
|
||||
|
||||
# Create standard user directories (Desktop, Downloads, Pictures…)
|
||||
xdg-user-dirs-update 2>/dev/null || true
|
||||
|
||||
# GTK theme
|
||||
export GTK_THEME=SkyOS
|
||||
mkdir -p "$HOME/.config/gtk-3.0"
|
||||
cat > "$HOME/.config/gtk-3.0/settings.ini" <<EOF
|
||||
[Settings]
|
||||
gtk-theme-name=SkyOS
|
||||
gtk-font-name=Sans 10
|
||||
gtk-icon-theme-name=Adwaita
|
||||
gtk-cursor-theme-name=Adwaita
|
||||
EOF
|
||||
cat > "$HOME/.gtkrc-2.0" <<EOF
|
||||
include "/usr/share/themes/SkyOS/gtk-2.0/gtkrc"
|
||||
EOF
|
||||
|
||||
# Audio session (pipewire + wireplumber)
|
||||
pipewire &
|
||||
pipewire-pulse &
|
||||
wireplumber &
|
||||
|
||||
# Privilege escalation agent (needed for Thunar mounts, package managers, etc.)
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
|
||||
# Notifications
|
||||
dunst &
|
||||
|
||||
# Network manager tray applet
|
||||
nm-applet &
|
||||
|
||||
# Compositor
|
||||
picom --config /etc/skyos/picom.conf &
|
||||
|
||||
# Clipboard sync: keep PRIMARY and CLIPBOARD selections in sync
|
||||
if command -v xclip &>/dev/null; then
|
||||
while true; do
|
||||
xclip -o -sel primary 2>/dev/null | xclip -i -sel clipboard 2>/dev/null || true
|
||||
sleep 1
|
||||
done &
|
||||
fi
|
||||
|
||||
# Screen locker daemon (locks after idle timeout)
|
||||
xscreensaver -no-splash &
|
||||
|
||||
# Power management (handles suspend, battery alerts, lid close)
|
||||
xfce4-power-manager &
|
||||
|
||||
# Global hotkeys
|
||||
xbindkeys &
|
||||
|
||||
# Deskbar
|
||||
skydeskbar &
|
||||
|
||||
# Window manager (must be last — controls the session)
|
||||
exec skywm
|
||||
XINITRC
|
||||
chmod 755 "$SKEL/.xinitrc"
|
||||
|
||||
cat > "$SKEL/.xbindkeysrc" <<'XBK'
|
||||
# App launcher
|
||||
"skylauncher"
|
||||
Mod1 + F1
|
||||
|
||||
# Brightness (Mac Fn+F1/F2, also mapped as XF86 keys)
|
||||
"brightnessctl set 10%-"
|
||||
XF86MonBrightnessDown
|
||||
"brightnessctl set +10%"
|
||||
XF86MonBrightnessUp
|
||||
|
||||
# Volume (Mac Fn+F10/F11/F12)
|
||||
"pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
XF86AudioMute
|
||||
"pactl set-sink-volume @DEFAULT_SINK@ -5%"
|
||||
XF86AudioLowerVolume
|
||||
"pactl set-sink-volume @DEFAULT_SINK@ +5%"
|
||||
XF86AudioRaiseVolume
|
||||
XBK
|
||||
|
||||
# ── Font antialiasing (system-wide) ──────────────────────────────────
|
||||
mkdir -p "$AIROOTFS/etc/fonts"
|
||||
cat > "$AIROOTFS/etc/fonts/local.conf" <<'FONTS'
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<match target="font">
|
||||
<edit name="antialias" mode="assign"><bool>true</bool></edit>
|
||||
<edit name="hinting" mode="assign"><bool>true</bool></edit>
|
||||
<edit name="hintstyle" mode="assign"><const>hintslight</const></edit>
|
||||
<edit name="rgba" mode="assign"><const>rgb</const></edit>
|
||||
<edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
|
||||
</match>
|
||||
<!-- Prefer noto for emoji -->
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer><family>DejaVu Serif</family><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer><family>DejaVu Sans</family><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer><family>DejaVu Sans Mono</family></prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
||||
FONTS
|
||||
|
||||
# ── .Xresources — nice dark xterm ────────────────────────────────────
|
||||
cat > "$SKEL/.Xresources" <<'XRES'
|
||||
! SkyOS dark terminal theme
|
||||
XTerm*faceName: DejaVu Sans Mono
|
||||
XTerm*faceSize: 11
|
||||
XTerm*renderFont: true
|
||||
XTerm*antialias: true
|
||||
XTerm*background: #0E1520
|
||||
XTerm*foreground: #C8D4E8
|
||||
XTerm*cursorColor: #4A90D9
|
||||
XTerm*pointerColor: #4A90D9
|
||||
XTerm*selectBackground: #2060A0
|
||||
XTerm*selectForeground: #F0F4FF
|
||||
XTerm*scrollBar: false
|
||||
XTerm*saveLines: 4096
|
||||
XTerm*bellIsUrgent: true
|
||||
XTerm*metaSendsEscape: true
|
||||
XTerm*utf8: 2
|
||||
! Colors: dark background with readable palette
|
||||
XTerm*color0: #1A1E2A
|
||||
XTerm*color1: #CC4444
|
||||
XTerm*color2: #44AA66
|
||||
XTerm*color3: #BBAA22
|
||||
XTerm*color4: #4488CC
|
||||
XTerm*color5: #8844CC
|
||||
XTerm*color6: #44AACC
|
||||
XTerm*color7: #C8D4E8
|
||||
XTerm*color8: #3A4050
|
||||
XTerm*color9: #FF6666
|
||||
XTerm*color10: #66CC88
|
||||
XTerm*color11: #DDCC44
|
||||
XTerm*color12: #66AAFF
|
||||
XTerm*color13: #AA66FF
|
||||
XTerm*color14: #66CCEE
|
||||
XTerm*color15: #EEF4FF
|
||||
! Urxvt (same palette, in case rxvt-unicode is used)
|
||||
URxvt*font: xft:DejaVu Sans Mono:size=11
|
||||
URxvt*background: #0E1520
|
||||
URxvt*foreground: #C8D4E8
|
||||
XRES
|
||||
|
||||
mkdir -p "$SKEL/.config/dunst"
|
||||
cat > "$SKEL/.config/dunst/dunstrc" <<'DUNST'
|
||||
[global]
|
||||
font = Sans 10
|
||||
geometry = "300x5-20+46"
|
||||
transparency = 0
|
||||
frame_color = "#2A3A5A"
|
||||
frame_width = 1
|
||||
separator_color = "#2A3A5A"
|
||||
sort = yes
|
||||
indicate_hidden = yes
|
||||
shrink = no
|
||||
line_height = 0
|
||||
markup = full
|
||||
format = "<b>%s</b>\n%b"
|
||||
alignment = left
|
||||
show_age_threshold = 60
|
||||
word_wrap = yes
|
||||
ignore_newline = no
|
||||
stack_duplicates = true
|
||||
hide_duplicate_count = false
|
||||
padding = 10
|
||||
horizontal_padding = 10
|
||||
max_icon_size = 32
|
||||
sticky_history = yes
|
||||
history_length = 20
|
||||
dmenu = /usr/bin/dmenu -p dunst
|
||||
browser = firefox
|
||||
always_run_script = true
|
||||
title = Dunst
|
||||
class = Dunst
|
||||
|
||||
[urgency_low]
|
||||
background = "#1C2230"
|
||||
foreground = "#A0B8D0"
|
||||
timeout = 5
|
||||
|
||||
[urgency_normal]
|
||||
background = "#1E3050"
|
||||
foreground = "#D0E0F0"
|
||||
timeout = 8
|
||||
|
||||
[urgency_critical]
|
||||
background = "#5A1010"
|
||||
foreground = "#FFD0D0"
|
||||
frame_color = "#AA2020"
|
||||
timeout = 0
|
||||
DUNST
|
||||
|
||||
cat > "$SKEL/.config/gtk-3.0/settings.ini" <<'GTK3'
|
||||
[Settings]
|
||||
gtk-theme-name=SkyOS
|
||||
gtk-font-name=Sans 10
|
||||
gtk-icon-theme-name=Adwaita
|
||||
gtk-cursor-theme-name=DMZ-White
|
||||
GTK3
|
||||
|
||||
# ── Mac hardware: libinput touchpad config ────────────────────────────
|
||||
mkdir -p "$AIROOTFS/etc/X11/xorg.conf.d"
|
||||
cat > "$AIROOTFS/etc/X11/xorg.conf.d/40-libinput.conf" <<'TOUCHPAD'
|
||||
Section "InputClass"
|
||||
Identifier "Apple Trackpad"
|
||||
MatchIsTouchpad "on"
|
||||
Driver "libinput"
|
||||
Option "Tapping" "on"
|
||||
Option "TappingButtonMap" "lrm"
|
||||
Option "NaturalScrolling" "true"
|
||||
Option "ScrollMethod" "twofinger"
|
||||
Option "DisableWhileTyping" "true"
|
||||
Option "ClickMethod" "clickfinger"
|
||||
Option "AccelProfile" "adaptive"
|
||||
Option "AccelSpeed" "0.3"
|
||||
EndSection
|
||||
TOUCHPAD
|
||||
|
||||
# ── Keyboard: US layout, Ctrl+Alt+Backspace to kill X ────────────────
|
||||
cat > "$AIROOTFS/etc/X11/xorg.conf.d/10-keyboard.conf" <<'KEYBOARD'
|
||||
Section "InputClass"
|
||||
Identifier "All Keyboards"
|
||||
MatchIsKeyboard "on"
|
||||
Driver "libinput"
|
||||
Option "XkbLayout" "us"
|
||||
Option "XkbOptions" "terminate:ctrl_alt_bksp"
|
||||
EndSection
|
||||
KEYBOARD
|
||||
|
||||
# ── Mac: load broadcom-wl at boot ─────────────────────────────────────
|
||||
mkdir -p "$AIROOTFS/etc/modules-load.d"
|
||||
echo "wl" > "$AIROOTFS/etc/modules-load.d/broadcom-wl.conf"
|
||||
|
||||
# Blacklist conflicting Broadcom modules
|
||||
mkdir -p "$AIROOTFS/etc/modprobe.d"
|
||||
cat > "$AIROOTFS/etc/modprobe.d/broadcom-wl.conf" <<'MODPROBE'
|
||||
blacklist b43
|
||||
blacklist b43legacy
|
||||
blacklist ssb
|
||||
blacklist bcm43xx
|
||||
blacklist brcm80211
|
||||
blacklist brcmfmac
|
||||
blacklist brcmsmac
|
||||
blacklist bcma
|
||||
MODPROBE
|
||||
|
||||
# Let X auto-detect the GPU via the modesetting driver (kernel DRM/KMS).
|
||||
# Forcing a specific driver (intel/amdgpu/etc.) breaks VMs and cross-hardware boots.
|
||||
|
||||
# ── 9. profiledef.sh — archiso metadata ──────────────────────────────
|
||||
cat > "$PROFILE/profiledef.sh" <<'PROFILEDEF'
|
||||
#!/usr/bin/env bash
|
||||
iso_name="skyos"
|
||||
iso_label="SKYOS_$(date +%Y%m)"
|
||||
iso_publisher="SkyOS Project"
|
||||
iso_application="SkyOS — BeOS-inspired Linux Desktop"
|
||||
iso_version="0.2"
|
||||
install_dir="arch"
|
||||
buildmodes=('iso')
|
||||
# Support both UEFI (systemd-boot) and legacy BIOS (syslinux) hardware
|
||||
bootmodes=(
|
||||
'bios.syslinux'
|
||||
'uefi.systemd-boot'
|
||||
)
|
||||
arch="x86_64"
|
||||
pacman_conf="pacman.conf"
|
||||
airootfs_image_type="squashfs"
|
||||
airootfs_image_tool_options=('-comp' 'zstd' '-Xcompression-level' '5' '-b' '1M')
|
||||
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')
|
||||
file_permissions=(
|
||||
["/etc/shadow"]="0:0:400"
|
||||
["/etc/skel/.xinitrc"]="0:0:755"
|
||||
["/root/customize_airootfs.sh"]="0:0:755"
|
||||
["/usr/local/bin/skywm"]="0:0:755"
|
||||
["/usr/local/bin/skydeskbar"]="0:0:755"
|
||||
["/usr/local/bin/skylauncher"]="0:0:755"
|
||||
["/usr/local/bin/skywallpaper"]="0:0:755"
|
||||
["/usr/local/bin/skyinstall"]="0:0:755"
|
||||
)
|
||||
PROFILEDEF
|
||||
|
||||
# ── 10. Boot loader configs ───────────────────────────────────────────
|
||||
|
||||
# systemd-boot entry (UEFI)
|
||||
mkdir -p "$PROFILE/efiboot/loader/entries"
|
||||
cat > "$PROFILE/efiboot/loader/loader.conf" <<'LOADER'
|
||||
default skyos.conf
|
||||
timeout 5
|
||||
editor no
|
||||
LOADER
|
||||
|
||||
cat > "$PROFILE/efiboot/loader/entries/skyos.conf" <<'ENTRY'
|
||||
title SkyOS
|
||||
linux /arch/boot/x86_64/vmlinuz-linux
|
||||
initrd /arch/boot/x86_64/initramfs-linux.img
|
||||
options archisobasedir=arch archisolabel=%ARCHISO_LABEL% quiet loglevel=3
|
||||
ENTRY
|
||||
|
||||
|
||||
# ── 10. Auto-login to tty1 and startx ────────────────────────────────
|
||||
mkdir -p "$AIROOTFS/etc/systemd/system/getty@tty1.service.d"
|
||||
cat > "$AIROOTFS/etc/systemd/system/getty@tty1.service.d/autologin.conf" <<'AUTOLOGIN'
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --autologin sky --noclear %I $TERM
|
||||
AUTOLOGIN
|
||||
|
||||
# bash_profile: startx automatically on tty1 (no exec — keep shell on failure)
|
||||
cat > "$SKEL/.bash_profile" <<'BASH_PROFILE'
|
||||
if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then
|
||||
startx 2>&1 | tee /tmp/x-session.log
|
||||
fi
|
||||
BASH_PROFILE
|
||||
|
||||
# ── 11. customize_airootfs.sh — runs inside the chroot ───────────────
|
||||
cat > "$PROFILE/airootfs/root/customize_airootfs.sh" <<'CUSTOMIZE'
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Locale
|
||||
sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
|
||||
locale-gen
|
||||
echo "LANG=en_US.UTF-8" > /etc/locale.conf
|
||||
|
||||
# Timezone
|
||||
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
|
||||
|
||||
# Create user 'sky' (live session user)
|
||||
useradd -m -G wheel,audio,video,storage,input -s /bin/bash sky 2>/dev/null || true
|
||||
echo "sky:skyos" | chpasswd
|
||||
|
||||
# sudoers
|
||||
echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/wheel
|
||||
chmod 440 /etc/sudoers.d/wheel
|
||||
|
||||
# Enable services
|
||||
systemctl enable NetworkManager
|
||||
systemctl enable bluetooth 2>/dev/null || true
|
||||
systemctl enable fstrim.timer 2>/dev/null || true
|
||||
|
||||
# MIME / default app associations
|
||||
if command -v xdg-mime &>/dev/null; then
|
||||
# Run as the sky user (xdg-mime needs $HOME)
|
||||
sudo -u sky HOME=/home/sky XDG_DATA_HOME=/home/sky/.local/share \
|
||||
xdg-mime default firefox.desktop x-scheme-handler/http \
|
||||
x-scheme-handler/https \
|
||||
text/html 2>/dev/null || true
|
||||
sudo -u sky HOME=/home/sky XDG_DATA_HOME=/home/sky/.local/share \
|
||||
xdg-mime default evince.desktop application/pdf 2>/dev/null || true
|
||||
sudo -u sky HOME=/home/sky XDG_DATA_HOME=/home/sky/.local/share \
|
||||
xdg-mime default viewnior.desktop image/jpeg image/png \
|
||||
image/gif image/webp 2>/dev/null || true
|
||||
sudo -u sky HOME=/home/sky XDG_DATA_HOME=/home/sky/.local/share \
|
||||
xdg-mime default mpv.desktop video/mp4 video/mkv \
|
||||
audio/mpeg audio/flac 2>/dev/null || true
|
||||
sudo -u sky HOME=/home/sky XDG_DATA_HOME=/home/sky/.local/share \
|
||||
xdg-mime default mousepad.desktop text/plain 2>/dev/null || true
|
||||
fi
|
||||
update-desktop-database 2>/dev/null || true
|
||||
|
||||
# Fontconfig cache
|
||||
fc-cache -f 2>/dev/null || true
|
||||
|
||||
# xscreensaver config (screen lock)
|
||||
mkdir -p /etc/skel
|
||||
cat > /etc/skel/.xscreensaver <<'SS'
|
||||
mode: blank
|
||||
timeout: 0:10:00
|
||||
lock: True
|
||||
lockTimeout: 0:00:00
|
||||
dpmsEnabled: True
|
||||
dpmsStandby: 0:10:00
|
||||
dpmsSuspend: 0:20:00
|
||||
dpmsOff: 0:30:00
|
||||
SS
|
||||
|
||||
# Copy skeleton to sky's home (ensure xinitrc is present)
|
||||
cp -r /etc/skel/. /home/sky/ 2>/dev/null || true
|
||||
chown -R sky:sky /home/sky
|
||||
|
||||
# Ensure SkyOS binaries are executable (permissions can be lost through squashfs build)
|
||||
chmod +x /usr/local/bin/skywm \
|
||||
/usr/local/bin/skydeskbar \
|
||||
/usr/local/bin/skylauncher \
|
||||
/usr/local/bin/skywallpaper \
|
||||
/usr/local/bin/skyinstall 2>/dev/null || true
|
||||
[ -f /usr/local/bin/skyinstall-gui ] && chmod +x /usr/local/bin/skyinstall-gui
|
||||
|
||||
echo "SkyOS customization complete."
|
||||
CUSTOMIZE
|
||||
chmod 755 "$PROFILE/airootfs/root/customize_airootfs.sh"
|
||||
|
||||
# ── 12. Build the ISO ─────────────────────────────────────────────────
|
||||
echo ">>> Building ISO (this takes 5-15 minutes)..."
|
||||
mkdir -p "$DIST" "$WORK"
|
||||
|
||||
mkarchiso -v \
|
||||
-w "$WORK" \
|
||||
-o "$DIST" \
|
||||
"$PROFILE"
|
||||
|
||||
echo ""
|
||||
echo "════════════════════════════════════════"
|
||||
echo " Build complete!"
|
||||
find "$DIST" -name "*.iso" -exec echo " ISO: {}" \;
|
||||
echo "════════════════════════════════════════"
|
||||
@@ -0,0 +1,79 @@
|
||||
# Installing SkyOS on an Intel Mac
|
||||
|
||||
## Before you start
|
||||
|
||||
- Intel Mac (any MacBook/MacBook Pro with Intel CPU — 2006–2020)
|
||||
- USB drive ≥ 4 GB
|
||||
- The SkyOS ISO
|
||||
|
||||
## Step 1 — Boot from USB
|
||||
|
||||
Intel Macs use EFI + rEFInd (included in the ISO) to boot Linux.
|
||||
|
||||
1. Hold **Option (⌥)** at startup to see the boot picker.
|
||||
2. Select the SkyOS USB drive (shows as "EFI Boot").
|
||||
|
||||
## Step 2 — Partition the disk
|
||||
|
||||
In the live environment, run `cfdisk /dev/sda` (replace with your disk):
|
||||
|
||||
| Partition | Size | Type | Mount |
|
||||
|-----------|-------------|------------------|-----------|
|
||||
| sda1 | 512 MB | EFI System | /boot/efi |
|
||||
| sda2 | 4 GB | Linux swap | swap |
|
||||
| sda3 | remainder | Linux filesystem | / |
|
||||
|
||||
Format:
|
||||
```bash
|
||||
mkfs.fat -F32 /dev/sda1
|
||||
mkswap /dev/sda2
|
||||
mkfs.ext4 -L SkyOS /dev/sda3
|
||||
```
|
||||
|
||||
## Step 3 — Install
|
||||
|
||||
```bash
|
||||
mount /dev/sda3 /mnt
|
||||
mkdir -p /mnt/boot/efi
|
||||
mount /dev/sda1 /mnt/boot/efi
|
||||
swapon /dev/sda2
|
||||
|
||||
pacstrap /mnt base linux linux-firmware ... # (handled by build-base.sh)
|
||||
genfstab -U /mnt >> /mnt/etc/fstab
|
||||
```
|
||||
|
||||
## Step 4 — rEFInd for Mac EFI
|
||||
|
||||
Intel Macs need rEFInd instead of GRUB for reliable EFI booting:
|
||||
|
||||
```bash
|
||||
arch-chroot /mnt
|
||||
refind-install
|
||||
```
|
||||
|
||||
rEFInd auto-detects the kernel; our config at `/boot/EFI/refind/refind.conf`
|
||||
points it at the right initramfs.
|
||||
|
||||
## Step 5 — First boot
|
||||
|
||||
Log in as `sky` (password: `skyos` — change it!), then:
|
||||
|
||||
```bash
|
||||
startx
|
||||
```
|
||||
|
||||
The SkyWM desktop launches with the Deskbar in the top-right corner.
|
||||
|
||||
## Intel Mac hardware notes
|
||||
|
||||
| Hardware | Status | Notes |
|
||||
|-----------------|----------|----------------------------------------|
|
||||
| WiFi (Broadcom) | Works | `broadcom-wl-dkms` DKMS driver |
|
||||
| Intel iGPU | Works | `xf86-video-intel` or modesetting |
|
||||
| Discrete GPU | Partial | AMD: works; Nvidia: use `nouveau` |
|
||||
| Trackpad | Works | `xf86-input-libinput` with gestures |
|
||||
| Audio | Works | `alsa-utils` + `snd_hda_intel` |
|
||||
| Suspend/Resume | Mostly | `echo mem > /sys/power/state` |
|
||||
| Keyboard backlit| Works | `/sys/class/leds/` brightness control |
|
||||
| Webcam | Works | UVC driver built into kernel |
|
||||
| Thunderbolt | Partial | TB1/2: limited; TB3+: better |
|
||||
Reference in new issue
Block a user