Skip to content

Sway Integration

Raffi integrates seamlessly with the Sway window manager, allowing you to launch applications with a simple keybinding.

Add the following configuration to your Sway config file (typically ~/.config/sway/config):

set $menu raffi -p
set $super Mod4
bindsym $super+Space exec $menu | xargs swaymsg exec --
  • raffi -p runs Raffi in print-only mode, which outputs the selected command instead of executing it directly
  • The output is piped to xargs swaymsg exec -- to execute the command via Sway’s IPC interface
  • $super+Space binds the launcher to Super (Windows/Command key) + Space

You can change the keybinding to any combination you prefer:

# Use Super+D instead
bindsym $super+d exec $menu | xargs swaymsg exec --
# Use Alt+Space
bindsym Mod1+Space exec $menu | xargs swaymsg exec --

You can pass additional flags to Raffi in the $menu variable:

# Disable icons for faster startup
set $menu raffi -p -I
# Use a custom config file
set $menu raffi -p -c ~/.config/raffi/custom.yaml
# Use the native UI instead of Fuzzel
set $menu raffi -p -u native

After adding the configuration:

  1. Reload your Sway config: swaymsg reload
  2. Press Super+Space to launch Raffi
  3. Select an application and press Enter to launch it
  • Ensure Raffi is installed and in your $PATH
  • If using Fuzzel mode (default), verify Fuzzel is installed
  • Check Sway logs: journalctl --user -u sway
  • Test the command manually: raffi -p | xargs swaymsg exec --
  • Verify swaymsg is working: swaymsg -t get_version