Codex AI and Hyprland: Complex Yet Useful Customization
Le brief IA que les pros lisent chaque soir
Les 7 actus IA du jour, décryptées en 5 min. Gratuit.
Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.
Choisis ton rythme
Gratuit · Pas de spam · Désabonnement en 1 clic
Hyprland is recognized as an exceptional Linux window manager, but its configuration can be daunting for inexperienced users. I set out to ask Codex, an artificial intelligence, to help me write a .conf configuration file for Hyprland. Here’s how that experience unfolded.
Key Points
- The configuration of Hyprland is complex and can be intimidating.
- I wanted to test the AI's ability to generate a .conf file.
- This experience revealed important lessons.
This year, my interest in tiling window managers has grown, and Hyprland has become my favorite. These managers are not meant for beginners, as they rely on numerous and complex keyboard shortcuts to memorize. Additionally, their configuration often requires modifications in text files, which is the case for Hyprland.
The configuration file for Hyprland is located at ~/.config/hypr/hyprland.conf. For those unfamiliar with this type of configuration, it can seem intimidating. It is crucial to fully understand what you are getting into before modifying this file for the first time.
The Experience with Codex
I had already spent time customizing hyprland.conf files (a process known as "ricing"), but I decided to conduct an experiment to see if an AI could create a hyprland.conf file based on my instructions. I chose to use a CachyOS installation, selecting the Hyprland and KDE Plasma desktops for reasons that will become clear later. Once CachyOS was installed, I began the process by testing three AI tools: Aria from Opera, Ollama, and Codex.
Among these tools, only Codex was able to produce a usable configuration. Here’s how it went.
The Request
To customize my desktop, I formulated the following request:
- Create a hyprland.conf configuration file for Hyprland version 0.55.2 using Waybar with a glass theme with rounded corners, a purple and pink color palette, and the following shortcuts: Super+t to open the terminal, Super+b to open the web browser, and the default shortcuts to move and focus windows.
After submitting this request, each AI service informed me that some configuration options would be placeholders requiring customization. After several attempts, Codex finally generated a .conf file that I shared on my GitHub repository. I had doubts about its functionality, but I added the generated content and reloaded the window manager with the command:
hyprctl reload
As I expected, numerous errors appeared. Some errors were visible even before copying the output into the .conf file, but I wanted to see what would happen.
Issues Encountered
Here are the issues I identified right from the start:
- No default terminal was set.
- The border_radius option is no longer functional in version 0.55.2.
- In the rounding = 12px option, the px needed to be removed to avoid an error.
- Windowrule did not work.
I also had to install the following for the system to function properly:
- kitty (terminal application)
- Waybar
- rofi
Without these installations, Hyprland would not be fully operational. After resolving these issues, I was surprised to find that the .conf file worked. Although the desktop was not particularly elegant or in line with the color scheme I had requested, it provided a foundation on which I could work for further adjustments.
Why Did I Install KDE Plasma?
At the beginning of this experience, I had only installed Hyprland on CachyOS. After adding the content to the configuration file, I found myself with a practically unusable desktop. The main reason was the absence of kitty, Waybar, and Rofi.
I then reinstalled CachyOS, this time including KDE Plasma. With KDE Plasma, I had a fallback environment in case of issues. I just needed to restart CachyOS, log into KDE Plasma, and fix the errors.
Once all the problems in the .conf file generated by Codex were resolved, Hyprland functioned as expected. Of course, there were still many adjustments to be made to achieve the desired appearance.
A Lesson Learned
I expected this experience to end this way, reinforcing my opinion that AI can be flawed but offers a useful starting point. Even after specifying to Codex the version of Hyprland being used, some outdated options were included.
For those considering switching to Linux, I recommend not starting with Hyprland. Instead, opt for KDE Plasma, Cinnamon, or GNOME. For those who want to try Hyprland or another tiling window manager configured by text file, consider AI as a tool to understand how configuration files work, but be prepared to correct its errors to create your own files.
AI can be a good starting point, but it is essential to correct its mistakes to move forward.
Brief IA — L'actualité IA en français
L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.