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
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
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