Logo

dev-resources.site

for different kinds of informations.

πŸš€ Mastering Rofi in i3: A Cool & Fun Guide

Published at
12/27/2024
Categories
Author
Ayedoun ChΓ’-Fine ADEBI
Categories
1 categories in total
open
πŸš€ Mastering Rofi in i3: A Cool & Fun Guide

So, you've installed Rofi, jazzed it up with some sweet themes from adi1090x, and now you're ready to turn it into a powerful, futuristic multitool. Let’s dive into customizing your workflow with Rofi!

1️⃣ Install & Configure Rofi

  1. Clone the repository for amazing pre-made themes:
   git clone https://github.com/adi1090x/rofi.git ~/rofi-themes
  1. Navigate to the cloned directory:
   cd ~/rofi-themes
  1. Run the setup script to install the themes:
   ./setup.sh
  1. Choose your desired theme style during setup (light, dark, or custom). Themes are installed in ~/.config/rofi.

2️⃣ Make Rofi Pop with i3 Keybindings

Add the following to your i3 configuration file (~/.config/i3/config):

πŸ”Ή Launch Rofi in "drun" mode (app launcher):

bindsym $mod+d exec --no-startup-id rofi -show drun -theme ~/.config/rofi/config.rasi

πŸ”Ή Switch to "run" mode (execute commands):

bindsym $mod+r exec --no-startup-id rofi -show run -theme ~/.config/rofi/config.rasi

πŸ”Ή Switch to "window" mode (manage windows):

bindsym $mod+w exec --no-startup-id rofi -show window -theme ~/.config/rofi/config.rasi

πŸ”Ή Enable "file browser" mode (navigate files):

To browse files, ensure Rofi Scripts are installed from the adi1090x repo:

bindsym $mod+f exec --no-startup-id rofi -modi filebrowser -show filebrowser -theme ~/.config/rofi/config.rasi

Reload i3 ($mod+Shift+R) to apply these bindings.

3️⃣ Tips & Tricks for Using Rofi

πŸ’‘ Switch Between Modes Dynamically

  • While in any mode (e.g., drun), type Ctrl+Tab to cycle through modes like:
    • drun β†’ App Launcher
    • run β†’ Command Runner
    • window β†’ Window Switcher
    • filebrowser β†’ File Manager

πŸ’‘ Search Smarter in "drun" Mode

  • Search for apps by typing their name (e.g., fir for Firefox).
  • Use arrow keys to navigate and hit Enter to launch.

πŸ’‘ Use "run" Mode Like a Pro

  • Type commands directly:
    • htop β†’ Launch system monitor.
    • shutdown now β†’ Turn off your system.
  • Rofi remembers past commands, making it quicker to access frequent ones.

πŸ’‘ Master the "window" Mode

  • Quickly switch between open windows:
    • Type part of the window name.
    • Example: Type "term" to jump to an open terminal.

πŸ’‘ Browse Files with Rofi (Filebrowser Mode)

  • Launch the file browser mode and navigate files using:
    • Arrow keys β†’ Navigate.
    • Tab β†’ Auto-complete.
    • Enter β†’ Open the file or directory.

4️⃣ Rofi Keyboard Shortcuts

Key Function
Ctrl+Tab Switch between modes (drun, run, etc.)
Enter Select an option
Esc Exit Rofi
Arrow Keys Navigate the menu
Alt+Enter Launch in a terminal (requires setup)

5️⃣ Customize Themes for a Futuristic Look

πŸ”Ή Edit a Theme:

Rofi themes are located in ~/.config/rofi. Open and tweak a theme:

nano ~/.config/rofi/config.rasi

πŸ”Ή Change Colors for Abstract Vibes:

  • Background: Neon with transparency:
  background: rgba(0, 0, 0, 0.8);
  • Highlight Selected Items:
  selected-background: #00FFAB;  /* Neon green */
  selected-foreground: #FFFFFF;

πŸ”Ή Rounded Corners:

  • Add modern rounded corners for a clean UI:
  border-radius: 10px;

6️⃣ Fun Rofi Ideas

  1. Game Launcher:

    • Bind $mod+g to launch Rofi with a custom list of games.
  2. Spotify Control:

  3. SSH Connection Manager:

    • Add a mode to manage SSH connections for servers.
  4. Calculator Mode:

    • Add a script for quick calculations using Rofi.

Now you're all set to make Rofi your supertool in i3! πŸŽ‰ Feel free to experiment and share your favorite Rofi setups!

Featured ones: