Introduction
I’m writing this blog because I find myself nuking my OS often and it’s tedious having to do the same steps over and over again. It’s much easier having a reference. I possibly see myself turning this into an interactive script at some point, but that will just add a lot of overhead that I’m not willing to deal with now.
Prerequisites
For this guide, I assume that you’ve already installed a fresh copy of cachyos or any arch-based distro. To install cachyos, follow its official guide from the cachyos wiki.
I chose to try out sway as my desktop environment. For beginners, I recommend choosing KDE Plasma due to it’s friendly nature.
Update the system
Before performing any installs, it’s imperative to upgrade your system beforehand.
| |
Install essential packages
| |
Installing Package Managers and Runtimes
Node.js
For Node, I recommend using fast node manager
(fnm), which is much better than nvm:
| |
Follow the official guide in case of errors: download node js.
Bun
| |
Deno
| |
UV
| |
Mise
| |
Install Ruby and Rails Using Mise
| |
Optional Packages
| |
If you install yazi from above, it’s useful to have these as well:
| |
If you plan to use zoxide afterwards, run:
| |
where <shell> can be: bash, elvish, fish, nushell, posix, powershell, tcsh,
xonsh, zsh.
Sway specific installs
Recommended packages defined in the arch wiki to use with sway:
| |
AUR packages:
| |
Setting up git and github cli
Configuring git credentials
Configuring git credentials:
| |
Configuring SSH and GPG keys
To set up SSH key, follow this guide from GitHub. To set up GPG Key, follow this guide from GitHub.
Setting up GitHub CLI
GitHub CLI should be installed from the above section Install essential packages. What remains is to authorize GitHub CLI by running:
| |
Follow the prompts and you should be good to go.
Setting up a Bluetooth Manager
You should already have bluez and bluez-utils, if you don’t install them
using pacman:
| |
I chose blueman as my bluetooth manager. Feel free to choose from the list of bluetooth managers.
| |
Installing Multimedia Applications
As a prerequisite, you should have ffmpeg. This package should already be
installed, especially if you installed the essential
packages.
Another useful package to have is yt-dlp which allows you to download videos
from a lot of applications:
| |
Video Player
I chose to use mpv because it’s extremely lightweight, has native wayland
support, keyboard driven, supports all practical video/audio formats, and has
minimal dependencies.
To install it, run:
| |
Image Viewer
I chose to use imv for pretty much the same reasons as I considered when
choosing my video player
| |
Configuring Volume and Brightness window
I’m using swayos. Get it with pacman:
| |
Configuring PWA Support
I use firefox which isn’t automatically supported on linux. I use an extension
for this: Progressive Web Apps for
Firefox
| |
Installing a PDF Viewer
Sioyek is my PDF Reader of choice. Although the compilation process sucks, I still end up using it. Install it from AUR using:
| |
It’s also available as an appimage, use the command below if you like that variant:
| |
If you don’t like sioyek, you can use zathura which is also a fantastic
alternative. It’s conveniently available through the official arch package
manager. Get it as follows:
| |
Installing Emacs
Since I’m using sway, emacs-wayland is much better than emacs.
| |
To allow native clipboard support for Emacs, you need to install
wl-clipboard.You should already have this but just in case:
| |
Emacs also requires symbola font and Symbols Nerd Font Mono, which you can
get from AUR:
| |
Afterwards, we want to enable the emacs daemon by running:
| |
Then edit the emacs desktop entry to launch emacsclient instead of emacs. Since
it’s not recommended to edit desktop entries in /usr/share/applications/
directly, we override it by copying it into our local home folder. Run:
| |
Change the line Exec=emacs %F to Exec=emacs -c -a 'emacs' %F
Set up doom emacs
Setting up doom emacs is easy once you’ve installed emacs. Run:
| |
Then add doom to your $PATH. For fish, run:
| |
(optional) Installing Doom Emacs-related Tools
All the packages below help doom emacs run better. They are specific to my
configurations since I have enabled support for multiple languages in init.el.
Run doom sync or doom doctor to actually know what you need.
| |
| |
Setting up PostgreSQL
Start by installing postgresql as well as postgresql-libs. Installing
postgresql also installs postgresql-libs as a dependency:
| |
Afterwards, you should initialize the cluster:
| |
Then you should enable postgresql to autostart on boot using systemctl:
| |
You can absolutely stop here but I personally like to create a passwordless superuser with the same username as my hostname. This helps me to work faster with Ruby on Rails. Follow the steps below if that what you want:
| |
I also like to create a default database that matches my username:
| |
Configuring keyd
I often like to map Capslock to be esc when pressed and Ctrl when held.
For that, we’ll use keyd, which you should have if you installed optional
dependencies: Optional Packages. Although it’s installed,
you still need to enable it so that it auto starts on every restart:
| |
You configure keyd as follows:
| |
Then paste this:
| |
Afterwards, reload and enable the keyd service:
| |
You have to reload
keydevery time you change yourkeydconfigurations.
Installing flatpak
| |
After install finishes, restart your system.
Setting Up Bottles
Bottles allows you to run windows application natively on Linux. Install it with:
| |
Install Flatseal
Flatseal is a GUI application that allows you to manage flatpak permissions. Since flatpaks run in isolated environments, you need to give them permissions to do things, like access a folder that’s outside it’s sandboxed environment, or restrict internet access.
Install it by running:
| |
Installing ProtonPlus
ProtonPlus is a utility application that helps to install, update, remove and organize windows compatibility tools. I use it with bottles to manage runners.
| |
Setting up dotfiles
If you already have your dotfiles in git or any other version control system, now is a good time to import them.
Ensure that you have already installed all the tools you need beforehand.
I often have dotfiles for multiple tools backed up in git. Here are my dotfiles
Setting up default applications
If the desktop environment you’re using has a GUI for doing this, you can skip
this step.
In sway, there is no way to set default applications graphically. Instead you
can to use xdg-settings to set default applications.
The general process of setting up default applications in Linux follows the same steps:
- Find the property you want to change, you can run
xdg-settings --listor visit MIME apps spec - Use
xdg-settings set <property> <application>.desktopto set the default<application>for performing a specific action defined by<property>. For examplexdg-settings set default-web-browser firefox.desktopto set the default web browser to firefox. - Optionally associate all relevant MIME types to be opened by the application
using
xdg-mime.
Utility Script
.desktop entries often have a MIMEType section that defines all acceptable
MIME types. You can iterate the list and map each of those MIMETypes to be
opened using that specific application using xdg-mime. This is what I use in
some sections where MIMETypes are too many like in setting mpv as the default
video player.
To automate this, use this bash script:
| |
Setting Firefox as the Default Browser
Caution: Don’t use the utility script provided above to set the default browser because it will make firefox the default application for things like pdf, audio, etc, unless that’s what you intend to do.
To get the current default browser, you can run:
| |
First of all, find the desktop entry for the browser you want to use, for
example /usr/share/applications/firefox.desktop:
| |
Then set it as your default browser using xdg-settings:
| |
Additionally, you can can explicitly bind http and https schemes using
xdg-mime:
| |
As a bonus you can install
speech-dispatcherfor speech synthesis, which prevents error messages such as:“You can’t use speech synthesis because the Speech Dispatcher library is missing.”on some pages like Discord.
Setting Sioyek as the Default PDF Viewer
Setting a default PDF viewer follows the same process as above:
| |
You can also use the utility script if you want to have extensive coverage.
Setting imv as the Default Image Viewer
We installed imv for image viewing in the section above. To
set it as the default image viewer, we need to map all relevant MIME types to be
opened with imv. We can do that manually, but a better way is to infer them
from the .desktop entries which often offers an exhastive list of supported
MIME types.
To do that, use the script provided in the utility script section to automate this.
| |
Setting mpv as the default Video Player
We use the same script we used to set imv as the default image viewer:
| |
Configure Dark Theme
First of all install gnome-themes-extra and papirus-icon-theme as defined
in Sway specific installs above. If you’ve not
installed them, run:
| |
Configure GTK 3
| |
Edit it as follows (demonstration):
| |
Configure GTK 4
Use the dark color scheme for GTK 4:
| |
(Optional) Set up Nordic Theme
First of all, clone the Nordic Theme from GitHub.
| |
Then run:
| |
Install Applications
Proton VPN
We have two options, either a CLI or a GTK GUI application:
| |
(optional) Extras
Bruno Bin
| |
Luciole File Manager
| |
Troubleshooting
Limine bootloader shows garbled up text
Edit limine.conf located at /boot/limine.conf. Add this line at the top:
| |
Where <width>x<height> refers to the resolution of your display. For example:
| |
Setting up KDE Connect
If after installation KDE connect doesn’t pick up other devices within your local network, and vice versa, you need to configure accept traffic from kde connect specific ports. Read more about it in the KDE UserBase Wiki.
| |
For the above command to work, you need to find the actual IP address subnet information of your network. Run
ip --brief addressto find out the local IP address. Mine was192.168.100.x.
Last Updated: December 2, 2026
