diff --git a/applications/icons/Basecamp.png b/applications/icons/Basecamp.png new file mode 100644 index 0000000..3edec48 Binary files /dev/null and b/applications/icons/Basecamp.png differ diff --git a/applications/icons/ChatGPT.png b/applications/icons/ChatGPT.png new file mode 100644 index 0000000..cc68d78 Binary files /dev/null and b/applications/icons/ChatGPT.png differ diff --git a/applications/icons/Discord.png b/applications/icons/Discord.png new file mode 100644 index 0000000..a82dbc6 Binary files /dev/null and b/applications/icons/Discord.png differ diff --git a/applications/icons/Disk Usage.png b/applications/icons/Disk Usage.png new file mode 100644 index 0000000..6cc55ba Binary files /dev/null and b/applications/icons/Disk Usage.png differ diff --git a/applications/icons/Docker.png b/applications/icons/Docker.png new file mode 100644 index 0000000..aeadd22 Binary files /dev/null and b/applications/icons/Docker.png differ diff --git a/applications/icons/Figma.png b/applications/icons/Figma.png new file mode 100644 index 0000000..62ffa90 Binary files /dev/null and b/applications/icons/Figma.png differ diff --git a/applications/icons/GitHub.png b/applications/icons/GitHub.png new file mode 100644 index 0000000..f3248e4 Binary files /dev/null and b/applications/icons/GitHub.png differ diff --git a/applications/icons/Google Contacts.png b/applications/icons/Google Contacts.png new file mode 100644 index 0000000..6d99dc8 Binary files /dev/null and b/applications/icons/Google Contacts.png differ diff --git a/applications/icons/Google Messages.png b/applications/icons/Google Messages.png new file mode 100644 index 0000000..bc911a5 Binary files /dev/null and b/applications/icons/Google Messages.png differ diff --git a/applications/icons/Google Photos.png b/applications/icons/Google Photos.png new file mode 100644 index 0000000..8b8c642 Binary files /dev/null and b/applications/icons/Google Photos.png differ diff --git a/applications/icons/HEY.png b/applications/icons/HEY.png new file mode 100644 index 0000000..3ac92d9 Binary files /dev/null and b/applications/icons/HEY.png differ diff --git a/applications/icons/WhatsApp.png b/applications/icons/WhatsApp.png new file mode 100644 index 0000000..10ecdfb Binary files /dev/null and b/applications/icons/WhatsApp.png differ diff --git a/applications/icons/X.png b/applications/icons/X.png new file mode 100644 index 0000000..99131de Binary files /dev/null and b/applications/icons/X.png differ diff --git a/applications/icons/YouTube.png b/applications/icons/YouTube.png new file mode 100644 index 0000000..46ed4ca Binary files /dev/null and b/applications/icons/YouTube.png differ diff --git a/applications/icons/Zoom.png b/applications/icons/Zoom.png new file mode 100644 index 0000000..622db52 Binary files /dev/null and b/applications/icons/Zoom.png differ diff --git a/bin/omarchy-cmd-first-run b/bin/omarchy-cmd-first-run index 78a5dc8..b9e72f2 100755 --- a/bin/omarchy-cmd-first-run +++ b/bin/omarchy-cmd-first-run @@ -6,8 +6,8 @@ FIRST_RUN_MODE=~/.local/state/omarchy/first-run.mode if [[ -f "$FIRST_RUN_MODE" ]]; then rm -f "$FIRST_RUN_MODE" - $OMARCHY_PATH/install/first-run/battery-monitor.sh - $OMARCHY_PATH/install/first-run/firewall.sh - $OMARCHY_PATH/install/first-run/gnome-theme.sh + bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh" + bash "$OMARCHY_PATH/install/first-run/firewall.sh" + bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh" sudo rm -f /etc/sudoers.d/first-run fi diff --git a/bin/omarchy-install-steam b/bin/omarchy-install-steam index ec21ff2..7533370 100755 --- a/bin/omarchy-install-steam +++ b/bin/omarchy-install-steam @@ -1,8 +1,5 @@ #!/bin/bash -echo "Adding multilib repository for 32-bit compatibility" -sudo sed -i '/^#\s*\[multilib\]/,/^#\s*Include/ s/^#\s*//' /etc/pacman.conf - echo "Now pick dependencies matching your graphics card" sudo pacman -Syu --noconfirm steam setsid gtk-launch steam >/dev/null 2>&1 & diff --git a/bin/omarchy-refresh-plymouth b/bin/omarchy-refresh-plymouth index 8e2a825..fce86bf 100755 --- a/bin/omarchy-refresh-plymouth +++ b/bin/omarchy-refresh-plymouth @@ -7,4 +7,4 @@ if command -v limine-mkinitcpio &>/dev/null; then sudo limine-mkinitcpio else sudo mkinitcpio -P -fi \ No newline at end of file +fi diff --git a/bin/omarchy-tui-install b/bin/omarchy-tui-install index a15d364..bf08d3a 100755 --- a/bin/omarchy-tui-install +++ b/bin/omarchy-tui-install @@ -20,13 +20,16 @@ fi ICON_DIR="$HOME/.local/share/applications/icons" DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop" -ICON_PATH="$ICON_DIR/$APP_NAME.png" -mkdir -p "$ICON_DIR" - -if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then - echo "Error: Failed to download icon." - return 1 +if [[ ! "$ICON_URL" =~ ^https?:// ]] && [ -f "$ICON_URL" ]; then + ICON_PATH="$ICON_URL" +else + ICON_PATH="$ICON_DIR/$APP_NAME.png" + mkdir -p "$ICON_DIR" + if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then + echo "Error: Failed to download icon." + exit 1 + fi fi if [[ $WINDOW_STYLE == "float" ]]; then diff --git a/bin/omarchy-update-git b/bin/omarchy-update-git index ae1d9d4..5743e4d 100755 --- a/bin/omarchy-update-git +++ b/bin/omarchy-update-git @@ -1,5 +1,6 @@ #!/bin/bash echo -e "\e[32mUpdate Omarchy\e[0m" + git -C $OMARCHY_PATH pull --autostash git -C $OMARCHY_PATH diff --check || git -C $OMARCHY_PATH reset --merge diff --git a/bin/omarchy-upload-log b/bin/omarchy-upload-log new file mode 100755 index 0000000..bd98da8 --- /dev/null +++ b/bin/omarchy-upload-log @@ -0,0 +1,126 @@ +#!/bin/bash + +# Upload logs to 0x0.st + +LOG_TYPE="${1:-install}" +TEMP_LOG="/tmp/upload-log.txt" +SYSTEM_INFO="/tmp/system-info.txt" + +# Get system information if fastfetch is available +if command -v fastfetch >/dev/null 2>&1; then + { + echo "=========================================" + echo "SYSTEM INFORMATION" + echo "=========================================" + # Use fastfetch with no logo to get clean output + fastfetch --logo none --pipe 2>/dev/null || echo "Failed to get system info" + echo "" + echo "=========================================" + echo "LOG CONTENT" + echo "=========================================" + echo "" + } >"$SYSTEM_INFO" +else + # Fallback to basic info if fastfetch isn't available + { + echo "=========================================" + echo "SYSTEM INFORMATION" + echo "=========================================" + echo "Hostname: $(hostname)" + echo "Kernel: $(uname -r)" + echo "Date: $(date)" + echo "" + echo "=========================================" + echo "LOG CONTENT" + echo "=========================================" + echo "" + } >"$SYSTEM_INFO" +fi + +case "$LOG_TYPE" in +install) + ARCHINSTALL_LOG="/var/log/archinstall/install.log" + OMARCHY_LOG="/var/log/omarchy-install.log" + + # Combine system info with logs + cat "$SYSTEM_INFO" >"$TEMP_LOG" + cat $ARCHINSTALL_LOG $OMARCHY_LOG >>"$TEMP_LOG" 2>/dev/null + + if [ ! -s "$TEMP_LOG" ]; then + echo "Error: No install logs found" + exit 1 + fi + + echo "Uploading installation log to 0x0.st..." + ;; + +this-boot) + # Combine system info with boot logs + cat "$SYSTEM_INFO" >"$TEMP_LOG" + journalctl -b 0 >>"$TEMP_LOG" 2>/dev/null + + if [ ! -s "$TEMP_LOG" ]; then + echo "Error: No logs found for current boot" + exit 1 + fi + + echo "Uploading current boot logs to 0x0.st..." + ;; + +last-boot) + # Combine system info with previous boot logs + cat "$SYSTEM_INFO" >"$TEMP_LOG" + journalctl -b -1 >>"$TEMP_LOG" 2>/dev/null + + if [ ! -s "$TEMP_LOG" ]; then + echo "Error: No logs found for previous boot" + exit 1 + fi + + echo "Uploading previous boot logs to 0x0.st..." + ;; + +installed) + # System info plus all installed packages + cat "$SYSTEM_INFO" >"$TEMP_LOG" + { + echo "" + echo "=========================================" + echo "INSTALLED PACKAGES (pacman -Q)" + echo "=========================================" + pacman -Q 2>/dev/null || echo "Failed to get package list" + } >>"$TEMP_LOG" + + if [ ! -s "$TEMP_LOG" ]; then + echo "Error: Failed to gather system information" + exit 1 + fi + + echo "Uploading system information to 0x0.st..." + ;; + +*) + echo "Usage: $0 [install|this-boot|last-boot|system-info]" + echo " install - Upload installation logs (default)" + echo " this-boot - Upload logs from current boot" + echo " last-boot - Upload logs from previous boot" + echo " installed - Upload system info and installed packages" + exit 1 + ;; +esac + +echo "" + +URL=$(curl -sF "file=@$TEMP_LOG" -Fexpires=24 https://0x0.st) + +if [ $? -eq 0 ] && [ -n "$URL" ]; then + echo "✓ Log uploaded successfully!" + echo "Share this URL:" + echo "" + echo " $URL" + echo "" + echo "This link will expire in 24 hours." +else + echo "Error: Failed to upload log file" + exit 1 +fi diff --git a/bin/omarchy-webapp-install b/bin/omarchy-webapp-install index a75a328..0d25319 100755 --- a/bin/omarchy-webapp-install +++ b/bin/omarchy-webapp-install @@ -18,13 +18,16 @@ fi ICON_DIR="$HOME/.local/share/applications/icons" DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop" -ICON_PATH="$ICON_DIR/$APP_NAME.png" -mkdir -p "$ICON_DIR" - -if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then - echo "Error: Failed to download icon." - return 1 +if [[ ! "$ICON_URL" =~ ^https?:// ]] && [ -f "$ICON_URL" ]; then + ICON_PATH="$ICON_URL" +else + ICON_PATH="$ICON_DIR/$APP_NAME.png" + mkdir -p "$ICON_DIR" + if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then + echo "Error: Failed to download icon." + exit 1 + fi fi cat >"$DESKTOP_FILE" </dev/null | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}' || true) if [[ -n $AMD_AUDIO_CARD ]]; then pactl set-card-profile "$AMD_AUDIO_CARD" "HiFi (Mic1, Mic2, Speaker)" 2>/dev/null || true diff --git a/install/config/hardware/fix-fkeys.sh b/install/config/hardware/fix-fkeys.sh old mode 100755 new mode 100644 index b652cbf..d0b4315 --- a/install/config/hardware/fix-fkeys.sh +++ b/install/config/hardware/fix-fkeys.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Ensure that F-keys on Apple-like keyboards (such as Lofree Flow84) are always F-keys if [[ ! -f /etc/modprobe.d/hid_apple.conf ]]; then echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/hid_apple.conf diff --git a/install/config/hardware/ignore-power-button.sh b/install/config/hardware/ignore-power-button.sh old mode 100755 new mode 100644 index 4166b9b..8e514f6 --- a/install/config/hardware/ignore-power-button.sh +++ b/install/config/hardware/ignore-power-button.sh @@ -1,5 +1,2 @@ -#!/bin/bash - # Disable shutting system down on power button to bind it to power menu afterwards sudo sed -i 's/.*HandlePowerKey=.*/HandlePowerKey=ignore/' /etc/systemd/logind.conf - diff --git a/install/config/hardware/intel.sh b/install/config/hardware/intel.sh old mode 100755 new mode 100644 index 5c45e78..546fe47 --- a/install/config/hardware/intel.sh +++ b/install/config/hardware/intel.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # This installs hardware video acceleration for Intel GPUs # Check if we have an Intel GPU at all if INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel'); then @@ -11,4 +9,3 @@ if INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel'); then sudo pacman -S --needed --noconfirm libva-intel-driver fi fi - diff --git a/install/config/hardware/network.sh b/install/config/hardware/network.sh old mode 100755 new mode 100644 index 04f2f35..65f9fdb --- a/install/config/hardware/network.sh +++ b/install/config/hardware/network.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Ensure iwd service will be started sudo systemctl enable iwd.service diff --git a/install/config/hardware/nvidia.sh b/install/config/hardware/nvidia.sh old mode 100755 new mode 100644 index 37effa3..494390b --- a/install/config/hardware/nvidia.sh +++ b/install/config/hardware/nvidia.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # ============================================================================== # Hyprland NVIDIA Setup Script for Arch Linux # ============================================================================== @@ -30,11 +28,6 @@ if [ -n "$(lspci | grep -i 'nvidia')" ]; then KERNEL_HEADERS="linux-hardened-headers" fi - # Enable multilib repository for 32-bit libraries - if ! grep -q "^\[multilib\]" /etc/pacman.conf; then - sudo sed -i '/^#\s*\[multilib\]/,/^#\s*Include/ s/^#\s*//' /etc/pacman.conf - fi - # force package database refresh sudo pacman -Syu --noconfirm diff --git a/install/config/hardware/printer.sh b/install/config/hardware/printer.sh old mode 100755 new mode 100644 index b737b49..781a987 --- a/install/config/hardware/printer.sh +++ b/install/config/hardware/printer.sh @@ -1,5 +1,3 @@ -#!/bin/bash - chrootable_systemctl_enable cups.service # Disable multicast dns in resolved. Avahi will provide this for better network printer discovery diff --git a/install/config/hardware/set-wireless-regdom.sh b/install/config/hardware/set-wireless-regdom.sh old mode 100755 new mode 100644 index d4a9362..8f28407 --- a/install/config/hardware/set-wireless-regdom.sh +++ b/install/config/hardware/set-wireless-regdom.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # First check that wireless-regdb is there if [ -f "/etc/conf.d/wireless-regdom" ]; then unset WIRELESS_REGDOM @@ -12,25 +10,24 @@ if [ ! -n "${WIRELESS_REGDOM}" ]; then if [ -e "/etc/localtime" ]; then TIMEZONE=$(readlink -f /etc/localtime) TIMEZONE=${TIMEZONE#/usr/share/zoneinfo/} - + # Some timezones are formatted with the two letter country code at the start COUNTRY="${TIMEZONE%%/*}" - + # If we don't have a two letter country, get it from the timezone table if [[ ! "$COUNTRY" =~ ^[A-Z]{2}$ ]] && [ -f "/usr/share/zoneinfo/zone.tab" ]; then COUNTRY=$(awk -v tz="$TIMEZONE" '$3 == tz {print $1; exit}' /usr/share/zoneinfo/zone.tab) fi - + # Check if we have a two letter country code if [[ "$COUNTRY" =~ ^[A-Z]{2}$ ]]; then # Append it to the wireless-regdom conf file that is used at boot - echo "WIRELESS_REGDOM=\"$COUNTRY\"" | sudo tee -a /etc/conf.d/wireless-regdom > /dev/null - + echo "WIRELESS_REGDOM=\"$COUNTRY\"" | sudo tee -a /etc/conf.d/wireless-regdom >/dev/null + # Also set it one off now - if command -v iw &> /dev/null; then + if command -v iw &>/dev/null; then sudo iw reg set ${COUNTRY} fi fi fi fi - diff --git a/install/config/hardware/usb-autosuspend.sh b/install/config/hardware/usb-autosuspend.sh old mode 100755 new mode 100644 index a7d820e..9132384 --- a/install/config/hardware/usb-autosuspend.sh +++ b/install/config/hardware/usb-autosuspend.sh @@ -1,6 +1,5 @@ -#!/bin/bash - # Disable USB autosuspend to prevent peripheral disconnection issues if [[ ! -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then echo "options usbcore autosuspend=-1" | sudo tee /etc/modprobe.d/disable-usb-autosuspend.conf -fi \ No newline at end of file +fi + diff --git a/install/config/increase-lockout-limit.sh b/install/config/increase-lockout-limit.sh old mode 100755 new mode 100644 index 1fdbf7d..522deb7 --- a/install/config/increase-lockout-limit.sh +++ b/install/config/increase-lockout-limit.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Increase lockout limit to 10 and decrease timeout to 2 minutes sudo sed -i 's|^\(auth\s\+required\s\+pam_faillock.so\)\s\+preauth.*$|\1 preauth silent deny=10 unlock_time=120|' "/etc/pam.d/system-auth" sudo sed -i 's|^\(auth\s\+\[default=die\]\s\+pam_faillock.so\)\s\+authfail.*$|\1 authfail deny=10 unlock_time=120|' "/etc/pam.d/system-auth" diff --git a/install/config/increase-sudo-tries.sh b/install/config/increase-sudo-tries.sh old mode 100755 new mode 100644 index cf3d5ca..5b64b86 --- a/install/config/increase-sudo-tries.sh +++ b/install/config/increase-sudo-tries.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Give the user 10 instead of 3 tries to fat finger their password before lockout echo "Defaults passwd_tries=10" | sudo tee /etc/sudoers.d/passwd-tries sudo chmod 440 /etc/sudoers.d/passwd-tries diff --git a/install/config/lazyvim.sh b/install/config/lazyvim.sh new file mode 100644 index 0000000..325f631 --- /dev/null +++ b/install/config/lazyvim.sh @@ -0,0 +1 @@ +omarchy-lazyvim-setup diff --git a/install/config/localdb.sh b/install/config/localdb.sh old mode 100755 new mode 100644 diff --git a/install/config/mimetypes.sh b/install/config/mimetypes.sh old mode 100755 new mode 100644 index 4c0b241..48bb8cf --- a/install/config/mimetypes.sh +++ b/install/config/mimetypes.sh @@ -1,5 +1,3 @@ -#!/bin/bash - omarchy-refresh-applications update-desktop-database ~/.local/share/applications diff --git a/install/config/mise-ruby.sh b/install/config/mise-ruby.sh old mode 100755 new mode 100644 index 304a10d..9404615 --- a/install/config/mise-ruby.sh +++ b/install/config/mise-ruby.sh @@ -1,7 +1,26 @@ -#!/bin/bash - # Install Ruby using gcc-14 for compatibility mise settings set ruby.ruby_build_opts "CC=gcc-14 CXX=g++-14" # Trust .ruby-version mise settings add idiomatic_version_file_enable_tools ruby + +# Install pre-built Ruby + Rails for x86_64 +if [[ $(uname -m) == "x86_64" ]]; then + RUBY_VERSION="3.4.5" + RUBY_TARBALL="ruby-${RUBY_VERSION}-rails-8.0.2.1-x86_64.tar.gz" + RUBY_URL="https://pkgs.omarchy.org/ruby/${RUBY_TARBALL}" + MISE_RUBY_DIR="$HOME/.local/share/mise/installs/ruby" + OFFLINE_CACHE="/var/cache/omarchy/ruby" + + mkdir -p "$MISE_RUBY_DIR" + + if [[ ${OMARCHY_INSTALL_MODE:-offline} == "offline" ]]; then + echo "Installing Ruby from offline cache..." + tar -xzf "${OFFLINE_CACHE}/${RUBY_TARBALL}" -C "$MISE_RUBY_DIR" + else + echo "Downloading pre-built Ruby ${RUBY_VERSION}..." + curl -fsSL "$RUBY_URL" | tar -xz -C "$MISE_RUBY_DIR" + fi + + mise use --global "ruby@${RUBY_VERSION}" +fi diff --git a/install/config/ssh-flakiness.sh b/install/config/ssh-flakiness.sh old mode 100755 new mode 100644 index 1746f59..906e68a --- a/install/config/ssh-flakiness.sh +++ b/install/config/ssh-flakiness.sh @@ -1,4 +1,2 @@ -#!/bin/bash - # Solve common flakiness with SSH echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf diff --git a/install/config/sudoless-asdcontrol.sh b/install/config/sudoless-asdcontrol.sh old mode 100755 new mode 100644 index 7c678f7..120c6fc --- a/install/config/sudoless-asdcontrol.sh +++ b/install/config/sudoless-asdcontrol.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Setup sudo-less controls for controlling brightness on Apple Displays echo "$USER ALL=(ALL) NOPASSWD: /usr/local/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol sudo chmod 440 /etc/sudoers.d/asdcontrol diff --git a/install/config/theme.sh b/install/config/theme.sh old mode 100755 new mode 100644 index 0a222e3..13ea9a5 --- a/install/config/theme.sh +++ b/install/config/theme.sh @@ -1,9 +1,6 @@ -#!/bin/bash - # Set links for Nautilius action icons sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg -sudo gtk-update-icon-cache /usr/share/icons/Yaru # Setup theme links mkdir -p ~/.config/omarchy/themes diff --git a/install/config/timezones.sh b/install/config/timezones.sh old mode 100755 new mode 100644 index 7aa17fb..24e96a0 --- a/install/config/timezones.sh +++ b/install/config/timezones.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Ensure timezone can be updated without needing to sudo sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null </dev/null </dev/null; then # This computer runs on a battery powerprofilesctl set balanced || true diff --git a/install/first-run/firewall.sh b/install/first-run/firewall.sh old mode 100755 new mode 100644 index c802467..a38f5a5 --- a/install/first-run/firewall.sh +++ b/install/first-run/firewall.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Allow nothing in, everything out sudo ufw default deny incoming sudo ufw default allow outgoing diff --git a/install/first-run/gnome-theme.sh b/install/first-run/gnome-theme.sh index 0f16386..2936312 100755 --- a/install/first-run/gnome-theme.sh +++ b/install/first-run/gnome-theme.sh @@ -1,5 +1,5 @@ -#!/bin/bash - gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue" + +sudo gtk-update-icon-cache /usr/share/icons/Yaru diff --git a/install/preflight/chroot.sh b/install/helpers/chroot.sh old mode 100755 new mode 100644 similarity index 72% rename from install/preflight/chroot.sh rename to install/helpers/chroot.sh index 4a6d5b8..ab61972 --- a/install/preflight/chroot.sh +++ b/install/helpers/chroot.sh @@ -6,3 +6,6 @@ chrootable_systemctl_enable() { sudo systemctl enable --now $1 fi } + +# Export the function so it's available in subshells +export -f chrootable_systemctl_enable diff --git a/install/helpers/errors.sh b/install/helpers/errors.sh new file mode 100644 index 0000000..0063783 --- /dev/null +++ b/install/helpers/errors.sh @@ -0,0 +1,159 @@ +# Directs user to Omarchy Discord +QR_CODE=' +█▀▀▀▀▀█ ▄ ▄ ▀▄▄▄█ █▀▀▀▀▀█ +█ ███ █ ▄▄▄▄▀▄▀▄▀ █ ███ █ +█ ▀▀▀ █ ▄█ ▄█▄▄▀ █ ▀▀▀ █ +▀▀▀▀▀▀▀ ▀▄█ █ █ █ ▀▀▀▀▀▀▀ +▀▀█▀▀▄▀▀▀▀▄█▀▀█ ▀ █ ▀ █ +█▄█ ▄▄▀▄▄ ▀ ▄ ▀█▄▄▄▄ ▀ ▀█ +▄ ▄▀█ ▀▄▀▀▀▄ ▄█▀▄█▀▄▀▄▀█▀ +█ ▄▄█▄▀▄█ ▄▄▄ ▀ ▄▀██▀ ▀█ +▀ ▀ ▀ █ ▀▄ ▀▀█▀▀▀█▄▀ +█▀▀▀▀▀█ ▀█ ▄▀▀ █ ▀ █▄▀██ +█ ███ █ █▀▄▄▀ █▀███▀█▄██▄ +█ ▀▀▀ █ ██ ▀ █▄█ ▄▄▄█▀ █ +▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀▀▀▀' + +# Track if we're already handling an error to prevent double-trapping +ERROR_HANDLING=false + +# Cursor is usually hidden while we install +show_cursor() { + printf "\033[?25h" +} + +# Display truncated log lines from the install log +show_log_tail() { + if [[ -f $OMARCHY_INSTALL_LOG_FILE ]]; then + local log_lines=$(($TERM_HEIGHT - $LOGO_HEIGHT - 35)) + local max_line_width=$((LOGO_WIDTH - 4)) + + tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" | while IFS= read -r line; do + if ((${#line} > max_line_width)); then + local truncated_line="${line:0:$max_line_width}..." + else + local truncated_line="$line" + fi + + gum style "$truncated_line" + done + + echo + fi +} + +# Display the failed command or script name +show_failed_script_or_command() { + if [[ -n ${CURRENT_SCRIPT:-} ]]; then + gum style "Failed script: $CURRENT_SCRIPT" + else + # Truncate long command lines to fit the display + local cmd="$BASH_COMMAND" + local max_cmd_width=$((LOGO_WIDTH - 4)) + + if ((${#cmd} > max_cmd_width)); then + cmd="${cmd:0:$max_cmd_width}..." + fi + + gum style "$cmd" + fi +} + +# Save original stdout and stderr for trap to use +save_original_outputs() { + exec 3>&1 4>&2 +} + +# Restore stdout and stderr to original (saved in FD 3 and 4) +# This ensures output goes to screen, not log file +restore_outputs() { + if [ -e /proc/self/fd/3 ] && [ -e /proc/self/fd/4 ]; then + exec 1>&3 2>&4 + fi +} + +# Error handler +catch_errors() { + # Prevent recursive error handling + if [[ $ERROR_HANDLING == true ]]; then + return + else + ERROR_HANDLING=true + fi + + # Store exit code immediately before it gets overwritten + local exit_code=$? + + stop_log_output + restore_outputs + + clear_logo + show_cursor + + gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "Omarchy installation stopped!" + show_log_tail + + gum style "This command halted with exit code $exit_code:" + show_failed_script_or_command + + gum style "$QR_CODE" + echo + gum style "Get help from the community via QR code or at https://discord.gg/tXFUdasqhY" + + # Offer options menu + while true; do + options=() + + # If online install, show retry first + if [[ ${OMARCHY_INSTALL_MODE:-offline} == "online" ]]; then + options+=("Retry installation") + fi + + # Add upload option if internet is available + if ping -c 1 -W 1 1.1.1.1 >/dev/null 2>&1; then + options+=("Upload log for support") + fi + + # Add remaining options + options+=("View full log") + options+=("Exit") + + choice=$(gum choose "${options[@]}" --header "What would you like to do?" --height 6 --padding "1 $PADDING_LEFT") + + case "$choice" in + "Retry installation") + bash ~/.local/share/omarchy/install.sh + break + ;; + "View full log") + less "$OMARCHY_INSTALL_LOG_FILE" + ;; + "Upload log for support") + omarchy-upload-install-log + ;; + "Exit" | "") + exit 1 + ;; + esac + done +} + +# Exit handler - ensures cleanup happens on any exit +exit_handler() { + local exit_code=$? + + # Only run if we're exiting with an error and haven't already handled it + if [[ $exit_code -ne 0 && $ERROR_HANDLING != true ]]; then + catch_errors + else + stop_log_output + show_cursor + fi +} + +# Set up traps +trap catch_errors ERR INT TERM +trap exit_handler EXIT + +# Save original outputs in case we trap +save_original_outputs diff --git a/install/helpers/gum.sh b/install/helpers/gum.sh new file mode 100644 index 0000000..34508e0 --- /dev/null +++ b/install/helpers/gum.sh @@ -0,0 +1,18 @@ +# Ensure we have gum available +if ! command -v gum &>/dev/null; then + sudo pacman -S --needed --noconfirm gum +fi + +# Tokyo Night theme for gum confirm +export GUM_CONFIRM_PROMPT_FOREGROUND="6" # Cyan for prompt +export GUM_CONFIRM_SELECTED_FOREGROUND="0" # Black text on selected +export GUM_CONFIRM_SELECTED_BACKGROUND="2" # Green background for selected +export GUM_CONFIRM_UNSELECTED_FOREGROUND="7" # White for unselected +export GUM_CONFIRM_UNSELECTED_BACKGROUND="0" # Black background for unselected +export PADDING="0 0 0 $PADDING_LEFT" # Gum Style +export GUM_CHOOSE_PADDING="$PADDING" +export GUM_FILTER_PADDING="$PADDING" +export GUM_INPUT_PADDING="$PADDING" +export GUM_SPIN_PADDING="$PADDING" +export GUM_TABLE_PADDING="$PADDING" +export GUM_CONFIRM_PADDING="$PADDING" diff --git a/install/helpers/layout.sh b/install/helpers/layout.sh new file mode 100644 index 0000000..63dba55 --- /dev/null +++ b/install/helpers/layout.sh @@ -0,0 +1,20 @@ +# Get terminal size from /dev/tty (works in all scenarios: direct, sourced, or piped) +if [ -e /dev/tty ]; then + TERM_SIZE=$(stty size 2>/dev/null /dev/null) + + # Build complete output buffer with escape sequences + output="" + for ((i = 0; i < log_lines; i++)); do + line="${current_lines[i]:-}" + + # Truncate if needed + if [ ${#line} -gt $max_line_width ]; then + line="${line:0:$max_line_width}..." + fi + + # Add clear line escape and formatted output for each line + if [ -n "$line" ]; then + output+="${ANSI_CLEAR_LINE}${ANSI_GRAY}${PADDING_LEFT_SPACES} → ${line}${ANSI_RESET}\n" + else + output+="${ANSI_CLEAR_LINE}${PADDING_LEFT_SPACES}\n" + fi + done + + printf "${ANSI_RESTORE_CURSOR}%b" "$output" + + sleep 0.1 + done + ) & + monitor_pid=$! +} + +stop_log_output() { + if [ -n "${monitor_pid:-}" ]; then + kill $monitor_pid 2>/dev/null || true + wait $monitor_pid 2>/dev/null || true + unset monitor_pid + fi +} + +start_install_log() { + sudo touch "$OMARCHY_INSTALL_LOG_FILE" + sudo chmod 666 "$OMARCHY_INSTALL_LOG_FILE" + + export OMARCHY_START_TIME=$(date '+%Y-%m-%d %H:%M:%S') + + echo "=== Omarchy Installation Started: $OMARCHY_START_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE" + start_log_output +} + +stop_install_log() { + stop_log_output + show_cursor + + if [[ -n ${OMARCHY_INSTALL_LOG_FILE:-} ]]; then + OMARCHY_END_TIME=$(date '+%Y-%m-%d %H:%M:%S') + echo "=== Omarchy Installation Completed: $OMARCHY_END_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE" + echo "" >>"$OMARCHY_INSTALL_LOG_FILE" + echo "=== Installation Time Summary ===" >>"$OMARCHY_INSTALL_LOG_FILE" + + if [ -f "/var/log/archinstall/install.log" ]; then + ARCHINSTALL_START=$(grep -m1 '^\[' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true) + ARCHINSTALL_END=$(grep 'Installation completed without any errors' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true) + + if [ -n "$ARCHINSTALL_START" ] && [ -n "$ARCHINSTALL_END" ]; then + ARCH_START_EPOCH=$(date -d "$ARCHINSTALL_START" +%s) + ARCH_END_EPOCH=$(date -d "$ARCHINSTALL_END" +%s) + ARCH_DURATION=$((ARCH_END_EPOCH - ARCH_START_EPOCH)) + + ARCH_MINS=$((ARCH_DURATION / 60)) + ARCH_SECS=$((ARCH_DURATION % 60)) + + echo "Archinstall: ${ARCH_MINS}m ${ARCH_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" + fi + fi + + if [ -n "$OMARCHY_START_TIME" ]; then + OMARCHY_START_EPOCH=$(date -d "$OMARCHY_START_TIME" +%s) + OMARCHY_END_EPOCH=$(date -d "$OMARCHY_END_TIME" +%s) + OMARCHY_DURATION=$((OMARCHY_END_EPOCH - OMARCHY_START_EPOCH)) + + OMARCHY_MINS=$((OMARCHY_DURATION / 60)) + OMARCHY_SECS=$((OMARCHY_DURATION % 60)) + + echo "Omarchy: ${OMARCHY_MINS}m ${OMARCHY_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" + + if [ -n "$ARCH_DURATION" ]; then + TOTAL_DURATION=$((ARCH_DURATION + OMARCHY_DURATION)) + TOTAL_MINS=$((TOTAL_DURATION / 60)) + TOTAL_SECS=$((TOTAL_DURATION % 60)) + echo "Total: ${TOTAL_MINS}m ${TOTAL_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" + fi + fi + echo "=================================" >>"$OMARCHY_INSTALL_LOG_FILE" + + echo "Rebooting system..." >>"$OMARCHY_INSTALL_LOG_FILE" + fi +} + +run_logged() { + local script="$1" + + export CURRENT_SCRIPT="$script" + + echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting: $script" >>"$OMARCHY_INSTALL_LOG_FILE" + + # Use bash -c to create a clean subshell + bash -c "source '$script'" >"$OMARCHY_INSTALL_LOG_FILE" 2>&1 + + local exit_code=$? + + if [ $exit_code -eq 0 ]; then + echo "[$(date '+%Y-%m-%d %H:%M:%S')] Completed: $script" >>"$OMARCHY_INSTALL_LOG_FILE" + unset CURRENT_SCRIPT + else + echo "[$(date '+%Y-%m-%d %H:%M:%S')] Failed: $script (exit code: $exit_code)" >>"$OMARCHY_INSTALL_LOG_FILE" + fi + + return $exit_code +} diff --git a/install/helpers/logo.sh b/install/helpers/logo.sh new file mode 100644 index 0000000..3afe456 --- /dev/null +++ b/install/helpers/logo.sh @@ -0,0 +1,8 @@ +export LOGO_PATH="$OMARCHY_PATH/logo.txt" +export LOGO_WIDTH=$(awk '{ if (length > max) max = length } END { print max+0 }' "$LOGO_PATH" 2>/dev/null || echo 0) +export LOGO_HEIGHT=$(wc -l <"$LOGO_PATH" 2>/dev/null || echo 0) + +clear_logo() { + printf "\033[H\033[2J" # Clear screen and move cursor to top-left + gum style --foreground 2 --padding "1 0 0 $PADDING_LEFT" "$(<"$LOGO_PATH")" +} diff --git a/install/login/alt-bootloaders.sh b/install/login/alt-bootloaders.sh old mode 100755 new mode 100644 index 7476ec7..bb35d9b --- a/install/login/alt-bootloaders.sh +++ b/install/login/alt-bootloaders.sh @@ -1,5 +1,3 @@ -#!/bin/bash - if ! command -v limine &>/dev/null; then # Add kernel hooks if ! grep -Eq '^HOOKS=.*plymouth' /etc/mkinitcpio.conf; then diff --git a/install/login/enable-mkinitcpio.sh b/install/login/enable-mkinitcpio.sh new file mode 100644 index 0000000..7422d8d --- /dev/null +++ b/install/login/enable-mkinitcpio.sh @@ -0,0 +1,18 @@ +echo "Re-enabling mkinitcpio hooks..." + +# Restore the specific mkinitcpio pacman hooks +if [ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]; then + sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook +fi + +if [ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]; then + sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook +fi + +echo "mkinitcpio hooks re-enabled" + +if command -v limine &>/dev/null; then + sudo limine-update +else + sudo mkinitcpio -P +fi diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh old mode 100755 new mode 100644 index e679851..a579acb --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -1,14 +1,27 @@ -#!/bin/bash - if command -v limine &>/dev/null; then sudo tee /etc/mkinitcpio.conf.d/omarchy_hooks.conf </dev/null HOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs) EOF - [[ -f /boot/EFI/limine/limine.conf ]] && EFI=true + [[ -f /boot/EFI/limine/limine.conf ]] || [[ -f /boot/EFI/BOOT/limine.conf ]] && EFI=true # Conf location is different between EFI and BIOS - [[ -n "$EFI" ]] && limine_config="/boot/EFI/limine/limine.conf" || limine_config="/boot/limine/limine.conf" + if [[ -n "$EFI" ]]; then + # Check USB location first, then regular EFI location + if [[ -f /boot/EFI/BOOT/limine.conf ]]; then + limine_config="/boot/EFI/BOOT/limine.conf" + else + limine_config="/boot/EFI/limine/limine.conf" + fi + else + limine_config="/boot/limine/limine.conf" + fi + + # Double-check and exit if we don't have a config file for some reason + if [[ ! -f $limine_config ]]; then + echo "Error: Limine config not found at $limine_config" >&2 + exit 1 + fi CMDLINE=$(grep "^[[:space:]]*cmdline:" "$limine_config" | head -1 | sed 's/^[[:space:]]*cmdline:[[:space:]]*//') @@ -63,10 +76,9 @@ term_background_bright: 24283b EOF sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook - sudo limine-update # Match Snapper configs if not installing from the ISO - if [ -z "${OMARCHY_CHROOT_INSTALL:-}" ]; then + if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then sudo snapper -c root create-config / fi @@ -85,7 +97,7 @@ EOF fi # Add UKI entry to UEFI machines to skip bootloader showing on normal boot -if [ -n "$EFI" ] && efibootmgr &>/dev/null && ! efibootmgr | grep -q Omarchy && +if [[ -n $EFI ]] && efibootmgr &>/dev/null && ! efibootmgr | grep -q Omarchy && ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends"; then sudo efibootmgr --create \ --disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \ diff --git a/install/login/plymouth.sh b/install/login/plymouth.sh old mode 100755 new mode 100644 index 37c0eaf..72102f2 --- a/install/login/plymouth.sh +++ b/install/login/plymouth.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Hyprland launched via UWSM and login directly as user, rely on disk encryption + hyprlock for security # ============================================================================== @@ -8,7 +6,7 @@ if [ "$(plymouth-set-default-theme)" != "omarchy" ]; then sudo cp -r "$HOME/.local/share/omarchy/default/plymouth" /usr/share/plymouth/themes/omarchy/ - sudo plymouth-set-default-theme -R omarchy + sudo plymouth-set-default-theme omarchy fi # ============================================================================== diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages new file mode 100644 index 0000000..f1a3daa --- /dev/null +++ b/install/omarchy-base.packages @@ -0,0 +1,131 @@ +# Omarchy core package list installed via install/packages.sh +# This file is also used by the ISO builder when determining needs + +1password-beta +1password-cli +alacritty +asdcontrol-git +avahi +bash-completion +bat +blueberry +brightnessctl +btop +cargo +clang +cups +cups-browsed +cups-filters +cups-pdf +docker +docker-buildx +docker-compose +dust +evince +eza +fastfetch +fcitx5 +fcitx5-gtk +fcitx5-qt +fd +ffmpegthumbnailer +fontconfig +fzf +gcc14 +github-cli +gnome-calculator +gnome-keyring +gnome-themes-extra +gum +gvfs-mtp +gvfs-smb +hypridle +hyprland +hyprland-qtutils +hyprlock +hyprpicker +hyprshot +hyprsunset +imagemagick +impala +imv +inetutils +iwd +jq +kdenlive +kvantum-qt5 +lazydocker +lazygit +less +libqalculate +libreoffice +llvm +localsend +luarocks +mako +man +mariadb-libs +mise +mpv +nautilus +noto-fonts +noto-fonts-cjk +noto-fonts-emoji +noto-fonts-extra +nss-mdns +nvim +obs-studio +obsidian +omarchy-chromium +omarchy-lazyvim +pamixer +pinta +playerctl +plocate +plymouth +polkit-gnome +postgresql-libs +power-profiles-daemon +python-gobject +python-poetry-core +python-terminaltexteffects +qt5-wayland +ripgrep +satty +signal-desktop +slurp +spotify +starship +sushi +swaybg +swayosd +system-config-printer +tldr +tree-sitter-cli +ttf-cascadia-mono-nerd +ttf-ia-writer +ttf-jetbrains-mono-nerd +typora +tzupdate +ufw +ufw-docker +unzip +uwsm +walker-bin +waybar +wf-recorder +whois +wireless-regdb +wiremix +wireplumber +wl-clip-persist +wl-clipboard +wl-screenrec +woff2-font-awesome +xdg-desktop-portal-gtk +xdg-desktop-portal-hyprland +xmlstarlet +xournalpp +yaru-icon-theme +yay +zoxide diff --git a/install/omarchy-other.packages b/install/omarchy-other.packages new file mode 100644 index 0000000..a648453 --- /dev/null +++ b/install/omarchy-other.packages @@ -0,0 +1,44 @@ +# Packages installed outside of install/packages.sh or optional packages +# Utilized by ISO builder to ensure package availability in the ISO + +autoconf-archive +base +base-devel +broadcom-wl +btrfs-progs +dart +dkms +egl-wayland +git +gst-plugin-pipewire +gtk4-layer-shell +htop +intltool +iwd +jdk-openjdk +libpulse +libsass +libva-intel-driver +libva-nvidia-driver +limine +limine-mkinitcpio-hook +limine-snapper-sync +linux +linux-firmware +linux-headers +nvidia-dkms +nvidia-open-dkms +nvidia-utils +lib32-nvidia-utils +pipewire +pipewire-alsa +pipewire-jack +pipewire-pulse +qt5-remoteobjects +qt6-wayland +sassc +snapper +webp-pixbuf-loader +wget +yay-debug +zram-generator diff --git a/install/packages.sh b/install/packages.sh deleted file mode 100644 index e1fd977..0000000 --- a/install/packages.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash - -sudo pacman -S --noconfirm --needed \ - 1password-beta \ - 1password-cli \ - asdcontrol-git \ - alacritty \ - avahi \ - bash-completion \ - bat \ - blueberry \ - brightnessctl \ - btop \ - cargo \ - clang \ - cups \ - cups-browsed \ - cups-filters \ - cups-pdf \ - docker \ - docker-buildx \ - docker-compose \ - dust \ - evince \ - eza \ - fastfetch \ - fcitx5 \ - fcitx5-gtk \ - fcitx5-qt \ - fd \ - ffmpegthumbnailer \ - fontconfig \ - fzf \ - gcc14 \ - github-cli \ - gnome-calculator \ - gnome-keyring \ - gnome-themes-extra \ - gum \ - gvfs-mtp \ - gvfs-smb \ - hypridle \ - hyprland \ - hyprland-qtutils \ - hyprlock \ - hyprpicker \ - hyprshot \ - hyprsunset \ - imagemagick \ - impala \ - imv \ - inetutils \ - iwd \ - jq \ - kdenlive \ - kvantum-qt5 \ - lazydocker \ - lazygit \ - less \ - libqalculate \ - libreoffice \ - llvm \ - localsend \ - luarocks \ - mako \ - man \ - mariadb-libs \ - mise \ - mpv \ - nautilus \ - noto-fonts \ - noto-fonts-cjk \ - noto-fonts-emoji \ - noto-fonts-extra \ - nss-mdns \ - nvim \ - obs-studio \ - obsidian \ - omarchy-chromium \ - pamixer \ - pinta \ - playerctl \ - plocate \ - plymouth \ - polkit-gnome \ - postgresql-libs \ - power-profiles-daemon \ - python-gobject \ - python-poetry-core \ - python-terminaltexteffects \ - qt5-wayland \ - ripgrep \ - satty \ - signal-desktop \ - slurp \ - spotify \ - starship \ - sushi \ - swaybg \ - swayosd \ - system-config-printer \ - tldr \ - tree-sitter-cli \ - ttf-cascadia-mono-nerd \ - ttf-ia-writer \ - ttf-jetbrains-mono-nerd \ - typora \ - tzupdate \ - ufw \ - ufw-docker \ - unzip \ - uwsm \ - walker-bin \ - waybar \ - wf-recorder \ - whois \ - wireless-regdb \ - wiremix \ - wireplumber \ - wl-clip-persist \ - wl-clipboard \ - wl-screenrec \ - woff2-font-awesome \ - xdg-desktop-portal-gtk \ - xdg-desktop-portal-hyprland \ - xmlstarlet \ - xournalpp \ - yaru-icon-theme \ - yay \ - zoxide diff --git a/install/packaging/base.sh b/install/packaging/base.sh new file mode 100644 index 0000000..668e4a9 --- /dev/null +++ b/install/packaging/base.sh @@ -0,0 +1,3 @@ +# Install all base packages +mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$') +sudo pacman -S --noconfirm --needed "${packages[@]}" diff --git a/install/packaging/fonts.sh b/install/packaging/fonts.sh old mode 100755 new mode 100644 index 01f31ed..8d5a35e --- a/install/packaging/fonts.sh +++ b/install/packaging/fonts.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Omarchy logo in a font for Waybar use mkdir -p ~/.local/share/fonts cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/ diff --git a/install/packaging/icons.sh b/install/packaging/icons.sh new file mode 100644 index 0000000..3110afc --- /dev/null +++ b/install/packaging/icons.sh @@ -0,0 +1,4 @@ +# Copy all bundled icons to the applications/icons directory +ICON_DIR="$HOME/.local/share/applications/icons" +mkdir -p "$ICON_DIR" +cp ~/.local/share/omarchy/applications/icons/*.png "$ICON_DIR/" diff --git a/install/packaging/lazyvim.sh b/install/packaging/lazyvim.sh old mode 100755 new mode 100644 index 7fad269..f8b8e37 --- a/install/packaging/lazyvim.sh +++ b/install/packaging/lazyvim.sh @@ -1,8 +1,3 @@ -#!/bin/bash - if [[ ! -d "$HOME/.config/nvim" ]]; then - git clone https://github.com/LazyVim/starter ~/.config/nvim - cp -R ~/.local/share/omarchy/config/nvim/* ~/.config/nvim/ - rm -rf ~/.config/nvim/.git - echo "vim.opt.relativenumber = false" >>~/.config/nvim/lua/config/options.lua + omarchy-lazyvim-setup fi diff --git a/install/packaging/pins.sh b/install/packaging/pins.sh deleted file mode 100755 index bacb616..0000000 --- a/install/packaging/pins.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# We pin explicit packages that are bad upstream here -pinned_packages=$(omarchy-pkg-pinned) - -if [[ -n $pinned_packages ]]; then - echo -e "\e[32m\nInstall pinned system packages\e[0m" - - for pinned in $pinned_packages; do - echo "sudo pacman -U --noconfirm $pinned" - sudo pacman -U --noconfirm $pinned - done -fi diff --git a/install/packaging/tuis.sh b/install/packaging/tuis.sh old mode 100755 new mode 100644 index 0aea639..273a5d7 --- a/install/packaging/tuis.sh +++ b/install/packaging/tuis.sh @@ -1,4 +1,4 @@ -#!/bin/bash +ICON_DIR="$HOME/.local/share/applications/icons" -omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/qdirstat.png -omarchy-tui-install "Docker" "lazydocker" tile https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/docker.png +omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float "$ICON_DIR/Disk Usage.png" +omarchy-tui-install "Docker" "lazydocker" tile "$ICON_DIR/Docker.png" diff --git a/install/packaging/webapps.sh b/install/packaging/webapps.sh old mode 100755 new mode 100644 index ac6b3ba..d1e223b --- a/install/packaging/webapps.sh +++ b/install/packaging/webapps.sh @@ -1,15 +1,15 @@ -#!/bin/bash +ICON_DIR="$HOME/.local/share/applications/icons" -omarchy-webapp-install "HEY" https://app.hey.com https://www.hey.com/assets/images/general/hey.png -omarchy-webapp-install "Basecamp" https://launchpad.37signals.com https://basecamp.com/assets/images/general/basecamp.png -omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/whatsapp.png -omarchy-webapp-install "Google Photos" https://photos.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-photos.png -omarchy-webapp-install "Google Contacts" https://contacts.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-contacts.png -omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-messages.png -omarchy-webapp-install "ChatGPT" https://chatgpt.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/chatgpt.png -omarchy-webapp-install "YouTube" https://youtube.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/youtube.png -omarchy-webapp-install "GitHub" https://github.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/github-light.png -omarchy-webapp-install "X" https://x.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/x-light.png -omarchy-webapp-install "Figma" https://figma.com/ https://www.veryicon.com/download/png/application/app-icon-7/figma-1?s=256 -omarchy-webapp-install "Discord" https://discord.com/channels/@me https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/discord.png -omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/zoom.png +omarchy-webapp-install "HEY" https://app.hey.com "$ICON_DIR/HEY.png" +omarchy-webapp-install "Basecamp" https://launchpad.37signals.com "$ICON_DIR/Basecamp.png" +omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ "$ICON_DIR/WhatsApp.png" +omarchy-webapp-install "Google Photos" https://photos.google.com/ "$ICON_DIR/Google Photos.png" +omarchy-webapp-install "Google Contacts" https://contacts.google.com/ "$ICON_DIR/Google Contacts.png" +omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations "$ICON_DIR/Google Messages.png" +omarchy-webapp-install "ChatGPT" https://chatgpt.com/ "$ICON_DIR/ChatGPT.png" +omarchy-webapp-install "YouTube" https://youtube.com/ "$ICON_DIR/YouTube.png" +omarchy-webapp-install "GitHub" https://github.com/ "$ICON_DIR/GitHub.png" +omarchy-webapp-install "X" https://x.com/ "$ICON_DIR/X.png" +omarchy-webapp-install "Figma" https://figma.com/ "$ICON_DIR/Figma.png" +omarchy-webapp-install "Discord" https://discord.com/channels/@me "$ICON_DIR/Discord.png" +omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home "$ICON_DIR/Zoom.png" diff --git a/install/post-install/finished.sh b/install/post-install/finished.sh new file mode 100644 index 0000000..b8e2866 --- /dev/null +++ b/install/post-install/finished.sh @@ -0,0 +1,36 @@ +stop_install_log + +clear +tte -i ~/.local/share/omarchy/logo.txt --canvas-width 0 --anchor-text c --frame-rate 920 laseretch +echo +echo +echo "You're done!" | tte --canvas-width 0 --anchor-text c --frame-rate 640 wipe + +# Display installation time if available +if [[ -f $OMARCHY_INSTALL_LOG_FILE ]] && grep -q "Total:" "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null; then + echo + echo + TOTAL_TIME=$(tail -n 20 "$OMARCHY_INSTALL_LOG_FILE" | grep "^Total:" | sed 's/^Total:[[:space:]]*//') + if [ -n "$TOTAL_TIME" ]; then + echo "Installation completed in $TOTAL_TIME" | tte --canvas-width 0 --anchor-text c --frame-rate 200 waves + fi +fi + +if sudo test -f /etc/sudoers.d/99-omarchy-installer; then + sudo rm -f /etc/sudoers.d/99-omarchy-installer &>/dev/null + echo + echo "Remember to remove USB installer!" | tte --canvas-width 0 --anchor-text c --frame-rate 640 wipe +fi + +# Exit gracefully if user chooses not to reboot +if gum confirm --padding "1 0 0 $PADDING_LEFT" --default --affirmative "Reboot Now" --negative "" ""; then + # Clear screen to hide any shutdown messages + clear + + # Use systemctl if available, otherwise fallback to reboot command + if command -v systemctl &>/dev/null; then + systemctl reboot --no-wall 2>/dev/null + else + reboot 2>/dev/null + fi +fi diff --git a/install/post-install/pacman.sh b/install/post-install/pacman.sh new file mode 100644 index 0000000..574c420 --- /dev/null +++ b/install/post-install/pacman.sh @@ -0,0 +1,3 @@ +# Configure pacman +sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf +sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist /etc/pacman.d/mirrorlist diff --git a/install/preflight/begin.sh b/install/preflight/begin.sh new file mode 100644 index 0000000..cf13d1c --- /dev/null +++ b/install/preflight/begin.sh @@ -0,0 +1,3 @@ +clear_logo +gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Installing Omarchy..." +start_install_log diff --git a/install/preflight/disable-mkinitcpio.sh b/install/preflight/disable-mkinitcpio.sh new file mode 100644 index 0000000..a1979c8 --- /dev/null +++ b/install/preflight/disable-mkinitcpio.sh @@ -0,0 +1,16 @@ +# Temporarily disable mkinitcpio hooks to prevent multiple regenerations during package installation +# This speeds up installation significantly + +echo "Temporarily disabling mkinitcpio hooks during installation..." + +# Move the specific mkinitcpio pacman hooks out of the way if they exist +if [ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook ]; then + sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled +fi + +if [ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook ]; then + sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled +fi + +echo "mkinitcpio hooks disabled" + diff --git a/install/preflight/first-run-mode.sh b/install/preflight/first-run-mode.sh old mode 100755 new mode 100644 index 49eee6f..28998e4 --- a/install/preflight/first-run-mode.sh +++ b/install/preflight/first-run-mode.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Set first-run mode marker so we can install stuff post-installation mkdir -p ~/.local/state/omarchy touch ~/.local/state/omarchy/first-run.mode diff --git a/install/preflight/guard.sh b/install/preflight/guard.sh old mode 100755 new mode 100644 index 37ab1da..60a6c87 --- a/install/preflight/guard.sh +++ b/install/preflight/guard.sh @@ -1,5 +1,3 @@ -#!/bin/bash - abort() { echo -e "\e[31mOmarchy install requires: $1\e[0m" echo diff --git a/install/preflight/migrations.sh b/install/preflight/migrations.sh old mode 100755 new mode 100644 index f520a54..27819d1 --- a/install/preflight/migrations.sh +++ b/install/preflight/migrations.sh @@ -1,5 +1,3 @@ -#!/bin/bash - OMARCHY_MIGRATIONS_STATE_PATH=~/.local/state/omarchy/migrations mkdir -p $OMARCHY_MIGRATIONS_STATE_PATH diff --git a/install/preflight/pacman.sh b/install/preflight/pacman.sh old mode 100755 new mode 100644 index 4ec80d4..cc2d43f --- a/install/preflight/pacman.sh +++ b/install/preflight/pacman.sh @@ -1,11 +1,11 @@ -#!/bin/bash +if [[ ${OMARCHY_INSTALL_MODE:-offline} == "online" ]]; then + # Install build tools + sudo pacman -S --needed --noconfirm base-devel -# Install build tools -sudo pacman -S --needed --noconfirm base-devel + # Configure pacman + sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf + sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist /etc/pacman.d/mirrorlist -# Configure pacman -sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf -sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist /etc/pacman.d/mirrorlist - -# Refresh all repos -sudo pacman -Syu --noconfirm + # Refresh all repos + sudo pacman -Syu --noconfirm +fi diff --git a/install/preflight/show-env.sh b/install/preflight/show-env.sh old mode 100755 new mode 100644 index 8753df1..34ee076 --- a/install/preflight/show-env.sh +++ b/install/preflight/show-env.sh @@ -1,4 +1,6 @@ -#!/bin/bash +# Show installation environment variables +gum log --level info "Installation Environment:" -echo "Installation ENV:" -env | grep -E "^(OMARCHY_CHROOT_INSTALL|OMARCHY_USER_NAME|OMARCHY_USER_EMAIL|USER|HOME|OMARCHY_REPO|OMARCHY_REF)=" +env | grep -E "^(OMARCHY_CHROOT_INSTALL|OMARCHY_INSTALL_MODE|OMARCHY_USER_NAME|OMARCHY_USER_EMAIL|USER|HOME|OMARCHY_REPO|OMARCHY_REF|OMARCHY_PATH)=" | sort | while IFS= read -r var; do + gum log --level info " $var" +done diff --git a/install/preflight/trap-errors.sh b/install/preflight/trap-errors.sh deleted file mode 100755 index 6c3ebc6..0000000 --- a/install/preflight/trap-errors.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Give people a chance to retry running the installation -catch_errors() { - echo -e "\n\e[31mOmarchy installation failed!\e[0m" - echo - echo "This command halted with exit code $?:" - echo "$BASH_COMMAND" - echo - echo "Get help from the community via QR code or at https://discord.gg/tXFUdasqhY" - echo " " - echo " █▀▀▀▀▀█ ▄ ▄ ▀▄▄▄█ █▀▀▀▀▀█ " - echo " █ ███ █ ▄▄▄▄▀▄▀▄▀ █ ███ █ " - echo " █ ▀▀▀ █ ▄█ ▄█▄▄▀ █ ▀▀▀ █ " - echo " ▀▀▀▀▀▀▀ ▀▄█ █ █ █ ▀▀▀▀▀▀▀ " - echo " ▀▀█▀▀▄▀▀▀▀▄█▀▀█ ▀ █ ▀ █ " - echo " █▄█ ▄▄▀▄▄ ▀ ▄ ▀█▄▄▄▄ ▀ ▀█ " - echo " ▄ ▄▀█ ▀▄▀▀▀▄ ▄█▀▄█▀▄▀▄▀█▀ " - echo " █ ▄▄█▄▀▄█ ▄▄▄ ▀ ▄▀██▀ ▀█ " - echo " ▀ ▀ ▀ █ ▀▄ ▀▀█▀▀▀█▄▀ " - echo " █▀▀▀▀▀█ ▀█ ▄▀▀ █ ▀ █▄▀██ " - echo " █ ███ █ █▀▄▄▀ █▀███▀█▄██▄ " - echo " █ ▀▀▀ █ ██ ▀ █▄█ ▄▄▄█▀ █ " - echo " ▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀▀▀▀ " - echo " " - - if command -v gum >/dev/null && gum confirm "Retry installation?"; then - bash ~/.local/share/omarchy/install.sh - else - echo "You can retry later by running: bash ~/.local/share/omarchy/install.sh" - fi -} - -# Ensure gum is available as early as possible to retry errors -sudo pacman -S --noconfirm gum - -trap catch_errors ERR diff --git a/install/reboot.sh b/install/reboot.sh deleted file mode 100644 index d444c14..0000000 --- a/install/reboot.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -clear -tte -i ~/.local/share/omarchy/logo.txt --frame-rate 920 laseretch -echo -echo "You're done! So we're ready to reboot now..." | tte --frame-rate 640 wipe - -if sudo test -f /etc/sudoers.d/99-omarchy-installer; then - sudo rm -f /etc/sudoers.d/99-omarchy-installer &>/dev/null - echo -e "\nRemember to remove USB installer!\n\n" -fi - -sleep 5 -reboot diff --git a/migrations/1752168292.sh b/migrations/1752168292.sh old mode 100755 new mode 100644 diff --git a/migrations/1753224615.sh b/migrations/1753224615.sh old mode 100755 new mode 100644 diff --git a/migrations/1753495989.sh b/migrations/1753495989.sh index 09f164a..119b432 100644 --- a/migrations/1753495989.sh +++ b/migrations/1753495989.sh @@ -1,6 +1,6 @@ echo "Allow updating of timezone by right-clicking on the clock (or running omarchy-cmd-tzupdate)" if omarchy-cmd-missing tzupdate; then - $OMARCHY_PATH/install/config/timezones.sh + bash "$OMARCHY_PATH/install/config/timezones.sh" omarchy-refresh-waybar fi diff --git a/migrations/1755109182.sh b/migrations/1755109182.sh old mode 100755 new mode 100644 diff --git a/migrations/1755494432.sh b/migrations/1755494432.sh index 04bbe29..ae6cbc4 100644 --- a/migrations/1755494432.sh +++ b/migrations/1755494432.sh @@ -1,3 +1,3 @@ echo "Disable USB autosuspend" -$OMARCHY_PATH/install/config/hardware/usb-autosuspend.sh +bash "$OMARCHY_PATH/install/config/hardware/usb-autosuspend.sh" diff --git a/migrations/1755507891.sh b/migrations/1755507891.sh old mode 100755 new mode 100644 diff --git a/migrations/1756491748.sh b/migrations/1756491748.sh old mode 100755 new mode 100644 diff --git a/migrations/1756507384.sh b/migrations/1756507384.sh old mode 100755 new mode 100644 diff --git a/migrations/1756911131.sh b/migrations/1756911131.sh old mode 100755 new mode 100644 diff --git a/migrations/1757483378.sh b/migrations/1757483378.sh index ed51f32..999e4f0 100644 --- a/migrations/1757483378.sh +++ b/migrations/1757483378.sh @@ -1,4 +1,4 @@ echo "6Ghz Wi-Fi + Intel graphics acceleration for existing installations" -$OMARCHY_PATH/install/config/hardware/set-wireless-regdom.sh -$OMARCHY_PATH/install/config/hardware/intel.sh +bash "$OMARCHY_PATH/install/config/hardware/set-wireless-regdom.sh" +bash "$OMARCHY_PATH/install/config/hardware/intel.sh"