Using ChatGPT to Optimize my Fedora Workstation

As a Fedora user, I've always wanted to automate the process of setting up my workstation after a fresh install or when switching to a new machine. Thanks to OpenAI's ChatGPT, I've been able to create an efficient script to update my system, install necessary packages, and apply some tweaks for a seamless transition.

In this blog post, I'll be sharing my experience of building the script using ChatGPT's assistance and discussing how the script improves my Fedora workstation setup.

How ChatGPT Helped

The first step in creating the script was to establish a clear plan of what I wanted to achieve. With ChatGPT's assistance, I was able to create a comprehensive list of tasks that the script would need to perform. These tasks included updating the system, installing Zsh and setting it as the default shell, modifying dnf configurations, enabling repositories, and installing additional packages.

After defining the tasks, I sought ChatGPT's expertise in scripting to help me write the actual script. This saved me a lot of time and effort as ChatGPT provided the right syntax and commands to execute the tasks seamlessly.

The Script

The resulting script is an easy-to-use Bash script that performs the following tasks:

  • Updates the system and installs Zsh, setting it as the default shell.
  • Modifies the default response in the terminal to "yes" for dnf commands, allowing for a smoother experience.
  • Sets the maximum parallel downloads for dnf to 6, speeding up package downloads.
  • Installs Gnome Tweaks and enables fractional scaling for both Wayland and X11, enhancing display scaling.
  • Enables RPM Fusion repositories (free and non-free) and the COPR plugin, expanding the range of available packages.
  • Installs Flatpak and adds the Flathub repository, offering access to a wider array of applications.
  • Updates the system again and installs required fonts, improving font rendering and appearance.
  • Creates a new font configuration file with customized settings, further enhancing font rendering.

The full script can be found at the end of this blog post.

Benefits

Using this script, I've been able to automate the process of setting up my Fedora workstation, saving time and ensuring a consistent experience across different machines. Some of the benefits include:

  • Faster updates and installations due to the increase in parallel downloads and the "yes" response by default.
  • Access to a broader range of packages and applications through the enabled repositories and Flatpak.
  • Improved font rendering and appearance, making text more readable and visually appealing.
  • Enhanced display scaling, providing a better experience on high-resolution screens.

Conclusion

Leveraging ChatGPT's knowledge and expertise, I've created a script that streamlines the setup of my Fedora workstation. The process was not only efficient but also educational, as I gained valuable insights into scripting and system optimization.

For those interested in using or modifying the script for their own purposes, it can be found on my github below. Remember that you may need to restart your applications or log out and log back in for the changes to take effect.

https://github.com/strangekai/fedora-improvements

You can also install the script directly from the terminal using the following command:

# Fedora improvements script:
curl -sSL https://raw.githubusercontent.com/strangekai/fedora-improvements/main/install.sh | bash

# Font rendering script:
curl -sSL https://raw.githubusercontent.com/strangekai/fedora-improvements/main/font-rendering.sh | bash

By combining the power of ChatGPT with my own knowledge, I was able to optimize my Fedora experience and save time, allowing me to focus on more important tasks. This collaboration showcases the potential of AI tools like ChatGPT in assisting with everyday tasks and challenges.