Setting up Sway on Arch Linux with Neovim and using Fastfetch to display system information in the background requires a few steps. Here’s a guide to help you achieve this.
Step 1: Install Required Packages
First, ensure that your system is up to date and install the necessary packages.
Open your terminal and run the following commands:
You can customize your Sway configuration, but here's a basic example:
plaintext
# Set your keyboard layout
input * {
xkb_layout us
}
# Set your wallpaper using Fastfetch, we'll do this via a script instead
exec --no-startup-id feh --bg-scale /path/to/your/wallpaper.jpg
# Start your terminal
exec_always --no-startup-id alacritty
# Specify output settings
output * bg /path/to/your/wallpaper.jpg fill
Step 3: Setting Fastfetch as a Background Image
You need to create a script that generates the image from Fastfetch and sets it as the background:
Create a directory for your scripts:
bash
mkdir -p ~/scripts
Create a script called generate_fastfetch.sh:
bash
nano ~/scripts/generate_fastfetch.sh
Add the following code to the script:
bash
#!/bin/bash
# Generate the Fastfetch image
# Set output image path
OUTPUT_PATH="$HOME/Pictures/fastfetch_background.png"
# Generate the Fastfetch output
fastfetch --output=png --output-size=1920x1080 --bg-color=000000 --text-color=FFFFFF --border-color=FFFFFF > "$OUTPUT_PATH"
# Set the generated image as your background
feh --bg-scale "$OUTPUT_PATH"
Make the script executable:
bash
chmod +x ~/scripts/generate_fastfetch.sh
Step 4: Execute the Script on Startup
Now you need to add this script to your Sway config.