Back to blog
Linux Customization

My Arch Linux Hyprland Rice: A Modular Approach

Abdeldjalile Lafkir2024-07-033 min read

My Arch Linux Hyprland Rice

Building the perfect Linux desktop is an endless journey of tweaking and refining. My current setup is built on Arch Linux and Hyprland, a dynamic tiling Wayland compositor that offers beautiful animations and incredible performance.

In this post, I'll walk you through my configuration structure, which prioritizes modularity and clean code.

The Core: Modular Hyprland Configuration

One of the biggest problems with window manager configurations is that they often become one giant, unreadable file. To solve this, I've split my hyprland.conf into logical modules located in the hypr/Settings/ directory.

Instead of a 1000-line file, my main configuration acts as a manager that sources specific settings:

  • monitors.conf: Defines display resolution, positioning, and scaling.
  • programs.conf: Sets default applications (Terminal, Browser, File Manager).
  • startupApps.conf: Handles autostart applications like authentication agents and background daemons.
  • inputs.conf: Keyboard layouts, mouse sensitivity, and touchpad gestures.
  • keybinds.conf: The nervous system of the setup, custom shortcuts for workspace navigation and app launching.

Aesthetics & Window Rules

The visual style is handled separately to keep things organized:

  • decorations.conf: Manages rounding, opacity, drop shadows, and blur settings.
  • animations.conf: Configures the bezier curves and animation speeds that make Hyprland feel so fluid.
  • rules.conf: Defines window rules (like floating windows or workspace assignments) to ensure apps behave exactly how I want them to.

The Toolbelt

A window manager is only as good as the tools running inside it. Here is the software stack that powers my workflow, all configured in my .config folder:

1. Terminal & Shell

I use Kitty as my terminal emulator for its GPU acceleration and rich configuration options. Inside it, I run Fastfetch for system information and Tmux for session management, allowing me to persist workflows across reboots or terminal closures.

2. Application Launcher

Rofi serves as my application launcher. It's configured to match the system theme, providing a seamless interface for opening programs or switching windows.

3. Status Bar

Waybar sits at the top of my screen, providing essential information like workspaces, audio levels (managed via pavucontrol), and system stats. It's styled with CSS to perfectly blend with the Hyprland decorations.

4. File Management

For file navigation, I use Yazi, a blazing-fast terminal file manager written in Rust. It integrates perfectly with my keyboard-centric workflow, eliminating the need for a mouse-heavy GUI file manager.

Custom Scripts & Banners

I've also included several custom scripts to personalize the terminal experience upon login. You'll find scripts like personal-machine-banner.sh and azure-machine-banner.sh in the root of my config. These provide a unique, identified entry point depending on which machine or environment I'm logging into.

Conclusion

This modular approach makes maintaining my system incredibly easy. If I want to change an animation, I know exactly where to look (Settings/animations.conf). If I need to add a startup app, it goes in Settings/startupApps.conf.

You can explore the full source code and copy these configurations for your own setup by visiting my GitHub repository.