From 9dcc6f0aec7582718478bb0dbb616c54ec317791 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sun, 28 Sep 2025 00:45:37 -0400 Subject: [PATCH] Add omarchy-doctor checks --- install/checks/firewall.sh | 21 ++++ install/checks/gnome-theme.sh | 9 ++ install/checks/power-profiles.sh | 13 ++ install/config/gpg.sh | 2 - install/login/default-keyring.sh | 43 +++++-- install/login/limine-snapper.sh | 207 ++++++++++++++++++++----------- install/login/plymouth.sh | 17 ++- install/login/sddm.sh | 30 ++++- install/packaging/base.sh | 33 +++-- install/packaging/fonts.sh | 21 ++-- install/packaging/icons.sh | 8 +- install/packaging/lazyvim.sh | 15 +-- install/packaging/tuis.sh | 17 ++- install/packaging/webapps.sh | 50 ++++---- 14 files changed, 321 insertions(+), 165 deletions(-) create mode 100644 install/checks/firewall.sh create mode 100644 install/checks/gnome-theme.sh create mode 100644 install/checks/power-profiles.sh diff --git a/install/checks/firewall.sh b/install/checks/firewall.sh new file mode 100644 index 00000000..8ab3858d --- /dev/null +++ b/install/checks/firewall.sh @@ -0,0 +1,21 @@ +OMARCHY_DESCRIPTION="Firewall Configuration" + +omarchy_verify() { + # Check if UFW is enabled + sudo ufw status | grep -q "Status: active" || add_error "UFW firewall not active" + + # Check if UFW service is enabled + systemctl is-enabled ufw &>/dev/null || add_error "UFW service not enabled" + + # Check default policies - they're on one line as "Default: deny (incoming), allow (outgoing), deny (routed)" + sudo ufw status verbose | grep -q "Default:.*deny (incoming)" || add_error "UFW default incoming policy not set to deny" + sudo ufw status verbose | grep -q "Default:.*allow (outgoing)" || add_error "UFW default outgoing policy not set to allow" + + # Check specific rules are present + sudo ufw status numbered | grep -q "53317/udp" || add_error "LocalSend UDP port 53317 not allowed" + sudo ufw status numbered | grep -q "53317/tcp" || add_error "LocalSend TCP port 53317 not allowed" + sudo ufw status numbered | grep -q "22/tcp" || add_error "SSH port 22 not allowed" + + # Check Docker DNS rule + sudo ufw status numbered | grep -q "allow-docker-dns" || add_error "Docker DNS rule not configured" +} diff --git a/install/checks/gnome-theme.sh b/install/checks/gnome-theme.sh new file mode 100644 index 00000000..54a95ee8 --- /dev/null +++ b/install/checks/gnome-theme.sh @@ -0,0 +1,9 @@ +OMARCHY_DESCRIPTION="GNOME Theme Settings" + +omarchy_verify() { + gsettings get org.gnome.desktop.interface gtk-theme &>/dev/null || add_error "Cannot access GTK theme setting" + gsettings get org.gnome.desktop.interface color-scheme &>/dev/null || add_error "Cannot access color scheme setting" + gsettings get org.gnome.desktop.interface icon-theme &>/dev/null || add_error "Cannot access icon theme setting" + + [[ -d /usr/share/icons ]] || add_error "Icon themes directory missing" +} diff --git a/install/checks/power-profiles.sh b/install/checks/power-profiles.sh new file mode 100644 index 00000000..acedb39e --- /dev/null +++ b/install/checks/power-profiles.sh @@ -0,0 +1,13 @@ +OMARCHY_DESCRIPTION="Power Profile & Battery Settings" + +omarchy_verify() { + if ls /sys/class/power_supply/BAT* &>/dev/null; then + current_profile=$(powerprofilesctl get 2>/dev/null) + [[ "$current_profile" == "balanced" ]] || add_error "Power profile not set to balanced for battery device" + + systemctl --user is-enabled omarchy-battery-monitor.timer &>/dev/null || add_error "Battery monitor timer not enabled" + else + current_profile=$(powerprofilesctl get 2>/dev/null) + [[ "$current_profile" == "performance" ]] || add_error "Power profile not set to performance for AC device" + fi +} diff --git a/install/config/gpg.sh b/install/config/gpg.sh index a8c571d3..d72851cd 100644 --- a/install/config/gpg.sh +++ b/install/config/gpg.sh @@ -17,6 +17,4 @@ omarchy_verify() { local perms=$(stat -c %a /etc/gnupg/dirmngr.conf) [[ "$perms" == "644" ]] || add_error "GPG dirmngr.conf has incorrect permissions: $perms (should be 644)" fi - - pgrep -x dirmngr >/dev/null || add_error "GPG dirmngr is not running" } diff --git a/install/login/default-keyring.sh b/install/login/default-keyring.sh index 52c94301..5dae1065 100644 --- a/install/login/default-keyring.sh +++ b/install/login/default-keyring.sh @@ -1,8 +1,13 @@ -KEYRING_DIR="$HOME/.local/share/keyrings" -KEYRING_FILE="Default_keyring.keyring" -DEFAULT_FILE="default" +OMARCHY_DESCRIPTION="GNOME Keyring Default Setup" -cat << EOF | tee "$KEYRING_FILE" +omarchy_install() { + KEYRING_DIR="$HOME/.local/share/keyrings" + KEYRING_FILE="$KEYRING_DIR/Default_keyring.keyring" + DEFAULT_FILE="$KEYRING_DIR/default" + + mkdir -p "$KEYRING_DIR" + + cat << EOF > "$KEYRING_FILE" [keyring] display-name=Default keyring ctime=$(date +%s) @@ -11,10 +16,32 @@ lock-on-idle=false lock-after=false EOF -cat << EOF | tee "$DEFAULT_FILE" + cat << EOF > "$DEFAULT_FILE" Default_keyring EOF -chmod 700 "$KEYRING_DIR" -chmod 600 "$KEYRING_FILE" -chmod 644 "$DEFAULT_FILE" + chmod 700 "$KEYRING_DIR" + chmod 600 "$KEYRING_FILE" + chmod 644 "$DEFAULT_FILE" +} + +omarchy_verify() { + local KEYRING_DIR="$HOME/.local/share/keyrings" + + [[ -d "$KEYRING_DIR" ]] || add_error "Keyring directory missing" + if [[ -d "$KEYRING_DIR" ]]; then + local dir_perms=$(stat -c %a "$KEYRING_DIR") + [[ "$dir_perms" == "700" ]] || add_warning "Keyring directory has permissions $dir_perms (should be 700)" + fi + + [[ -f "$KEYRING_DIR/Default_keyring.keyring" ]] || add_error "Default keyring file missing" + if [[ -f "$KEYRING_DIR/Default_keyring.keyring" ]]; then + local file_perms=$(stat -c %a "$KEYRING_DIR/Default_keyring.keyring") + [[ "$file_perms" == "600" ]] || add_warning "Keyring file has permissions $file_perms (should be 600)" + fi + + [[ -f "$KEYRING_DIR/default" ]] || add_error "Default keyring selection file missing" + if [[ -f "$KEYRING_DIR/default" ]]; then + grep -q "Default_keyring" "$KEYRING_DIR/default" || add_error "Default keyring not set as default" + fi +} diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh index 06e99900..18484a6e 100644 --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -1,38 +1,42 @@ -#!/bin/bash - -# Description for doctor OMARCHY_DESCRIPTION="Limine Bootloader & Snapper Configuration" +should_run() { + command -v limine &>/dev/null +} + # Installation function omarchy_install() { - if command -v limine &>/dev/null; then - sudo tee /etc/mkinitcpio.conf.d/omarchy_hooks.conf </dev/null + should_run || return 0 + + sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook + + 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 ]] || [[ -f /boot/EFI/BOOT/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 - 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 + # Conf location is different between EFI and BIOS + 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 + # 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:]]*//') + CMDLINE=$(grep "^[[:space:]]*cmdline:" "$limine_config" | head -1 | sed 's/^[[:space:]]*cmdline:[[:space:]]*//') - sudo tee /etc/default/limine </dev/null + sudo tee /etc/default/limine </dev/null TARGET_OS_NAME="Omarchy" ESP_PATH="/boot" @@ -55,13 +59,13 @@ MAX_SNAPSHOT_ENTRIES=5 SNAPSHOT_FORMAT_CHOICE=5 EOF - # UKI and EFI fallback are EFI only - if [[ -z $EFI ]]; then - sudo sed -i '/^ENABLE_UKI=/d; /^ENABLE_LIMINE_FALLBACK=/d' /etc/default/limine - fi + # UKI and EFI fallback are EFI only + if [[ -z $EFI ]]; then + sudo sed -i '/^ENABLE_UKI=/d; /^ENABLE_LIMINE_FALLBACK=/d' /etc/default/limine + fi - # We overwrite the whole thing knowing the limine-update will add the entries for us - sudo tee /boot/limine.conf </dev/null + # We overwrite the whole thing knowing the limine-update will add the entries for us + sudo tee /boot/limine.conf </dev/null ### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md #timeout: 3 default_entry: 2 @@ -80,62 +84,115 @@ term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5 term_foreground: c0caf5 term_foreground_bright: c0caf5 term_background_bright: 24283b - + EOF - sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook - # Match Snapper configs if not installing from the ISO - 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 - - if ! sudo snapper list-configs 2>/dev/null | grep -q "home"; then - sudo snapper -c home create-config /home - fi - fi - - # Tweak default Snapper configs - sudo sed -i 's/^TIMELINE_CREATE="yes"/TIMELINE_CREATE="no"/' /etc/snapper/configs/{root,home} - sudo sed -i 's/^NUMBER_LIMIT="50"/NUMBER_LIMIT="5"/' /etc/snapper/configs/{root,home} - sudo sed -i 's/^NUMBER_LIMIT_IMPORTANT="10"/NUMBER_LIMIT_IMPORTANT="5"/' /etc/snapper/configs/{root,home} - - chrootable_systemctl_enable limine-snapper-sync.service + # Match Snapper configs if not installing from the ISO + 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 - # Add UKI entry to UEFI machines to skip bootloader showing on normal boot - if [[ -n $EFI ]] && efibootmgr &>/dev/null && ! efibootmgr | grep -q Omarchy && - ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends" && - ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then - sudo efibootmgr --create \ - --disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \ - --part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \ - --label "Omarchy" \ - --loader "\\EFI\\Linux\\$(cat /etc/machine-id)_linux.efi" + if ! sudo snapper list-configs 2>/dev/null | grep -q "home"; then + sudo snapper -c home create-config /home fi + fi + + # Tweak default Snapper configs + sudo sed -i 's/^TIMELINE_CREATE="yes"/TIMELINE_CREATE="no"/' /etc/snapper/configs/{root,home} + sudo sed -i 's/^NUMBER_LIMIT="50"/NUMBER_LIMIT="5"/' /etc/snapper/configs/{root,home} + sudo sed -i 's/^NUMBER_LIMIT_IMPORTANT="10"/NUMBER_LIMIT_IMPORTANT="5"/' /etc/snapper/configs/{root,home} + + chrootable_systemctl_enable limine-snapper-sync.service + + 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" + + sudo limine-update + + if [[ -n $EFI ]] && efibootmgr &>/dev/null; then + # Remove the archinstall-created Limine entry + while IFS= read -r bootnum; do + sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1 + done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/') + fi + + if [[ -n $EFI ]] && efibootmgr &>/dev/null && + ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends" && + ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then + + uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) + + if [[ -n "$uki_file" ]]; then + sudo efibootmgr --create \ + --disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \ + --part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \ + --label "Omarchy" \ + --loader "\\EFI\\Linux\\$uki_file" + fi + fi } -# Verification function omarchy_verify() { - # Only verify if limine is installed - if command -v limine &>/dev/null; then - # Check limine configuration files - [[ -f /etc/mkinitcpio.conf.d/omarchy_hooks.conf ]] || add_error "Omarchy mkinitcpio hooks config missing" - [[ -f /etc/default/limine ]] || add_error "Limine default config missing" - [[ -f /boot/limine.conf ]] || add_error "Limine boot config missing" + should_run || return 2 - # Check if limine packages are installed - pacman -Q limine-snapper-sync &>/dev/null || add_error "limine-snapper-sync not installed" - pacman -Q limine-mkinitcpio-hook &>/dev/null || add_error "limine-mkinitcpio-hook not installed" + [[ -f /etc/mkinitcpio.conf.d/omarchy_hooks.conf ]] || add_error "Omarchy mkinitcpio hooks config missing" + [[ -f /etc/default/limine ]] || add_error "Limine default config missing" + [[ -f /boot/limine.conf ]] || add_error "Limine boot config missing" - # Check snapper configs if not in chroot - if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then - sudo snapper list-configs 2>/dev/null | grep -q "root" || add_error "Snapper root config not created" - sudo snapper list-configs 2>/dev/null | grep -q "home" || add_error "Snapper home config not created" - fi + pacman -Q limine-snapper-sync &>/dev/null || add_error "limine-snapper-sync not installed" + pacman -Q limine-mkinitcpio-hook &>/dev/null || add_error "limine-mkinitcpio-hook not installed" - # Check if service is enabled - systemctl is-enabled limine-snapper-sync.service &>/dev/null || add_error "limine-snapper-sync service not enabled" + if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then + sudo snapper list-configs 2>/dev/null | grep -q "root" || add_error "Snapper root config not created" + sudo snapper list-configs 2>/dev/null | grep -q "home" || add_error "Snapper home config not created" + fi + + systemctl is-enabled limine-snapper-sync.service &>/dev/null || add_error "limine-snapper-sync service not enabled" + + if [[ -f /boot/limine.conf ]]; then + grep -q "^/+Omarchy" /boot/limine.conf || add_error "Omarchy boot entry not found in limine.conf" + + awk ' + /^\/\+Omarchy/ { in_omarchy=1 } + in_omarchy && /^[[:space:]]+kernel_cmdline:/ { found=1 } + in_omarchy && /^\/[^\/+]/ { in_omarchy=0 } + END { if (!found) exit 1 } + ' /boot/limine.conf || add_error "Omarchy boot entry missing kernel_cmdline" + fi + + if command -v efibootmgr &>/dev/null && sudo efibootmgr &>/dev/null; then + local omarchy_count=$(sudo efibootmgr | grep -c "^Boot[0-9]*\* Omarchy") + if [[ $omarchy_count -eq 0 ]]; then + add_error "No Omarchy EFI boot entry found" + elif [[ $omarchy_count -gt 1 ]]; then + add_warning "Multiple Omarchy EFI boot entries found ($omarchy_count)" fi + + local limine_count=$(sudo efibootmgr | grep -c "^Boot[0-9]*\* Limine") + if [[ $limine_count -eq 0 ]]; then + add_warning "No Limine EFI boot entry found" + elif [[ $limine_count -gt 1 ]]; then + add_warning "Multiple Limine EFI boot entries found ($limine_count)" + fi + + local boot_current=$(sudo efibootmgr | grep "^BootCurrent:" | awk '{print $2}') + if [[ -n "$boot_current" ]]; then + if ! sudo efibootmgr | grep "^Boot${boot_current}\* Omarchy" &>/dev/null; then + local current_boot=$(sudo efibootmgr | grep "^Boot${boot_current}\*" | sed 's/^Boot[0-9]*\* //' | cut -d' ' -f1) + add_warning "BootCurrent is not Omarchy (currently: $current_boot)" + fi + fi + fi } diff --git a/install/login/plymouth.sh b/install/login/plymouth.sh index fad64fe2..77bd68e7 100644 --- a/install/login/plymouth.sh +++ b/install/login/plymouth.sh @@ -1,4 +1,13 @@ -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 omarchy -fi +OMARCHY_DESCRIPTION="Plymouth Boot Splash Theme" + +omarchy_install() { + 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 omarchy + fi +} + +omarchy_verify() { + [[ "$(plymouth-set-default-theme)" == "omarchy" ]] || add_error "Plymouth theme not set to omarchy" + [[ -d /usr/share/plymouth/themes/omarchy ]] || add_error "Omarchy Plymouth theme not installed" +} diff --git a/install/login/sddm.sh b/install/login/sddm.sh index 2fc19dae..ab66e66c 100644 --- a/install/login/sddm.sh +++ b/install/login/sddm.sh @@ -1,7 +1,10 @@ -sudo mkdir -p /etc/sddm.conf.d +OMARCHY_DESCRIPTION="SDDM Display Manager Configuration" -if [ ! -f /etc/sddm.conf.d/autologin.conf ]; then - cat </dev/null || add_error "SDDM service not enabled" +} diff --git a/install/packaging/base.sh b/install/packaging/base.sh index 1158b9b5..4e477189 100644 --- a/install/packaging/base.sh +++ b/install/packaging/base.sh @@ -1,18 +1,27 @@ -#!/bin/bash +OMARCHY_DESCRIPTION="Base Packages" -# Installation function omarchy_install() { - # Install all base packages - mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$') - sudo pacman -S --noconfirm --needed "${packages[@]}" + # Install all base packages + mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$') + sudo pacman -S --noconfirm --needed "${packages[@]}" } -# Verification function omarchy_verify() { - # Check if package list exists - [[ -f "$OMARCHY_INSTALL/omarchy-base.packages" ]] || add_error "Base packages list missing" + [[ -f "$OMARCHY_INSTALL/omarchy-base.packages" ]] || add_error "Base packages list missing" - # Check if some key base packages are installed - command -v bash >/dev/null 2>&1 || add_error "Bash not installed" - command -v sudo >/dev/null 2>&1 || add_error "Sudo not installed" -} \ No newline at end of file + # Check if all base packages are installed + if [[ -f "$OMARCHY_INSTALL/omarchy-base.packages" ]]; then + mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$') + + local missing_packages=() + for package in "${packages[@]}"; do + if ! pacman -Q "$package" &>/dev/null; then + missing_packages+=("$package") + fi + done + + if [[ ${#missing_packages[@]} -gt 0 ]]; then + add_error "Missing base packages: ${missing_packages[*]}" + fi + fi +} diff --git a/install/packaging/fonts.sh b/install/packaging/fonts.sh index 3671d127..1c81581c 100644 --- a/install/packaging/fonts.sh +++ b/install/packaging/fonts.sh @@ -1,18 +1,13 @@ -#!/bin/bash +OMARCHY_DESCRIPTION="Omarchy Font" -# Installation function omarchy_install() { - # Omarchy logo in a font for Waybar use - mkdir -p ~/.local/share/fonts - cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/ - fc-cache + # Omarchy logo in a font for Waybar use + mkdir -p ~/.local/share/fonts + cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/ + fc-cache } -# Verification function omarchy_verify() { - # Check if fonts directory exists - [[ -d ~/.local/share/fonts ]] || add_error "Fonts directory missing" - - # Check if Omarchy font is installed - [[ -f ~/.local/share/fonts/omarchy.ttf ]] || add_error "Omarchy font missing" -} \ No newline at end of file + [[ -d ~/.local/share/fonts ]] || add_error "Fonts directory missing" + [[ -f ~/.local/share/fonts/omarchy.ttf ]] || add_error "Omarchy font missing" +} diff --git a/install/packaging/icons.sh b/install/packaging/icons.sh index 64f8ecfc..071122f0 100644 --- a/install/packaging/icons.sh +++ b/install/packaging/icons.sh @@ -1,6 +1,5 @@ -#!/bin/bash +OMARCHY_DESCRIPTION="Icons" -# Installation function omarchy_install() { # Copy all bundled icons to the applications/icons directory ICON_DIR="$HOME/.local/share/applications/icons" @@ -8,12 +7,9 @@ omarchy_install() { cp ~/.local/share/omarchy/applications/icons/*.png "$ICON_DIR/" } -# Verification function omarchy_verify() { - # Check if icons directory exists [[ -d "$HOME/.local/share/applications/icons" ]] || add_error "Icons directory missing" - # Check if any icons were copied local icon_count=$(find "$HOME/.local/share/applications/icons" -name "*.png" 2>/dev/null | wc -l) [[ $icon_count -gt 0 ]] || add_error "No icons found in icons directory" -} \ No newline at end of file +} diff --git a/install/packaging/lazyvim.sh b/install/packaging/lazyvim.sh index 575bf9a2..2663d917 100644 --- a/install/packaging/lazyvim.sh +++ b/install/packaging/lazyvim.sh @@ -1,14 +1,11 @@ -#!/bin/bash +OMARCHY_DESCRIPTION="LazyVim" -# Installation function omarchy_install() { - if [[ ! -d "$HOME/.config/nvim" ]]; then - omarchy-lazyvim-setup - fi + if [[ ! -d "$HOME/.config/nvim" ]]; then + omarchy-lazyvim-setup + fi } -# Verification function omarchy_verify() { - # Check if neovim config exists - [[ -d "$HOME/.config/nvim" ]] || add_error "Neovim config directory missing" -} \ No newline at end of file + [[ -d "$HOME/.config/nvim" ]] || add_error "Neovim config directory missing" +} diff --git a/install/packaging/tuis.sh b/install/packaging/tuis.sh index 4fa86441..e4a58a87 100644 --- a/install/packaging/tuis.sh +++ b/install/packaging/tuis.sh @@ -1,16 +1,13 @@ -#!/bin/bash +OMARCHY_DESCRIPTION="TUIs" -# Installation function omarchy_install() { - ICON_DIR="$HOME/.local/share/applications/icons" + ICON_DIR="$HOME/.local/share/applications/icons" - 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" + 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" } -# Verification function omarchy_verify() { - # Check if TUI desktop files were created - [[ -f "$HOME/.local/share/applications/Disk Usage.desktop" ]] || add_error "Disk Usage TUI not installed" - [[ -f "$HOME/.local/share/applications/Docker.desktop" ]] || add_error "Docker TUI not installed" -} \ No newline at end of file + [[ -f "$HOME/.local/share/applications/Disk Usage.desktop" ]] || add_error "Disk Usage TUI not installed" + [[ -f "$HOME/.local/share/applications/Docker.desktop" ]] || add_error "Docker TUI not installed" +} diff --git a/install/packaging/webapps.sh b/install/packaging/webapps.sh index 722d6b92..c97b1aed 100644 --- a/install/packaging/webapps.sh +++ b/install/packaging/webapps.sh @@ -1,26 +1,34 @@ -#!/bin/bash +OMARCHY_DESCRIPTION="Webapps" -# Installation function omarchy_install() { - omarchy-webapp-install "HEY" https://app.hey.com HEY.png - omarchy-webapp-install "Basecamp" https://launchpad.37signals.com Basecamp.png - omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ WhatsApp.png - omarchy-webapp-install "Google Photos" https://photos.google.com/ "Google Photos.png" - omarchy-webapp-install "Google Contacts" https://contacts.google.com/ "Google Contacts.png" - omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations "Google Messages.png" - omarchy-webapp-install "ChatGPT" https://chatgpt.com/ ChatGPT.png - omarchy-webapp-install "YouTube" https://youtube.com/ YouTube.png - omarchy-webapp-install "GitHub" https://github.com/ GitHub.png - omarchy-webapp-install "X" https://x.com/ X.png - omarchy-webapp-install "Figma" https://figma.com/ Figma.png - omarchy-webapp-install "Discord" https://discord.com/channels/@me Discord.png - omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home Zoom.png "omarchy-webapp-handler-zoom %u" "x-scheme-handler/zoommtg;x-scheme-handler/zoomus" + omarchy-webapp-install "HEY" https://app.hey.com HEY.png + omarchy-webapp-install "Basecamp" https://launchpad.37signals.com Basecamp.png + omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ WhatsApp.png + omarchy-webapp-install "Google Photos" https://photos.google.com/ "Google Photos.png" + omarchy-webapp-install "Google Contacts" https://contacts.google.com/ "Google Contacts.png" + omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations "Google Messages.png" + omarchy-webapp-install "ChatGPT" https://chatgpt.com/ ChatGPT.png + omarchy-webapp-install "YouTube" https://youtube.com/ YouTube.png + omarchy-webapp-install "GitHub" https://github.com/ GitHub.png + omarchy-webapp-install "X" https://x.com/ X.png + omarchy-webapp-install "Figma" https://figma.com/ Figma.png + omarchy-webapp-install "Discord" https://discord.com/channels/@me Discord.png + omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home Zoom.png "omarchy-webapp-handler-zoom %u" "x-scheme-handler/zoommtg;x-scheme-handler/zoomus" } -# Verification function omarchy_verify() { - # Check if some key webapp desktop files were created - [[ -f "$HOME/.local/share/applications/HEY.desktop" ]] || add_error "HEY webapp not installed" - [[ -f "$HOME/.local/share/applications/WhatsApp.desktop" ]] || add_error "WhatsApp webapp not installed" - [[ -f "$HOME/.local/share/applications/ChatGPT.desktop" ]] || add_error "ChatGPT webapp not installed" -} \ No newline at end of file + # Check all webapps - use warnings since these are optional + [[ -f "$HOME/.local/share/applications/HEY.desktop" ]] || add_warning "HEY webapp not installed" + [[ -f "$HOME/.local/share/applications/Basecamp.desktop" ]] || add_warning "Basecamp webapp not installed" + [[ -f "$HOME/.local/share/applications/WhatsApp.desktop" ]] || add_warning "WhatsApp webapp not installed" + [[ -f "$HOME/.local/share/applications/Google Photos.desktop" ]] || add_warning "Google Photos webapp not installed" + [[ -f "$HOME/.local/share/applications/Google Contacts.desktop" ]] || add_warning "Google Contacts webapp not installed" + [[ -f "$HOME/.local/share/applications/Google Messages.desktop" ]] || add_warning "Google Messages webapp not installed" + [[ -f "$HOME/.local/share/applications/ChatGPT.desktop" ]] || add_warning "ChatGPT webapp not installed" + [[ -f "$HOME/.local/share/applications/YouTube.desktop" ]] || add_warning "YouTube webapp not installed" + [[ -f "$HOME/.local/share/applications/GitHub.desktop" ]] || add_warning "GitHub webapp not installed" + [[ -f "$HOME/.local/share/applications/X.desktop" ]] || add_warning "X webapp not installed" + [[ -f "$HOME/.local/share/applications/Figma.desktop" ]] || add_warning "Figma webapp not installed" + [[ -f "$HOME/.local/share/applications/Discord.desktop" ]] || add_warning "Discord webapp not installed" + [[ -f "$HOME/.local/share/applications/Zoom.desktop" ]] || add_warning "Zoom webapp not installed" +}