How to Install and Use Rofi on Linux
How to Install and Use Rofi on Linux
Rofi is a powerful and flexible application launcher and window switcher that is highly customizable, making it a popular choice for users looking to enhance their Linux desktop experience. This guide will walk you through the installation process and basic usage of Rofi on various Linux distributions.
Installation
On Ubuntu and Debian
Open the terminal.
Update your package list:
sudo apt update
Install Rofi:
sudo apt install rofi
On Arch Linux
Open the terminal.
Install Rofi using pacman:
sudo pacman -S rofi
On Fedora
Open the terminal.
Install Rofi using dnf:
sudo dnf install rofi
On OpenSUSE
Open the terminal.
Install Rofi using zypper:
sudo zypper install rofi
Basic Usage
Once Rofi is installed, you can start using it immediately. Open your terminal and type:
rofi -show run
This command will launch Rofi in run mode, allowing you to quickly launch applications by typing their names.
Configuring Rofi
Rofi can be customized through a configuration file. By default, Rofi looks for a configuration file in ~/.config/rofi/config.rasi. If it doesn’t exist, you can create it:
Create the configuration directory:
mkdir -p ~/.config/rofi
Create the configuration file:
touch ~/.config/rofi/config.rasi
Open the file with your favorite text editor:
nano ~/.config/rofi/config.rasi
Add basic configuration options, for example:
configuration {
fontsize: 12;
padding: 5;
}
Switching Between Windows
You can also use Rofi as a window switcher. To do this, use the following command:
rofi -show window
This will display a list of open windows, allowing you to switch between them easily.
Custom Keybindings
To make using Rofi even more convenient, you can set custom keybindings. For example, to open Rofi with a keyboard shortcut, you can add the following line to your desktop environment’s keyboard settings:
For example, set Super + D to launch Rofi:
Open your keyboard settings.
Add a new shortcut with the command rofi -show run.
Conclusion
Rofi is an incredibly versatile tool that can significantly improve your productivity on Linux. Whether you’re launching applications, switching between windows, or customizing your workflow, Rofi is a fantastic addition to any desktop environment.
For more advanced usage and customization options, visit the official Rofi GitHub page for documentation and resources.
Happy launching!