Skip to main content

Overview

The install.sh script is a dependency installer specifically designed for Config-Sway on Arch Linux systems using pacman. It installs all required packages for the Sway window manager environment and then automatically runs the update.sh script to apply the configuration files.
This script is designed for Arch Linux and uses pacman as the package manager. It will skip package installation on other distributions.

Location

Located in the root directory of the Config-Sway repository.

Usage

The script requires no arguments or options. It will:
  1. Check if pacman is available
  2. Install required packages using sudo pacman -S --needed
  3. Automatically execute update.sh to apply dotfiles

What It Does

Step-by-Step Execution

  1. Repository Detection
    • Determines the repository directory using BASH_SOURCE
    • Sets REPO_DIR for locating other scripts
  2. Package Installation
    • Checks if pacman is available
    • Verifies sudo access
    • Installs all packages from the predefined list using --needed flag (skips already installed packages)
  3. Automatic Configuration
    • Locates and executes update.sh to apply dotfiles
    • Handles both executable and non-executable update.sh files

Installed Packages

The script installs the following package categories:

Window Manager & Environment

package
Tiling Wayland compositor
package
Wallpaper utility for Wayland
package
Highly customizable status bar
package
Notification daemon for Wayland
package
GPU-accelerated terminal emulator
package
Application launcher and window switcher
package
Screenshot tool
package
Network management GUI

Wayland Portals & Capture

package
Desktop integration framework
package
Wayland portal backend
package
GTK portal implementation
package
Screenshot utility for Wayland

Synchronization

package
File synchronization tool (required by update.sh)

System Utilities

package
Brightness control utility
package
Media player controller
package
Bluetooth manager
package
Screen locker for Wayland

Terminal & User Experience

package
Console file manager
package
Modern ls replacement
package
Cat clone with syntax highlighting
package
System information tool

Audio & Notifications

package
Music Player Daemon client
package
ALSA utilities
package
Desktop notification library

Error Handling

No sudo Available

If sudo is not installed, the script will display a warning and skip package installation:

sudo Requires Password

If sudo requires password authentication that cannot be satisfied non-interactively:

Non-Arch Systems

If pacman is not available (non-Arch systems):

Exit Codes

The script uses set -euo pipefail for strict error handling:
  • 0: Success (all packages installed and update.sh executed)
  • Non-zero: Error during package installation or update.sh execution

Examples

Standard Installation

Output:

Manual Package Installation

If you need to install packages manually:
  • update.sh - Synchronizes configuration files (automatically called by install.sh)

Notes

  • The --needed flag ensures pacman only installs packages that are not already present
  • The script automatically detects its own location, so it can be run from any directory
  • After package installation, update.sh is automatically executed to complete the setup
  • Script uses strict error handling (set -euo pipefail) to catch issues early

Source Code

View the full source: install.sh (62 lines) Author: Fravelz