diff --git a/README.md b/README.md index fed8959..3546144 100644 --- a/README.md +++ b/README.md @@ -1,210 +1,120 @@ -# 🖥️ CachyOS Setup +# CachyOS Post-Install Setup -> Clean install configuration snapshot for my CachyOS (Arch-based) workstation. -> Use this to recreate the same setup on another machine (e.g. laptop). +Personal CachyOS + GNOME post-install assistant for Jose Lago. -[![CachyOS](https://img.shields.io/badge/OS-CachyOS-blue?logo=arch-linux)](https://cachyos.org/) -[![GNOME](https://img.shields.io/badge/DE-GNOME-4E9A06?logo=gnome)](https://www.gnome.org/) -[![Wayland](https://img.shields.io/badge/Display-Wayland-8CD16B)](https://wayland.freedesktop.org/) +## What it does ---- +- Updates CachyOS safely. +- Installs hardware drivers with chwd. +- Installs desktop apps: + - Brave + - Chromium + - FileZilla + - Thunderbird + - LibreOffice Fresh + - VS Code + - Docker + - Telegram + - Signal + - Vesktop + - Sone + - WireGuard GUI + - Impression + - Extension Manager + - OpenCode +- Sets Brave as the default browser. +- Force-installs and pins Brave extensions: + - Bitwarden + - Floccus +- Installs Ghostty and configures: + - Zsh + - Oh My Zsh + - Powerlevel10k + - Fastfetch +- Configures Git identity: + - Jose Lago + - jose@lago.dev +- Installs Tela Circle icon theme, all variants. +- Configures GNOME shortcuts: + - Super + Enter: Ghostty + - Super + B: Brave + - Super + E: VS Code + - Super + F: Files + - Super + M: Thunderbird + - Super + T: Telegram + - Super + S: Signal + - Super + W: WireGuard GUI + - Super + I: Impression + - Super + Q: Close window +- Keeps Super + Space free for Search Light. +- Keeps Super + V free for clipboard history. +- Optionally configures persistent Unraid NAS mounts. -## 📋 Overview +## Usage -This repository captures the full state of my CachyOS installation: packages, themes, GNOME extensions, settings, and custom configurations. It serves as a reference for reproducible clean installs. +Run as normal user, not root: -## 🖼️ Current Setup + chmod +x post-install-cachyos.sh + ./post-install-cachyos.sh -| Component | Details | -|-----------|---------| -| **OS** | CachyOS Linux (rolling) | -| **Kernel** | CachyOS (BFS scheduler) | -| **Desktop** | GNOME 50 (Wayland) | -| **Display Server** | Wayland (`wayland-0`) | -| **Shell** | GNOME Shell 50.1 | +## After running -### 🎨 Theme +Reboot or log out/in to fully apply: -- **GTK Theme:** Adwaita (base) -- **Custom overlay:** [macos-like-window-controls](https://github.com/xiadnoring/macos-like-window-controls) — macOS-style traffic light buttons on GTK headerbars -- **WhiteSur Dark** theme family installed (for reference) -- **Extensions:** 8 custom GNOME Shell extensions installed +- Default shell change +- GNOME keyboard shortcuts +- Brave managed policies +- Docker group membership +- GDM autologin +- GNOME extensions +- Terminal configuration -### 🔧 GNOME Extensions +## Optional NAS -| Extension | Purpose | -|-----------|---------| -| [Dash to Dock](https://extensions.gnome.org/extension/305/dash-to-dock/) | Customizable dock | -| [Blur My Shell](https://extensions.gnome.org/extension/21/blur-my-shell/) | Blur effects | -| [Just Perfection Desktop](https://extensions.gnome.org/extension/1748/just-perfection/) | UI fine-tuning | -| [Space Bar](https://extensions.gnome.org/extension/1341/space-bar/) | macOS-like workspace switcher | -| [AppIndicator](https://extensions.gnome.org/extension/657/appindicator/) | System tray support | -| [User Theme](https://extensions.gnome.org/extension/19/user-theme/) | Allow custom GTK themes | -| [Vicinae](https://extensions.gnome.org/extension/1879/vicinae/) | Window management | -| [Quake Terminal](https://extensions.gnome.org/extension/1144/quake-terminal/) | Drop-down terminal | -| **macOS-buttons** (local) | macOS traffic light window buttons (custom) | +The script asks whether to configure NAS mounts. -### 💬 Discord + Vencord +If enabled, credentials are stored at: -- **Client:** Discord via Flatpak (`com.discordapp.Discord`) -- **Mod:** [Vencord](https://vencord.dev/) patched -- Vencord CLI installer used to patch the Flatpak install + /etc/samba/credentials-unraid -### 📦 Package Count +Mount points: -- **Total packages:** ~1258 -- **Auto-installed (deps):** ~224 -- **Flatpak apps:** Steam (Proton-GE), Rewaita -- **AUR helper:** paru + /mnt/nas/isos + /mnt/nas/Data ---- +## Dotfiles -## 📁 Repository Structure +System setup and personal config are separated: -``` -cachyos-setup/ -├── snapshot.sh # Run to capture a new snapshot -├── snapshots/ # Timestamped snapshots -│ └── 2026-05-16_10-45-15/ # Latest snapshot -│ ├── pacman-packages.txt # All installed packages -│ ├── flatpak-list.txt # Flatpak apps & remotes -│ ├── gnome-extensions.txt # Enabled extensions -│ ├── gsettings-dump.txt # Complete gsettings state -│ ├── gnome-shell-settings.txt # Shell-specific settings -│ ├── theme-config.txt # GTK themes & CSS -│ ├── shortcuts.txt # Keyboard shortcuts -│ ├── display-config.txt # xrandr / monitor layout -│ └── system-info.txt # OS, kernel, GPU, RAM -└── extension/ # macOS-buttons GNOME Shell extension - ├── extension.js - ├── stylesheet.css - └── metadata.json -``` +- post-install-cachyos.sh installs packages and system-level setup. +- cachyos-dotfiles syncs user configuration, GNOME settings, extensions, icons, dock order, shortcuts, Ghostty, Zsh, Fastfetch, and related desktop preferences. ---- +## Recommended flow -## 🔄 Reinstall Guide +On a fresh CachyOS install: -### 1. Install CachyOS + ./post-install-cachyos.sh -Install CachyOS on the target machine (laptop). +Then import personal settings from dotfiles: -### 2. Basic Setup + cd ~/Projects/cachyos-dotfiles + git pull + ./import.sh -```bash -# Enable paru (AUR helper) -sudo pacman -Syu git +When the desktop is perfect and you want to save it: -# Install paru following CachyOS wiki instructions -# https://wiki.cachyos.org/enable-aur/ -``` + cd ~/Projects/cachyos-dotfiles + ./export.sh -### 3. Install Packages +## Notes -```bash -# See snapshots/pacman-packages.txt for the full list -sudo pacman -S -``` +Do not store secrets in dotfiles. -### 4. Install Flatpaks +Keep these out of Git: -```bash -sudo pacman -Syu flatpak -flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo -flatpak install flathub com.discordapp.Discord -y -flatpak install flathub com.valvesoftware.Steam.CompatibilityTool.Proton-GE -y -flatpak install flathub io.github.swordpuffin.rewaita -y -``` - -### 5. Apply Theme - -```bash -# GTK CSS for macOS-style window buttons -mkdir -p ~/.config/gtk-3.0 ~/.config/gtk-4.0 ~/.config/macos-like-window-controls/src - -# The CSS files are in the macos-like-window-controls GitHub repo -# https://github.com/xiadnoring/macos-like-window-controls - -# gtk-3.0/gtk.css -echo '@import "../macos-like-window-controls/src/gtk-3.0.css";' > ~/.config/gtk-3.0/gtk.css - -# gtk-4.0/gtk.css -echo '@import "../macos-like-window-controls/src/gtk-4.0.css";' > ~/.config/gtk-4.0/gtk.css - -# Flatpak theme access -sudo flatpak override --filesystem=xdg-config/gtk-3.0 -sudo flatpak override --filesystem=xdg-config/gtk-4.0 -sudo flatpak override --filesystem=xdg-config/macos-like-window-controls -``` - -### 6. Install Vencord - -```bash -curl -L -o /tmp/VencordInstallerCli-linux https://github.com/Vendicated/VencordInstaller/releases/latest/download/VencordInstallerCli-linux -chmod +x /tmp/VencordInstallerCli-linux -/tmp/VencordInstallerCli-linux -install -location ~/.config/discord -``` - -### 7. GNOME Extensions - -```bash -# Enable extensions via extensions.gnome.org or manual install -gnome-extensions enable dash-to-dock@micxgx.gmail.com -gnome-extensions enable blur-my-shell@aunetx -gnome-extensions enable just-perfection-desktop@just-perfection -gnome-extensions enable space-bar@luchrioh -gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com -gnome-extensions enable vicinae@dagimg-dot -gnome-extensions enable quake-terminal@diegodario88.github.io -gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com - -# Copy macOS-buttons extension from this repo -cp -r extension/* ~/.local/share/gnome-shell/extensions/macos-buttons@lago/ -gnome-extensions enable macos-buttons@lago -``` - -### 8. Apply Settings - -```bash -# Import gsettings from snapshot -cd ~/cachyos-setup/snapshots/latest -# Apply gsettings values from gsettings-dump.txt manually -``` - -### 9. Run Snapshot to Verify - -```bash -cd ~/cachyos-setup -./snapshot.sh -# Compare new snapshot with original -``` - ---- - -## 📸 Snapshots - -Each snapshot captures: - -- **Packages** — Full pacman package list (all + auto-installed) -- **Flatpak** — Apps, remotes, and overrides -- **Extensions** — Enabled GNOME Shell extensions -- **GSettings** — Complete `gsettings list-recursively` dump -- **Shell Settings** — GNOME Shell & Dash-to-Dock specific settings -- **Theme** — GTK theme config and CSS files -- **Shortcuts** — Keyboard shortcuts and media keys -- **Display** — Monitor layout via xrandr -- **System Info** — OS, kernel, GPU, RAM, CPU - -Run `./snapshot.sh` anytime to create a new timestamped snapshot. - ---- - -## 📝 Notes - -- **Wayland limitation:** GNOME Shell window decorations are drawn by the compositor, so GTK CSS only affects client-side decorated (CSD) apps (file manager, text editor, etc.). -- **No X11:** GNOME 50 requires Wayland; no Xorg session available. -- **Theme overlay:** Uses CSS overlay on top of Adwaita, not a full theme replacement. - ---- - -Generated on 2026-05-16 | CachyOS rolling | GNOME 50 | Wayland +- NAS credentials +- SSH private keys +- API tokens +- Browser cookies +- Password stores +- Thunderbird profiles diff --git a/post-install-cachyos.sh b/post-install-cachyos.sh index a1ee7ae..00e150a 100755 --- a/post-install-cachyos.sh +++ b/post-install-cachyos.sh @@ -33,10 +33,15 @@ OFFICIAL_PACKAGES=( lm_sensors pciutils hwdata + variety + python-pywal + tela-circle-icon-theme-all zsh ) AUR_PACKAGES=( + opencode-bin + ulauncher wireguard-gui-bin vesktop-bin sone @@ -44,6 +49,7 @@ AUR_PACKAGES=( FLATPAK_PACKAGES=( io.gitlab.adhami3310.Impression + com.mattjakeman.ExtensionManager ) NAS_HOST="192.168.178.3" @@ -863,6 +869,164 @@ configure_git_identity() { fi } + + + + +configure_ulauncher_launcher() { + log "Configuring Ulauncher on Super+Space..." + + if ! command -v ulauncher >/dev/null 2>&1; then + warn "ulauncher is not installed. Skipping launcher configuration." + return + fi + + # Free Super+Space from GNOME input-source switching so Ulauncher can use it. + gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['space']" || true + gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['space']" || true + + custom_path="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-ulauncher/" + existing_bindings="$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings 2>/dev/null || echo "@as []")" + + if ! echo "$existing_bindings" | grep -q "$custom_path"; then + if [[ "$existing_bindings" == "@as []" ]]; then + new_bindings="['$custom_path']" + else + new_bindings="$(echo "$existing_bindings" | sed "s|]$|, '$custom_path']|")" + fi + gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$new_bindings" + fi + + gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$custom_path" name "Ulauncher App Launcher" + gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$custom_path" command "ulauncher-toggle" + gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$custom_path" binding "space" + + mkdir -p "$HOME/.config/autostart" + + if [[ -f /usr/share/applications/ulauncher.desktop ]]; then + cp /usr/share/applications/ulauncher.desktop "$HOME/.config/autostart/ulauncher.desktop" + else + cat > "$HOME/.config/autostart/ulauncher.desktop" <<'ULAUNCHERDESKTOP' +[Desktop Entry] +Type=Application +Name=Ulauncher +Exec=ulauncher --hide-window +X-GNOME-Autostart-enabled=true +ULAUNCHERDESKTOP + fi + + if ! pgrep -x ulauncher >/dev/null 2>&1; then + nohup ulauncher --hide-window >/dev/null 2>&1 & + fi + + log "Ulauncher configured on Super+Space." + warn "If Super+Space still changes keyboard input source, change GNOME's input-source shortcut in Settings > Keyboard > Typing." +} + + +configure_wallpaper_palette_tools() { + log "Configuring wallpaper and palette tools..." + + mkdir -p "$HOME/Pictures/Wallpapers" + + if command -v variety >/dev/null 2>&1; then + log "Variety installed. Use it to find and rotate high-quality wallpapers." + else + warn "Variety is not available." + fi + + if command -v wal >/dev/null 2>&1; then + log "Pywal installed. Generate a palette with: wal -i ~/Pictures/Wallpapers/example.jpg" + else + warn "Pywal/wal is not available." + fi + + log "Wallpaper folder prepared: $HOME/Pictures/Wallpapers" +} + + +configure_gnome_keyboard_shortcuts() { + log "Configuring GNOME keyboard shortcuts..." + + if ! command -v gsettings >/dev/null 2>&1; then + warn "gsettings is not available. Skipping GNOME shortcuts." + return + fi + + # Keep Super+Space free for Search Light. + gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['space']" || true + gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['space']" || true + + # Hyprland-like close shortcut while preserving Alt+F4. + gsettings set org.gnome.desktop.wm.keybindings close "['q', 'F4']" || true + + python - <<'PYSHORTCUTS' +import ast +import subprocess + +SCHEMA = "org.gnome.settings-daemon.plugins.media-keys" +BASE = "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/" + +shortcuts = [ + ("custom-ghostty", "Open Ghostty", "ghostty", "Return"), + ("custom-brave", "Open Brave", "brave-browser", "b"), + ("custom-vscode", "Open VS Code", "code", "e"), + ("custom-files", "Open Files", "nautilus", "f"), + ("custom-mail", "Open Thunderbird", "thunderbird", "m"), + ("custom-telegram", "Open Telegram", "telegram-desktop", "t"), + ("custom-signal", "Open Signal", "signal-desktop", "s"), + ("custom-wireguard", "Open WireGuard GUI", "wireguard-gui-fixed", "w"), + ("custom-impression", "Open Impression", "flatpak run io.gitlab.adhami3310.Impression", "i"), +] + +def get(cmd): + return subprocess.check_output(cmd, text=True).strip() + +def set_value(schema, key, value): + subprocess.run(["gsettings", "set", schema, key, value], check=True) + +raw = get(["gsettings", "get", SCHEMA, "custom-keybindings"]) +existing = [] if raw == "@as []" else ast.literal_eval(raw) + +for shortcut_id, name, command, binding in shortcuts: + path = f"{BASE}{shortcut_id}/" + if path not in existing: + existing.append(path) + + shortcut_schema = f"{SCHEMA}.custom-keybinding:{path}" + set_value(shortcut_schema, "name", name) + set_value(shortcut_schema, "command", command) + set_value(shortcut_schema, "binding", binding) + +formatted = "[" + ", ".join(repr(item) for item in existing) + "]" +set_value(SCHEMA, "custom-keybindings", formatted) +PYSHORTCUTS + + log "GNOME keyboard shortcuts configured." + warn "Search Light should own Super+Space. Clipboard history should own Super+V." +} + + +configure_tela_circle_icons() { + log "Configuring Tela Circle icon theme..." + + if [[ -d /usr/share/icons/Tela-circle ]] || [[ -d /usr/share/icons/Tela-circle-dark ]]; then + if gsettings writable org.gnome.desktop.interface icon-theme >/dev/null 2>&1; then + if [[ -d /usr/share/icons/Tela-circle-dark ]]; then + gsettings set org.gnome.desktop.interface icon-theme "Tela-circle-dark" || true + log "GNOME icon theme set to Tela-circle-dark." + else + gsettings set org.gnome.desktop.interface icon-theme "Tela-circle" || true + log "GNOME icon theme set to Tela-circle." + fi + else + warn "GNOME icon-theme setting is not writable." + fi + else + warn "Tela Circle icon theme was not found under /usr/share/icons." + fi +} + post_checks() { log "Quick checks..." @@ -884,6 +1048,15 @@ post_checks() { echo "Sone:" | tee -a "$LOG_FILE" command -v sone | tee -a "$LOG_FILE" || true + echo "OpenCode:" | tee -a "$LOG_FILE" + command -v opencode | tee -a "$LOG_FILE" || true + + echo "Extension Manager:" | tee -a "$LOG_FILE" + flatpak info com.mattjakeman.ExtensionManager >/dev/null 2>&1 && echo "com.mattjakeman.ExtensionManager" | tee -a "$LOG_FILE" || true + + echo "Tela Circle icons:" | tee -a "$LOG_FILE" + ls -d /usr/share/icons/Tela-circle* 2>/dev/null | head -n 10 | tee -a "$LOG_FILE" || true + log "Done. Log saved at: $LOG_FILE" } @@ -898,7 +1071,11 @@ main() { configure_ghostty configure_zsh_ohmyzsh_powerlevel10k configure_fastfetch_terminal_summary + configure_gnome_keyboard_shortcuts + configure_tela_circle_icons + configure_wallpaper_palette_tools install_aur_packages + configure_ulauncher_launcher configure_wireguard_gui_webkit_workaround install_flatpak_packages setup_docker