Overview
Theinstall.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.
Location
Usage
- Check if
pacmanis available - Install required packages using
sudo pacman -S --needed - Automatically execute
update.shto apply dotfiles
What It Does
Step-by-Step Execution
-
Repository Detection
- Determines the repository directory using
BASH_SOURCE - Sets
REPO_DIRfor locating other scripts
- Determines the repository directory using
-
Package Installation
- Checks if
pacmanis available - Verifies
sudoaccess - Installs all packages from the predefined list using
--neededflag (skips already installed packages)
- Checks if
-
Automatic Configuration
- Locates and executes
update.shto apply dotfiles - Handles both executable and non-executable
update.shfiles
- Locates and executes
Installed Packages
The script installs the following package categories:Window Manager & Environment
Tiling Wayland compositor
Wallpaper utility for Wayland
Highly customizable status bar
Notification daemon for Wayland
GPU-accelerated terminal emulator
Application launcher and window switcher
Screenshot tool
Network management GUI
Wayland Portals & Capture
Desktop integration framework
Wayland portal backend
GTK portal implementation
Screenshot utility for Wayland
Synchronization
File synchronization tool (required by update.sh)
System Utilities
Brightness control utility
Media player controller
Bluetooth manager
Screen locker for Wayland
Terminal & User Experience
Console file manager
Modern ls replacement
Cat clone with syntax highlighting
System information tool
Audio & Notifications
Music Player Daemon client
ALSA utilities
Desktop notification library
Error Handling
No sudo Available
Ifsudo is not installed, the script will display a warning and skip package installation:
sudo Requires Password
Ifsudo requires password authentication that cannot be satisfied non-interactively:
Non-Arch Systems
Ifpacman is not available (non-Arch systems):
Exit Codes
The script usesset -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
Manual Package Installation
If you need to install packages manually:Related Scripts
update.sh- Synchronizes configuration files (automatically called by install.sh)
Notes
- The
--neededflag 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.shis 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