v0.2.0: WSL desktop, branding, GRUB theme, CI, installer, fonts, voice architecture
SamiOS CI / lint-and-test (push) Successful in 14s

Major update adding full desktop environment support, complete branding suite,
and project infrastructure:

Desktop (WSL):
- KDE Plasma + SDDM + Dolphin/Konsole/Kate/Firefox setup script
- Windows 11 dark/light color schemes
- PipeWire audio stack
- WSLg-compatible launch script
- SamiOS CLI tool (v0.2.0) with desktop command

Branding:
- Logos: face-on-pyramid with and without text (500px)
- Icons: square + launcher (256/512/1024px) + SVG vector
- Wallpapers: 1920x1080, 4K, clean variant (PIL-generated)
- GRUB theme: full cobalt blue (#1424CE) theme with pyramid background
- SDDM theme: SamiOS login screen configuration
- Branding README with palette, typography, usage guidelines

Fonts:
- Sami Grotesk (Helvetica-like) as default system/UI font
- Sami Sans as secondary
- Full Sami font family support (excluding 7777 personal branding)
- fontconfig rules mapping Helvetica/Arial → Sami Grotesk
- Font policy enforcement in samios CLI

Infrastructure:
- Automated installer (samios-installer.sh): partition, format, pacstrap, bootloader
- PKGBUILD for samios-branding package
- Test suite: shell tests for profiledef, packages, pacman.conf, CLI, font policy
- Makefile: test, lint, check, build, clean targets
- Gitea Actions CI workflow
- Voice integration architecture document (SamiType × SamiOS)
- Updated roadmap reflecting completed phases
This commit is contained in:
Sami Ahmed
2026-08-11 03:39:47 -07:00
parent 970177482b
commit 658a8541e9
79 changed files with 2752 additions and 35 deletions
@@ -0,0 +1,62 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
SamiOS System Font Configuration
Sets Sami Grotesk as the default sans-serif (Helvetica-like) system font.
Sami Sans as secondary sans-serif.
All other Sami font families available but not default.
Fonts with "7777" in the name are explicitly excluded (personal branding).
-->
<fontconfig>
<!-- === Exclude 7777 fonts (personal branding policy) === -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="family"><string>samiahmed7777</string></patelt>
</pattern>
</rejectfont>
</selectfont>
<!-- === Default sans-serif → Sami Grotesk === -->
<match target="font">
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Sami Grotesk</string>
</edit>
</match>
<!-- === Default serif → Sami Serif === -->
<match target="font">
<test name="family"><string>serif</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Sami Serif</string>
</edit>
</match>
<!-- === Default monospace → keep system default === -->
<!-- === Helvetica/Arial alias → Sami Grotesk === -->
<match target="font">
<test name="family"><string>Helvetica</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Sami Grotesk</string>
</edit>
</match>
<match target="font">
<test name="family"><string>Arial</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Sami Grotesk</string>
</edit>
</match>
<!-- === Sami Grotesk as primary system font === -->
<match target="pattern">
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Sami Grotesk</string>
</edit>
</match>
</fontconfig>
+25
View File
@@ -0,0 +1,25 @@
# SamiOS locale.gen
# Uncomment the locales you need, then run `locale-gen`.
# SamiOS defaults to en_US.UTF-8 (see /etc/locale.conf).
en_US.UTF-8 UTF-8
#en_US ISO-8859-1
# Additional locales — uncomment as needed:
#en_GB.UTF-8 UTF-8
#de_DE.UTF-8 UTF-8
#fr_FR.UTF-8 UTF-8
#es_ES.UTF-8 UTF-8
#it_IT.UTF-8 UTF-8
#pt_BR.UTF-8 UTF-8
#ru_RU.UTF-8 UTF-8
#ja_JP.UTF-8 UTF-8
#ko_KR.UTF-8 UTF-8
#zh_CN.UTF-8 UTF-8
#zh_TW.UTF-8 UTF-8
#ar_SA.UTF-8 UTF-8
#hi_IN.UTF-8 UTF-8
#tr_TR.UTF-8 UTF-8
#pl_PL.UTF-8 UTF-8
#nl_NL.UTF-8 UTF-8
#sv_SE.UTF-8 UTF-8
+53
View File
@@ -0,0 +1,53 @@
#!/bin/bash
# ~/.bashrc — SamiOS root shell configuration
# Loaded by Bash for interactive shells
# ============================================================
# History
# ============================================================
HISTSIZE=1000
HISTFILESIZE=2000
shopt -s histappend
# ============================================================
# Shell options
# ============================================================
shopt -s checkwinsize
shopt -s cdable_vars
# ============================================================
# Aliases
# ============================================================
alias ls='ls --color=auto'
alias ll='ls -lah'
alias la='ls -A'
alias l='ls -CF'
alias grep='grep --color=auto'
alias ..='cd ..'
alias ...='cd ../..'
alias df='df -h'
alias free='free -h'
# SamiOS-specific aliases
alias samios-status='samios status'
alias samios-help='samios help'
# ============================================================
# Prompt — SamiOS branded
# ============================================================
# Blue pyramid color matches brand primary (#1424CE)
PS1='\[\e[1;34m\]▲ SamiOS\[\e[0m\] \[\e[32m\]\u@\h\[\e[0m\] \w \$ '
# ============================================================
# Welcome message — printed once per interactive login shell
# ============================================================
if shopt -q login_shell; then
SAMIOS_VER=$(cat /usr/share/samios/version 2>/dev/null | tail -1 || echo "0.1.0")
echo ""
echo -e " \033[1;34m ▲\033[0m \033[1;34mSamiOS\033[0m \033[0;37m${SAMIOS_VER}\033[0m"
echo -e " \033[0;37m |\\\\ Arch-based Linux by Sami Ahmed\033[0m"
echo -e " \033[0;37m | \\\\ https://sami-ahmed.net\033[0m"
echo ""
echo -e " \033[0;37mCommands:\033[0m \033[1;msamios help\033[0m · \033[1;msamios status\033[0m · \033[1;msamios fonts\033[0m"
echo ""
fi
+67
View File
@@ -0,0 +1,67 @@
#!/bin/zsh
# ~/.zshrc — SamiOS root shell configuration
# Loaded by Zsh for interactive shells (SamiOS default shell)
# ============================================================
# History
# ============================================================
HISTFILE=~/.zsh_history
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory
setopt sharehistory
setopt incappendhistory
# ============================================================
# Shell options
# ============================================================
setopt auto_cd # cd by typing directory name
setopt interactive_comments
# ============================================================
# Key bindings (vi-style for line editing)
# ============================================================
bindkey -e # emacs-style bindings (more familiar default)
# ============================================================
# Aliases
# ============================================================
alias ls='ls --color=auto'
alias ll='ls -lah'
alias la='ls -A'
alias l='ls -CF'
alias grep='grep --color=auto'
alias ..='cd ..'
alias ...='cd ../..'
alias df='df -h'
alias free='free -h'
# SamiOS-specific aliases
alias samios-status='samios status'
alias samios-help='samios help'
# ============================================================
# Prompt — SamiOS branded
# ============================================================
# Blue pyramid color matches brand primary (#1424CE)
autoload -Uz colors && colors
PROMPT='%{$fg_bold[blue]%}▲ SamiOS%{$reset_color%} %{$fg[green]%}%n@%m%{$reset_color%} %~ %# '
# ============================================================
# Completion
# ============================================================
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
# ============================================================
# Welcome message — printed once per interactive login shell
# ============================================================
if [[ -o login ]]; then
echo ""
echo " \033[1;34m ▲\033[0m \033[1;34mSamiOS\033[0m \033[0;37m$(cat /usr/share/samios/version 2>/dev/null | tail -1 || echo '0.1.0')\033[0m"
echo " \033[0;37m |\\\ Arch-based Linux by Sami Ahmed\033[0m"
echo " \033[0;37m | \\ https://sami-ahmed.net\033[0m"
echo ""
echo " \033[0;37mCommands:\033[0m \033[1;msamios help\033[0m · \033[1;msamios status\033[0m · \033[1;msamios fonts\033[0m"
echo ""
fi
+13
View File
@@ -3,6 +3,19 @@
set default=0
set timeout=5
# ── Load SamiOS theme ──
insmod all_video
insmod gfxterm
insmod png
insmod ext2
set gfxmode=1024x768
set gfxpayload=keep
terminal_output gfxterm
# Theme path (relative to GRUB root at boot; also set during ISO build)
set theme=/boot/grub/themes/samios/theme.txt
export theme
menuentry "SamiOS Live" {
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
+22 -2
View File
@@ -16,6 +16,20 @@ filesystem
util-linux
shadow
sudo
nano
vi
less
diffutils
tar
man-db
man-pages
# Fonts (base sans-serif coverage)
ttf-dejavu
ttf-liberation
# User directories
xdg-user-dirs
# Networking
networkmanager
@@ -35,8 +49,14 @@ systemd-sysvcompat
arch-install-scripts
pacman-contrib
# SamiOS branding
samios-branding
# Mirror management
reflector
# SamiOS branding is NOT installed via pacman — it is baked into the
# ISO through the airootfs overlay (see airootfs/usr/share/samios/
# and airootfs/etc/samios/). The standalone PKGBUILD at
# packaging/packages/samios-branding/ can also be built for
# post-install use on a running system.
# Excluded: fonts with 7777 in name (personal branding)
# Excluded: desktop environment (CLI-only for now)
+2
View File
@@ -22,6 +22,8 @@ file_permissions=(
["/etc/gshadow"]="0:0:400"
["/root"]="0:0:750"
["/root/.automated_script.sh"]="0:0:755"
["/root/.zshrc"]="0:0:644"
["/root/.bashrc"]="0:0:644"
["/root/.gnupg"]="0:0:700"
["/usr/local/bin/choose-mirror"]="0:0:755"
["/usr/local/bin/samios"]="0:0:755"
+109
View File
@@ -0,0 +1,109 @@
# Maintainer: Sami Ahmed <sami@sami-ahmed.net>
# SamiOS branding package — logos, icons, boot themes, default configs
#
# Build: Copy the branding assets into this directory alongside the PKGBUILD,
# then run `makepkg -f` from within it. Alternatively run the build helper
# packaging/packages/samios-branding/fetch-assets.sh to pull them in from
# the repo branding/ tree.
pkgname=samios-branding
pkgver=0.1.0
pkgrel=1
pkgdesc="SamiOS branding assets — logos, icons, GRUB theme, and default configuration"
arch=('any')
url="https://sami-ahmed.net"
license=('GPL3')
depends=('filesystem')
optdepends=('grub: for GRUB theme files')
install=samios-branding.install
# Source assets — these files live alongside the PKGBUILD in this directory.
# Run fetch-assets.sh to copy them from ../../branding/ before building.
source=(
"samios-logo.png"
"samios-logo-text.png"
"samios-icon-256.png"
"samios-icon-512.png"
"samios-icon-1024.png"
"samios-icon-launcher-256.png"
"samios-icon-launcher-512.png"
"samios-icon-launcher-1024.png"
"samios-icon.svg"
)
sha256sums=(
'd5fdf1dcfbba1f1b1e56d0325963ef540e7da3c0f6824672105a0480ba02b26d' # samios-logo.png
'45238639444b666c824e7abacb18bc69d4d1c6cc01b7a30d75862c2a52f82343' # samios-logo-text.png
'e8781728b5dad6c6047e360bd6f7189599d5e058097c980b5a26c2e3d7a00fd0' # samios-icon-256.png
'841be1020c53a7ef67d5807c67e484f29a1db4b92ced3b08082866dab8b6ebb2' # samios-icon-512.png
'13b4231b144e0bbedc4d8ab052d5dbcc2d5aab69c2854a9e681b75140715a72d' # samios-icon-1024.png
'39a02a848db661a3b2de29643802d781e9745bd209c9c067d4d62495c4f32954' # samios-icon-launcher-256.png
'cd3a73c8106e92abf7082638ee2d3193f40b0454b289e75292a3793ba04666b1' # samios-icon-launcher-512.png
'77234f406e6077b751a900a26c17eda280ef3345e56a4b6230efefa997416618' # samios-icon-launcher-1024.png
'011bece75f08db7795858052a2999e5acbf7196b79702cda087cbbbe205843f7' # samios-icon.svg
)
package() {
# === Directory structure ===
install -d "${pkgdir}/usr/share/samios"
install -d "${pkgdir}/usr/share/samios/logos"
install -d "${pkgdir}/usr/share/samios/icons"
install -d "${pkgdir}/usr/share/icons/hicolor/256x256/apps"
install -d "${pkgdir}/usr/share/icons/hicolor/512x512/apps"
install -d "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps"
install -d "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
install -d "${pkgdir}/usr/share/pixmaps"
install -d "${pkgdir}/etc/samios"
# === Logos (full lockups with face) ===
install -m644 "${srcdir}/samios-logo.png" "${pkgdir}/usr/share/samios/logos/samios-logo.png"
install -m644 "${srcdir}/samios-logo-text.png" "${pkgdir}/usr/share/samios/logos/samios-logo-text.png"
# Copy logo to pixmaps for legacy lookups
install -m644 "${srcdir}/samios-logo.png" "${pkgdir}/usr/share/pixmaps/samios-logo.png"
# === Icons (pyramid-only, no face) ===
# Square icons in hicolor theme
install -m644 "${srcdir}/samios-icon-256.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/samios.png"
install -m644 "${srcdir}/samios-icon-512.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/samios.png"
install -m644 "${srcdir}/samios-icon-1024.png" "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/samios.png"
# Scalable SVG icon
install -m644 "${srcdir}/samios-icon.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/samios.svg"
# Launcher icons (rounded-square variant) stored under samios assets
install -m644 "${srcdir}/samios-icon-launcher-256.png" "${pkgdir}/usr/share/samios/icons/samios-icon-launcher-256.png"
install -m644 "${srcdir}/samios-icon-launcher-512.png" "${pkgdir}/usr/share/samios/icons/samios-icon-launcher-512.png"
install -m644 "${srcdir}/samios-icon-launcher-1024.png" "${pkgdir}/usr/share/samios/icons/samios-icon-launcher-1024.png"
# Also store source PNG icons in samios assets directory
install -m644 "${srcdir}/samios-icon-256.png" "${pkgdir}/usr/share/samios/icons/samios-icon-256.png"
install -m644 "${srcdir}/samios-icon-512.png" "${pkgdir}/usr/share/samios/icons/samios-icon-512.png"
install -m644 "${srcdir}/samios-icon-1024.png" "${pkgdir}/usr/share/samios/icons/samios-icon-1024.png"
install -m644 "${srcdir}/samios-icon.svg" "${pkgdir}/usr/share/samios/icons/samios-icon.svg"
# === Branding metadata ===
cat > "${pkgdir}/usr/share/samios/version" <<EOF
SamiOS ${pkgver}
EOF
cat > "${pkgdir}/usr/share/samios/branding.json" <<EOF
{
"name": "SamiOS",
"version": "${pkgver}",
"color_primary": "#1424CE",
"color_secondary": "#3B4ED8",
"publisher": "Sami Ahmed",
"website": "https://sami-ahmed.net"
}
EOF
# === Default configuration ===
cat > "${pkgdir}/etc/samios/samios.conf" <<EOF
# SamiOS configuration
SAMIOS_VERSION=${pkgver}
SAMIOS_COLOR_PRIMARY=#1424CE
SAMIOS_COLOR_SECONDARY=#3B4ED8
# Font policy: exclude fonts with 7777 in the name (personal branding)
SAMIOS_FONT_EXCLUDE_PATTERN=7777
EOF
}
@@ -0,0 +1,37 @@
#!/bin/bash
# fetch-assets.sh — copy branding assets from the repo branding/ tree
# into this directory so makepkg can find them as local sources.
#
# Usage: cd into this directory and run ./fetch-assets.sh
set -euo pipefail
# Resolve the repo root (../../.. from packaging/packages/samios-branding/)
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
BRANDING_DIR="$REPO_ROOT/branding"
if [ ! -d "$BRANDING_DIR" ]; then
echo "ERROR: branding directory not found at $BRANDING_DIR" >&2
exit 1
fi
echo "Copying branding assets from $BRANDING_DIR ..."
# Logos
cp "$BRANDING_DIR/logos/samios-logo.png" "$SCRIPT_DIR/samios-logo.png"
cp "$BRANDING_DIR/logos/samios-logo-text.png" "$SCRIPT_DIR/samios-logo-text.png"
# Square icons
cp "$BRANDING_DIR/icons/samios-icon-256.png" "$SCRIPT_DIR/samios-icon-256.png"
cp "$BRANDING_DIR/icons/samios-icon-512.png" "$SCRIPT_DIR/samios-icon-512.png"
cp "$BRANDING_DIR/icons/samios-icon-1024.png" "$SCRIPT_DIR/samios-icon-1024.png"
# Launcher icons
cp "$BRANDING_DIR/icons/samios-icon-launcher-256.png" "$SCRIPT_DIR/samios-icon-launcher-256.png"
cp "$BRANDING_DIR/icons/samios-icon-launcher-512.png" "$SCRIPT_DIR/samios-icon-launcher-512.png"
cp "$BRANDING_DIR/icons/samios-icon-launcher-1024.png" "$SCRIPT_DIR/samios-icon-launcher-1024.png"
# SVG
cp "$BRANDING_DIR/icons/samios-icon.svg" "$SCRIPT_DIR/samios-icon.svg"
echo "Done. You can now run: makepkg -f"
@@ -0,0 +1,24 @@
# samios-branding install hooks
# Updates the icon cache after install/upgrade so hicolor icons are registered.
post_install() {
echo ":: SamiOS branding assets installed"
echo " Logos: /usr/share/samios/logos/"
echo " Icons: /usr/share/icons/hicolor/*/apps/samios.*"
echo " Config: /etc/samios/samios.conf"
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -f -t /usr/share/icons/hicolor 2>/dev/null || true
fi
}
post_upgrade() {
post_install "$@"
}
post_remove() {
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -f -t /usr/share/icons/hicolor 2>/dev/null || true
fi
echo ":: SamiOS branding assets removed"
}
+17
View File
@@ -0,0 +1,17 @@
[General]
ColorScheme=Win11Dark
[KDE]
widgetStyle=Lightly
[Icons]
Theme=breeze
[General]
font=Sami Grotesk,10,-1,5,50,0,0,0,0,0
fixed=Monospace,10,-1,5,50,0,0,0,0,0
toolbarFont=Sami Grotesk,10,-1,5,50,0,0,0,0,0
menuFont=Sami Grotesk,10,-1,5,50,0,0,0,0,0
smallestReadableFont=Sami Grotesk,8,-1,5,50,0,0,0,0,0
desktopFont=Sami Grotesk,10,-1,5,50,0,0,0,0,0
taskbarFont=Sami Grotesk,10,-1,5,50,0,0,0,0,0
+495
View File
@@ -0,0 +1,495 @@
#!/bin/bash
# SamiOS WSL Desktop Setup - Complete automated build script
# Runs inside Arch WSL as root
# Installs: KDE Plasma desktop, Windows 11 theme, SamiOS branding, fonts
set -ex
LOG="/var/log/samios-setup.log"
exec > >(tee -a "$LOG") 2>&1
echo "=== SamiOS Desktop Setup started $(date) ==="
# ============================================================
# PHASE 1: Unregister old Arch, import fresh with 100GB VHD
# ============================================================
# This script assumes it runs AFTER the export/import is done
# If running standalone, skip to Phase 2
# ============================================================
# PHASE 2: Base system prep
# ============================================================
echo "--- Phase 2: Base system prep ---"
# Ensure sudo installed
pacman -S --noconfirm --needed sudo
# Ensure user sami exists with sudo
if ! id sami &>/dev/null; then
useradd -m -G wheel -s /bin/bash sami
fi
echo 'sami ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/sami
chmod 440 /etc/sudoers.d/sami
# wsl.conf
cat > /etc/wsl.conf << 'EOF'
[boot]
systemd=true
[automount]
enabled=true
mountFsTab=true
[user]
default=sami
EOF
# Locale
sed -i 's/^#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen
locale-gen
echo 'LANG=en_US.UTF-8' > /etc/locale.conf
# Hostname
echo samios > /etc/hostname
# ============================================================
# PHASE 3: Install desktop packages
# ============================================================
echo "--- Phase 3: Installing desktop packages ---"
# Refresh mirrors
reflector --country "United States" --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist 2>/dev/null || true
# Remove conflicting jack2 first
pacman -R --noconfirm jack2 2>/dev/null || true
pacman -Syu --noconfirm --needed \
xorg-server xorg-xinit \
pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber \
dbus \
polkit \
mesa \
plasma-desktop plasma-workspace plasma-pa plasma-nm \
sddm \
dolphin konsole kate kfind \
firefox \
ark \
spectacle \
ttf-dejavu ttf-liberation noto-fonts \
kvantum \
git \
base-devel
echo "--- Phase 3 complete ---"
# ============================================================
# PHASE 4: Windows 11 Theme
# ============================================================
echo "--- Phase 4: Windows 11 Theme ---"
# Install Lightly (Windows 11 style window decoration for KDE)
# We'll use the lightly-git package from AUR
sudo -u sami bash -c '
cd /tmp
git clone https://aur.archlinux.org/lightly-git.git 2>/dev/null || true
cd lightly-git
makepkg -si --noconfirm --skippgpcheck 2>&1 | tail -10
' || echo "Lightly install failed (non-critical)"
# Download Windows 11 color scheme for KDE
mkdir -p /usr/share/color-schemes
cat > /usr/share/color-schemes/Win11Dark.colors << 'SCHEME'
[Desktop Entry]
Name=Windows 11 Dark
X-KDE-PluginInfo-Author=SamiOS
X-KDE-PluginInfo-Name=Win11Dark
X-KDE-PluginInfo-License=GPL
[ColorEffects:Disabled]
Color=56,56,56
ColorAmount=0
ColorAmount=0.1
ContrastAmount=0.65
ContrastAmount=0.65
Enabled=false
IntensityAmount=0.1
IntensityAmount=0.1
[Colors:Button]
BackgroundAlternate=30,30,30
BackgroundNormal=32,32,32
DecorationFocus=0,120,212
DecorationHover=0,120,212
ForegroundActive=0,120,212
ForegroundInactive=160,160,160
ForegroundLink=0,120,212
ForegroundNegative=240,71,71
ForegroundNeutral=255,196,0
ForegroundNormal=255,255,255
ForegroundPositive=0,200,83
ForegroundVisited=0,90,158
[Colors:Selection]
BackgroundAlternate=0,120,212
BackgroundNormal=0,120,212
DecorationFocus=0,120,212
DecorationHover=0,120,212
ForegroundNormal=255,255,255
[Colors:View]
BackgroundAlternate=37,37,37
BackgroundNormal=32,32,32
DecorationFocus=0,120,212
DecorationHover=0,120,212
ForegroundActive=0,120,212
ForegroundInactive=160,160,160
ForegroundLink=0,120,212
ForegroundNegative=240,71,71
ForegroundNeutral=255,196,0
ForegroundNormal=255,255,255
ForegroundPositive=0,200,83
ForegroundVisited=0,90,158
[Colors:Window]
BackgroundAlternate=30,30,30
BackgroundNormal=32,32,32
DecorationFocus=0,120,212
DecorationHover=0,120,212
ForegroundActive=0,120,212
ForegroundInactive=160,160,160
ForegroundLink=0,120,212
ForegroundNegative=240,71,71
ForegroundNeutral=255,196,0
ForegroundNormal=255,255,255
ForegroundPositive=0,200,83
ForegroundVisited=0,90,158
[General]
ColorScheme=Win11Dark
Name=Windows 11 Dark
shadeSortColumn=true
[KDE]
contrast=4
widgetStyle=Lightly
[WM]
activeBackground=32,32,32
activeBlend=32,32,32
activeForeground=255,255,255
inactiveBackground=24,24,24
inactiveBlend=24,24,24
inactiveForeground=160,160,160
SCHEME
# Win11 Light scheme
cat > /usr/share/color-schemes/Win11Light.colors << 'SCHEME2'
[Desktop Entry]
Name=Windows 11 Light
X-KDE-PluginInfo-Author=SamiOS
X-KDE-PluginInfo-Name=Win11Light
X-KDE-PluginInfo-License=GPL
[Colors:View]
BackgroundNormal=249,249,249
ForegroundNormal=0,0,0
DecorationFocus=0,120,212
DecorationHover=0,120,212
[Colors:Window]
BackgroundNormal=243,243,243
ForegroundNormal=0,0,0
[Colors:Selection]
BackgroundNormal=0,120,212
ForegroundNormal=255,255,255
[Colors:Button]
BackgroundNormal=255,255,255
ForegroundNormal=0,0,0
[General]
ColorScheme=Win11Light
Name=Windows 11 Light
[KDE]
widgetStyle=Lightly
SCHEME2
echo "--- Phase 4 complete ---"
# ============================================================
# PHASE 5: KDE Configuration for Windows-like experience
# ============================================================
echo "--- Phase 5: KDE Configuration ---"
# Create sami's KDE config directory
SAMHOME=$(getent passwd sami | cut -d: -f6)
KDEDIR="$SAMHOME/.config"
mkdir -p "$KDEDIR"
# Plasma Shell config — bottom panel, Win11 style
cat > "$KDEDIR/plasma-localerc" << 'EOF'
[Formats]
LANG=en_US.UTF-8
EOF
# Window Management — like Windows
cat > "$KDEDIR/kdeglobals" << 'EOF'
[General]
ColorScheme=Win11Dark
[KDE]
widgetStyle=Lightly
[Icons]
Theme=breeze
EOF
# KWin config — Windows-like window behavior
cat > "$KDEDIR/kwinrc" << 'EOF'
[Windows]
BorderlessMaximizedWindows=false
TitlebarDoubleClick=Maximize
ClickRaise=true
FocusPolicy=ClickFocus
[org.kde.kdecoration2]
library=org.kde.lightly
theme=
[TabBox]
LayoutName=covers
EOF
# SDDM config
mkdir -p /etc/sddm.conf.d
cat > /etc/sddm.conf.d/samios.conf << 'EOF'
[Theme]
Current=breeze
CursorTheme=breeze_cursors
EOF
echo "--- Phase 5 complete ---"
# ============================================================
# PHASE 6: SamiOS Branding
# ============================================================
echo "--- Phase 6: SamiOS Branding ---"
mkdir -p /usr/share/samios /usr/share/wallpapers/SamiOS
# Copy branding from C:\SamiOS\branding if available
if [ -d /mnt/c/SamiOS/branding ]; then
cp /mnt/c/SamiOS/branding/* /usr/share/samios/ 2>/dev/null || true
fi
# Version file
echo "SamiOS 0.2.0 (WSL Desktop)" > /usr/share/samios/version
# SDDM theme override
mkdir -p /usr/share/sddm/themes/breeze
cat > /usr/share/sddm/themes/breeze/theme.conf << 'EOF'
[General]
background=/usr/share/wallpapers/SamiOS/samios-wallpaper.png
EOF
echo "--- Phase 6 complete ---"
# ============================================================
# PHASE 7: Font Management
# ============================================================
echo "--- Phase 7: Fonts ---"
mkdir -p /usr/share/fonts/samios
# Copy Sami's fonts from Windows (exclude any with 7777 in name)
if [ -d /mnt/c/Windows/Fonts ]; then
find /mnt/c/Windows/Fonts -type f \( -iname "*.ttf" -o -iname "*.otf" -o -iname "*.ttc" \) \
! -iname "*7777*" \
-exec cp {} /usr/share/fonts/samios/ \; 2>/dev/null
echo "Copied Windows fonts (excluding 7777)"
fi
# Also check C:\SamiOS\fonts
if [ -d /mnt/c/SamiOS/fonts ]; then
find /mnt/c/SamiOS/fonts -type f \( -iname "*.ttf" -o -iname "*.otf" \) \
! -iname "*7777*" \
-exec cp {} /usr/share/fonts/samios/ \; 2>/dev/null
echo "Copied C:\\SamiOS\\fonts (excluding 7777)"
fi
# Rebuild font cache
fc-cache -f
FONT_COUNT=$(fc-list | wc -l)
echo "Total fonts installed: $FONT_COUNT"
# Verify no 7777 fonts
if fc-list | grep -i "7777"; then
echo "WARNING: 7777 fonts detected!"
else
echo "OK: No 7777 fonts present"
fi
echo "--- Phase 7 complete ---"
# ============================================================
# PHASE 8: WSLg + Plasma launch script
# ============================================================
echo "--- Phase 8: Launch script ---"
mkdir -p /usr/local/bin
cat > /usr/local/bin/start-samios << 'EOF'
#!/bin/bash
# Start SamiOS Plasma desktop in WSLg
export DISPLAY=:0
export WAYLAND_DISPLAY=wayland-0
export XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir
export PULSE_SERVER=/mnt/wslg/PulseServer
export XDG_SESSION_TYPE=x11
export XDG_CURRENT_DESKTOP=KDE
# Start dbus
if ! pgrep -x dbus-daemon >/dev/null; then
dbus-launch --sh-syntax > /tmp/dbus-env
source /tmp/dbus-env
fi
# Start pipewire
if ! pgrep -x pipewire >/dev/null; then
pipewire &
pipewire-pulse &
wireplumber &
fi
echo "Starting KDE Plasma..."
startplasma-x11 2>/tmp/plasma.log &
echo "Plasma started. Check /tmp/plasma.log for errors."
EOF
chmod +x /usr/local/bin/start-samios
# Create a Windows-side shortcut script
cat > /mnt/c/SamiOS/start-samios.bat << 'EOF'
@echo off
echo Starting SamiOS Desktop...
wsl -d Arch -u sami -- /usr/local/bin/start-samios
EOF
echo "--- Phase 8 complete ---"
# ============================================================
# PHASE 9: SamiOS CLI tool
# ============================================================
echo "--- Phase 9: SamiOS CLI ---"
cat > /usr/local/bin/samios << 'EOF'
#!/bin/bash
set -e
VERSION="0.2.0"
cmd_help() {
cat << HELPEOF
SamiOS CLI v${VERSION}
Commands:
version Show version
status Show system status
desktop Start KDE Plasma desktop
update Update system packages
install <pkg> Install a package
remove <pkg> Remove a package
fonts Check fonts and policy
help Show this help
HELPEOF
}
cmd_version() {
echo "SamiOS v${VERSION}"
echo "Kernel: $(uname -r)"
echo "Desktop: KDE Plasma on WSLg"
}
cmd_status() {
echo "=== SamiOS System Status ==="
echo "Version: ${VERSION}"
echo "Hostname: $(hostname)"
echo "Kernel: $(uname -r)"
echo "Uptime: $(uptime -p)"
echo
echo "=== Disk ==="
df -h / | tail -1
echo
echo "=== Memory ==="
free -h | grep "Mem:"
echo
echo "=== Network ==="
ip -br addr show 2>/dev/null | grep -v "lo" || echo "no interfaces"
}
cmd_desktop() {
/usr/local/bin/start-samios
}
cmd_update() {
sudo pacman -Syu --noconfirm
}
cmd_install() {
[ -z "$1" ] && echo "Usage: samios install <package>" && exit 1
sudo pacman -S --noconfirm "$1"
}
cmd_remove() {
[ -z "$1" ] && echo "Usage: samios remove <package>" && exit 1
sudo pacman -R --noconfirm "$1"
}
cmd_fonts() {
echo "=== Installed Fonts ==="
fc-list | wc -l
echo "fonts installed"
echo
echo "=== Font Policy ==="
echo "Excluded: fonts with '7777' in name (personal branding)"
echo
if fc-list | grep -iq "7777"; then
echo "WARNING: Found fonts with '7777' in name:"
fc-list | grep -i "7777"
else
echo "OK: No forbidden fonts detected"
fi
}
case "${1:-}" in
version) cmd_version ;;
status) cmd_status ;;
desktop) cmd_desktop ;;
update) cmd_update ;;
install) shift; cmd_install "$@" ;;
remove) shift; cmd_remove "$@" ;;
fonts) cmd_fonts ;;
help|--help|-h|"") cmd_help ;;
*) echo "Unknown command: $1"; echo "Run 'samios help'"; exit 1 ;;
esac
EOF
chmod +x /usr/local/bin/samios
echo "--- Phase 9 complete ---"
# ============================================================
# PHASE 10: Fix ownership
# ============================================================
echo "--- Phase 10: Fix ownership ---"
chown -R sami:sami "$SAMHOME/.config" 2>/dev/null || true
echo "--- Phase 10 complete ---"
echo ""
echo "============================================"
echo "=== SamiOS Desktop Setup COMPLETE ==="
echo "============================================"
echo ""
echo "To start the desktop:"
echo " 1. Open Command Prompt or Terminal"
echo " 2. Run: C:\\SamiOS\\start-samios.bat"
echo " Or inside WSL: samios desktop"
echo ""
echo "To check system status: samios status"
echo ""
+445
View File
@@ -0,0 +1,445 @@
#!/bin/bash
# SamiOS Automated Installer
# Partitions disk, formats, pacstraps base system, installs bootloader, creates user
# Usage: samios install [options]
set -e
VERSION="0.2.0"
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m'
log() { echo -e "${BLUE}[SamiOS]${NC} $*"; }
ok() { echo -e "${GREEN}${NC} $*"; }
warn() { echo -e "${YELLOW}${NC} $*"; }
err() { echo -e "${RED}${NC} $*" >&2; }
# ============================================================
# Pre-flight checks
# ============================================================
check_root() {
if [ "$(id -u)" -ne 0 ]; then
err "This script must be run as root"
exit 1
fi
}
check_uefi() {
if [ -d /sys/firmware/efi/efivars ]; then
UEFI=true
ok "UEFI mode detected"
else
UEFI=false
ok "BIOS mode detected"
fi
}
detect_disks() {
log "Detecting available disks..."
mapfile -t DISKS < <(lsblk -d -n -p -o NAME | grep -v "loop\|sr\|fd")
echo ""
echo "Available disks:"
for i in "${!DISKS[@]}"; do
SIZE=$(lsblk -d -n -o SIZE "${DISKS[$i]}" 2>/dev/null)
MODEL=$(lsblk -d -n -o MODEL "${DISKS[$i]}" 2>/dev/null)
echo " [$i] ${DISKS[$i]} - ${SIZE} ${MODEL}"
done
echo ""
}
select_disk() {
if [ -n "$TARGET_DISK" ]; then
return
fi
read -p "Select target disk [0-$(( ${#DISKS[@]} - 1 ))]: " DISK_IDX
TARGET_DISK="${DISKS[$DISK_IDX]}"
echo ""
warn "WARNING: This will ERASE ALL DATA on ${TARGET_DISK}"
read -p "Type 'YES' to confirm: " CONFIRM
if [ "$CONFIRM" != "YES" ]; then
err "Installation cancelled"
exit 1
fi
}
# ============================================================
# Partitioning
# ============================================================
partition_disk() {
log "Partitioning ${TARGET_DISK}..."
# Wipe all partition tables
sgdisk --zap-all "$TARGET_DISK"
if [ "$UEFI" = true ]; then
# UEFI: GPT with EFI System Partition + root
sgdisk -n 1:0:+1G -t 1:ef00 -c 1:"EFI System" "$TARGET_DISK"
sgdisk -n 2:0:0 -t 2:8300 -c 2:"SamiOS Root" "$TARGET_DISK"
partprobe "$TARGET_DISK"
sleep 2
# Determine partition names
if [[ "$TARGET_DISK" == *"nvme"* ]] || [[ "$TARGET_DISK" == *"mmcblk"* ]]; then
EFI_PART="${TARGET_DISK}p1"
ROOT_PART="${TARGET_DISK}p2"
else
EFI_PART="${TARGET_DISK}1"
ROOT_PART="${TARGET_DISK}2"
fi
# Format
mkfs.fat -F32 "$EFI_PART"
mkfs.ext4 -F -L samios "$ROOT_PART"
ok "UEFI partitions created"
else
# BIOS: MBR with single root + boot
sgdisk -n 1:0:0 -t 1:8300 -c 1:"SamiOS" "$TARGET_DISK"
partprobe "$TARGET_DISK"
sleep 2
if [[ "$TARGET_DISK" == *"nvme"* ]] || [[ "$TARGET_DISK" == *"mmcblk"* ]]; then
ROOT_PART="${TARGET_DISK}p1"
else
ROOT_PART="${TARGET_DISK}1"
fi
mkfs.ext4 -F -L samios "$ROOT_PART"
ok "BIOS partition created"
fi
}
# ============================================================
# Mount and pacstrap
# ============================================================
mount_and_install() {
log "Mounting filesystems..."
MOUNT_POINT="/mnt"
mount "$ROOT_PART" "$MOUNT_POINT"
if [ "$UEFI" = true ]; then
mkdir -p "$MOUNT_POINT/boot/efi"
mount "$EFI_PART" "$MOUNT_POINT/boot/efi"
fi
log "Installing base system (this takes a few minutes)..."
# Install base system
pacstrap "$MOUNT_POINT" base base-devel linux linux-firmware
# Generate fstab
genfstab -U "$MOUNT_POINT" > "$MOUNT_POINT/etc/fstab"
ok "Base system installed"
}
# ============================================================
# System configuration
# ============================================================
configure_system() {
log "Configuring system..."
MOUNT_POINT="/mnt"
# Hostname
echo "samios" > "$MOUNT_POINT/etc/hostname"
# Hosts
cat > "$MOUNT_POINT/etc/hosts" << 'HOSTS'
127.0.0.1 localhost
::1 localhost
127.0.1.1 samios.localdomain samios
HOSTS
# Timezone
arch-chroot "$MOUNT_POINT" ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
arch-chroot "$MOUNT_POINT" hwclock --systohc
# Locale
sed -i 's/^#en_US.UTF-8/en_US.UTF-8/' "$MOUNT_POINT/etc/locale.gen"
arch-chroot "$MOUNT_POINT" locale-gen
echo "LANG=en_US.UTF-8" > "$MOUNT_POINT/etc/locale.conf"
# Keymap
echo "KEYMAP=us" > "$MOUNT_POINT/etc/vconsole.conf"
# Install essential packages
arch-chroot "$MOUNT_POINT" pacman -S --noconfirm \
networkmanager \
sudo \
grub \
efibootmgr \
os-prober \
nano \
vim \
less \
man-db \
man-pages \
git \
curl \
wget \
bash-completion \
reflector \
openssh
# Enable NetworkManager
arch-chroot "$MOUNT_POINT" systemctl enable NetworkManager
# Enable SSH (optional)
arch-chroot "$MOUNT_POINT" systemctl enable sshd
ok "System configured"
}
# ============================================================
# Bootloader
# ============================================================
install_bootloader() {
log "Installing bootloader..."
MOUNT_POINT="/mnt"
if [ "$UEFI" = true ]; then
arch-chroot "$MOUNT_POINT" grub-install --target=x86_64-efi \
--efi-directory=/boot/efi --bootloader-id=SamiOS
else
arch-chroot "$MOUNT_POINT" grub-install --target=i386-pc "$TARGET_DISK"
fi
# Configure GRUB
arch-chroot "$MOUNT_POINT" grub-mkconfig -o /boot/grub/grub.cfg
ok "Bootloader installed"
}
# ============================================================
# User creation
# ============================================================
create_user() {
log "Creating user account..."
MOUNT_POINT="/mnt"
INTERACTIVE_USER="${INSTALL_USER:-sami}"
if [ -z "$INSTALL_PASSWORD" ]; then
read -s -p "Enter password for ${INTERACTIVE_USER}: " USER_PASS
echo ""
read -s -p "Confirm password: " USER_PASS_CONFIRM
echo ""
if [ "$USER_PASS" != "$USER_PASS_CONFIRM" ]; then
err "Passwords do not match"
exit 1
fi
else
USER_PASS="$INSTALL_PASSWORD"
fi
# Create user
arch-chroot "$MOUNT_POINT" useradd -m -G wheel,storage,power,network -s /bin/bash "$INTERACTIVE_USER"
# Set password
echo "$INTERACTIVE_USER:$USER_PASS" | arch-chroot "$MOUNT_POINT" chpasswd
# Enable sudo for wheel group
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' "$MOUNT_POINT/etc/sudoers"
# Set root password
echo "root:$USER_PASS" | arch-chroot "$MOUNT_POINT" chpasswd
ok "User ${INTERACTIVE_USER} created"
}
# ============================================================
# SamiOS CLI tool
# ============================================================
install_samios_cli() {
log "Installing SamiOS CLI tool..."
MOUNT_POINT="/mnt"
cat > "$MOUNT_POINT/usr/local/bin/samios" << 'SAMIOS_CLI'
#!/bin/bash
set -e
VERSION="0.2.0"
cmd_help() {
cat << EOF
SamiOS CLI v${VERSION}
Commands:
version Show version
status Show system status
update Update system packages
install <pkg> Install a package
remove <pkg> Remove a package
services List running services
fonts Check fonts and policy
help Show this help
EOF
}
cmd_version() {
echo "SamiOS v${VERSION}"
echo "Kernel: $(uname -r)"
echo "Architecture: $(uname -m)"
}
cmd_status() {
echo "=== SamiOS System Status ==="
echo "Version: ${VERSION}"
echo "Hostname: $(hostname)"
echo "Kernel: $(uname -r)"
echo "Uptime: $(uptime -p)"
echo
echo "=== Disk Usage ==="
df -h / | tail -n 1
echo
echo "=== Memory ==="
free -h | grep "Mem:"
echo
echo "=== Network ==="
ip -br addr show | grep -v "lo" 2>/dev/null
}
cmd_update() { sudo pacman -Syu --noconfirm; }
cmd_install() { [ -z "$1" ] && echo "Usage: samios install <package>" && exit 1; sudo pacman -S --noconfirm "$1"; }
cmd_remove() { [ -z "$1" ] && echo "Usage: samios remove <package>" && exit 1; sudo pacman -R --noconfirm "$1"; }
cmd_services() { systemctl list-units --type=service --state=running; }
cmd_fonts() {
echo "=== Installed Fonts ==="
fc-list | wc -l
echo "fonts installed"
echo
echo "=== Font Policy ==="
echo "Excluded: fonts with '7777' in name (personal branding)"
if fc-list | grep -iq "7777"; then
echo "WARNING: Found 7777 fonts:"
fc-list | grep -i "7777"
else
echo "OK: No forbidden fonts"
fi
}
case "${1:-}" in
version) cmd_version ;;
status) cmd_status ;;
update) cmd_update ;;
install) shift; cmd_install "$@" ;;
remove) shift; cmd_remove "$@" ;;
services) cmd_services ;;
fonts) cmd_fonts ;;
help|--help|-h|"") cmd_help ;;
*) echo "Unknown: $1"; exit 1 ;;
esac
SAMIOS_CLI
chmod +x "$MOUNT_POINT/usr/local/bin/samios"
# MOTD
cat > "$MOUNT_POINT/etc/motd" << 'MOTD'
___ ___ ___ ___ ___
/\ \ /\__\ /\ \ /\__\ /\ \
/::\ \ /::| | /::\ \ /:/ / /::\ \
/:/\:\ \ /:|:| | /:/\:\ \ /:/ / /:/\:\ \
/:\ \:\ \ /:/|:| |__ /::\~\:\ \ /:/ / ___ /::\~\:\ \
/:/\:\ \:\__\/:/ |:| /\__\ /:/\:\ \:\__\ /:/__/ /\__\ /:/\:\ \:\__\
\/__\:\/:/ /\/ |:|/:/ / \/_|::\/:/ / \:\ \ /:/ / \:\~\:\ \/__/
\::/ / |:/:/ / |:|::/ / \:\ /:/ / \:\ \:\__\
/:/ / |::/ / |:|\/__/ \:\/:/ / \:\ \/__/
/:/ / /:/ / |:| | \::/ / \:\__\
\/__/ \/__/ \|__| \/__/ \/__/
Welcome to SamiOS! Type 'samios help' to get started.
MOTD
# Bashrc welcome
cat > "$MOUNT_POINT/etc/bash.bashrc" << 'BASHRC'
# SamiOS system-wide bashrc
export PS1='\[\033[01;34m\]sami\[\033[01;34m\]@samios\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
alias ls='ls --color=auto'
alias ll='ls -la'
alias la='ls -A'
alias l='ls -CF'
alias update='sudo pacman -Syu'
alias install='sudo pacman -S'
alias remove='sudo pacman -R'
# SamiOS CLI in PATH
export PATH="/usr/local/bin:$PATH"
BASHRC
ok "SamiOS CLI and configs installed"
}
# ============================================================
# Cleanup and finish
# ============================================================
finish_install() {
log "Finalizing installation..."
MOUNT_POINT="/mnt"
# Unmount
umount -R "$MOUNT_POINT"
echo ""
echo "============================================"
echo " SamiOS Installation Complete! "
echo "============================================"
echo ""
echo " Disk: $TARGET_DISK"
echo " User: ${INSTALL_USER:-sami}"
echo " Bootloader: $([ "$UEFI" = true ] && echo "GRUB (UEFI)" || echo "GRUB (BIOS)")"
echo ""
echo " Next steps:"
echo " 1. Reboot: systemctl reboot"
echo " 2. Log in as ${INSTALL_USER:-sami}"
echo " 3. Run: samios status"
echo " 4. Install desktop: samios install plasma"
echo ""
}
# ============================================================
# Main
# ============================================================
main() {
echo ""
echo "============================================"
echo " SamiOS Installer v${VERSION} "
echo "============================================"
echo ""
check_root
check_uefi
detect_disks
select_disk
partition_disk
mount_and_install
configure_system
install_bootloader
create_user
install_samios_cli
finish_install
}
# Parse args
while [ $# -gt 0 ]; do
case "$1" in
--disk) TARGET_DISK="$2"; shift 2 ;;
--user) INSTALL_USER="$2"; shift 2 ;;
--password) INSTALL_PASSWORD="$2"; shift 2 ;;
--help|-h) echo "Usage: samios install [--disk /dev/sdX] [--user username] [--password pass]"; exit 0 ;;
*) shift ;;
esac
done
main