DEV Community

Ayedoun Châ-Fine ADEBI
Ayedoun Châ-Fine ADEBI

Posted on

🎨 Customize Void Linux with Polybar, PulseAudio, pavucontrol, nm-applet, NetworkManager, i3, and feh

Turn your Void Linux setup into a personalized masterpiece! In this tutorial, we’ll guide you through installing and configuring essential tools for a polished, productive, and eye-catching system.


🎯 What We’re Setting Up

  1. Polybar: A sleek, customizable status bar.
  2. PulseAudio and pavucontrol: Sound management made simple.
  3. nm-applet and NetworkManager: A graphical tool for network connections.
  4. i3 Window Manager: Lightweight and tiling for power users.
  5. feh: Set and manage your wallpaper effortlessly.

🛠️ Prerequisites

  • A running Void Linux installation.
  • A terminal and root access.

🌟 Step 1: Install Required Packages

Update your package index:

sudo xbps-install -Syu
Enter fullscreen mode Exit fullscreen mode

Install i3

sudo xbps-install -S i3
Enter fullscreen mode Exit fullscreen mode

Install Polybar

sudo xbps-install -S polybar
Enter fullscreen mode Exit fullscreen mode

Install PulseAudio and pavucontrol

sudo xbps-install -S pulseaudio pavucontrol
Enter fullscreen mode Exit fullscreen mode

Install nm-applet and NetworkManager

sudo xbps-install -S network-manager-applet NetworkManager
Enter fullscreen mode Exit fullscreen mode

Install feh

sudo xbps-install -S feh
Enter fullscreen mode Exit fullscreen mode

⚙️ Step 2: Configure NetworkManager

Enable and start NetworkManager:

sudo ln -s /etc/sv/NetworkManager /var/service
Enter fullscreen mode Exit fullscreen mode

Check if it's running:

sudo sv status NetworkManager
Enter fullscreen mode Exit fullscreen mode

🎵 Step 3: Configure PulseAudio and Sound Control

Enable PulseAudio by adding the following to your .xinitrc (if you use startx):

pulseaudio --start &
Enter fullscreen mode Exit fullscreen mode

Launch pavucontrol from your terminal or bind it to a key in your i3 config:

pavucontrol
Enter fullscreen mode Exit fullscreen mode

📐 Step 4: Configure i3

Generate a Default Config

If you haven’t already, generate an i3 config file:

mkdir -p ~/.config/i3
cp /etc/i3/config ~/.config/i3/config
Enter fullscreen mode Exit fullscreen mode

Add Startup Applications

Edit ~/.config/i3/config to autostart your tools:

exec --no-startup-id nm-applet &
exec --no-startup-id pulseaudio --start &
exec --no-startup-id feh --bg-scale ~/Pictures/wallpaper.jpg
exec --no-startup-id ~/.config/polybar/launch.sh
Enter fullscreen mode Exit fullscreen mode

🖼️ Step 5: Set Up feh for Wallpapers

Place your desired wallpaper in ~/Pictures/.

Set it as your background:

feh --bg-scale ~/Pictures/wallpaper.jpg
Enter fullscreen mode Exit fullscreen mode

Make this persistent by adding the command to your i3 config (as shown above).


📊 Step 6: Configure Polybar

Create a Configuration File

Generate the default Polybar config:

mkdir -p ~/.config/polybar
cp /usr/share/doc/polybar/config ~/.config/polybar/config
Enter fullscreen mode Exit fullscreen mode

Launch Polybar

  1. Create a launch script:
   nano ~/.config/polybar/launch.sh
Enter fullscreen mode Exit fullscreen mode

Add:

   #!/bin/bash
   killall -q polybar
   polybar mybar &
Enter fullscreen mode Exit fullscreen mode
  1. Make it executable:
   chmod +x ~/.config/polybar/launch.sh
Enter fullscreen mode Exit fullscreen mode
  1. Run the script:
   ~/.config/polybar/launch.sh
Enter fullscreen mode Exit fullscreen mode

🎨 Step 7: Personalize Polybar

Edit the ~/.config/polybar/config file to customize your bar. For example, add a volume module:

[module/volume]
type = internal/volume
format-volume = " %percentage%%"
format-muted = " Muted"
Enter fullscreen mode Exit fullscreen mode

🚀 Step 8: Test Your Setup

  1. Restart i3 with:
   $mod+Shift+R
Enter fullscreen mode Exit fullscreen mode
  1. Verify:
    • i3 loads with your wallpaper.
    • Polybar displays correctly.
    • nm-applet appears in the tray.
    • pavucontrol manages sound.

🎨 Final Touch: Make It Yours!

  • Experiment with i3 keybindings for productivity.
  • Customize Polybar themes from Polybar Themes GitHub.
  • Add modules for CPU, RAM, weather, or anything you fancy!

Enjoy your fully customized Void Linux environment! 🌌

Top comments (0)