top of page
christiandreschler9

Hyprland with Waybar: Installation and Basic Configuration



Hyprland offers a fresh and lightweight Wayland compositor that transforms your Linux desktop experience. With features like dynamic tiling, it’s designed for those who appreciate a customizable environment. This guide will take you through the installation process for Hyprland on various Linux distributions, including Debian, Fedora, OpenSUSE, and Arch Linux. We’ll also cover how to modify the configuration file and utilize Waybar to effectively display your desktop layout.


Installation on Debian-Based Distributions


For users of Debian-based distributions like Ubuntu, installing Hyprland is straightforward. Here’s how to get it set up quickly:


  1. Add the Hyprland PPA:


    First, open a terminal and add the appropriate repository with:

sudo add-apt-repository ppa:hyprland/ppa

Next, update your package list to get the latest repositories:

sudo apt update

  1. Install Hyprland:

Install Hyprland with:

sudo apt install hyprland


  1. Install Additional Dependencies:


    Make sure to also install important tools such as `Waybar`, `swaybg`, and `wayland-utils`:

sudo apt install waybar swaybg wayland-utils

This process will take just a few minutes, allowing you to dive into your new desktop environment.


Installation on Fedora-Based Distributions


If you are using Fedora or similar distributions, follow these steps for installation:


  1. Enable the Necessary Repository:


    Ensure the RPM Fusion repositories are enabled. This is essential for accessing required packages.



  1. Install Hyprland:


    Install Hyprland using DNF:

sudo dnf install hyprland


  1. Install Additional Dependencies:


    Like the Debian-based systems, ensure you have Waybar and other utilities installed:

sudo dnf install waybar swaybg wayland-utils

The installation process on Fedora usually completes within a matter of minutes.



Installation on OpenSUSE


For OpenSUSE users, the steps are similar, but there are some specific details to note:


  1. Repository Setup:


    Users on OpenSUSE Tumbleweed might need to add additional repositories. Check the OpenSUSE Build Service for a Hyprland package that suits your system.



  1. Install Hyprland and Dependencies:


    Run this command to install Hyprland:

sudo zypper install hyprland

Additionally, configure the necessary tools:


sudo zypper install waybar swaybg wayland-utils


Installation on Arch Linux


Arch Linux makes the installation process easy, as hyprland is in the main distribution repository.

Here's how you can install it.


  1. Update Your System:


    Start by ensuring your system is up to date:

sudo pacman -Syu


  1. Install Hyprland:


    Use pacman, the Arch Linux default package manager like so:

sudo pacman -S hyprland

Note:

Hyprland is also available in the AUR with two main versions:

The default hyprland package, and the development package which is named hyprland-git



  1. Install Additional Tools:


    Install Waybar and the utility packages:


sudo pacman -S waybar swaybg wayland-utils


Writing or Modifying the Configuration File


Once you have installed Hyprland, it’s time to tailor it to your preferences. The main configuration file is located at `~/.config/hypr/hyprland.conf`. To modify this file, use a text editor. Here’s a simple way to do it with `nano`:

nano ~/.config/hypr/hyprland.conf

Any text editor of your liking is fine (vim, neovim, xed, gedit, vscode etc...)


Sample Configuration Layout


The very first time you open up hyprland an autogenerated configuration files is placed in

~/.config/hyprland/hyprland.conf

You can modify this file as per your liking.


If the a/m file is not automatically generated, a default configuration file should be found at:

/usr/share/hypr/hyprland.conf

You can copy this file to ~/.config/hyprland/hyprland.conf


Hyprland Configuration


Most of the settings are commented and self-explanatory.

You can find a complete list of the configuration parameters here.

general {
  monitor = eDP-1
  workspace_padding = 15
  workspace_gap = 5
}

window {
   border_color = #ffffff
   focus_color = #ff0000
}

The above example shows two sections.

General and Window.


The General section is where the monitor name, padding width in pixels and workspace gap in pixels are specified.


The Window section is where the normal hex border color of the window border, and the color of the focused window border are specified.


The default hyprland configuration file is much longer than the above, but as you can see, most of the settings are self explanatory.


Using Waybar


Waybar is a helpful status bar that works seamlessly with Hyprland. Here’s how to set it up for an enhanced desktop display:


  1. Configuration Setup:


    Waybar default configuration files can be found at:

/etc/xdg/waybar/config.jsonc 

/etc/xdg/waybar/style.css

You can copy these files to the below folder, so you can edit them as per your liking:

~/.config/waybar/

The config.jsonc is a standard jsonc file.

This file includes all the used waybar modules, layout configuration of

the widget(s), position/size/padding of the bar(s) and of the widget(s), screen placement

and setup etc.


The style.css includes all the styling options for the bar(s), the widget(s)


Both files are easy to edit.

All the available options and modules to be used within waybar can be found here.



  1. Launch Waybar:


    Waybar can be launched simply by the command waybar on the terminal, however the common practice is to run it within the hyprland configuration file, so that each time you run hyprland, waybar runs too.


    Add the following line to ~/.config/hyprland/hyprland.conf

exec-once = waybar

Then, restart hyprland.


Wrapping Up


Now that you have a detailed understanding of how to install Hyprland on various Linux distributions, you're ready to customize your desktop experience.


Setting up Waybar can significantly improve how you navigate your workflow.

Don't hesitate to make adjustments to the configuration files to create an environment that feels just right for you.


As you explore Hyprland's capabilities, you'll find many opportunities for personalization. Enjoy the journey and happy ricing!

5 views0 comments

Recent Posts

See All

Comments


bottom of page