- Add stt-ptt language support documentation - Add rofi-project-opener module documentation - Add rofi-project-opener package documentation - Update zellij-ps documentation - Update guides and reference patterns - Update AGENTS.md with latest commands
4.3 KiB
rofi-project-opener Module
Home Manager module for configuring the rofi-project-opener package.
Overview
This module provides declarative configuration for rofi-project-opener, a Rofi-based project launcher. It generates the necessary configuration files and installs the package.
Quick Start
{config, pkgs, ...}: {
cli.rofi-project-opener = {
enable = true;
projectDirs = {
dev = { path = "~/dev"; };
work = { path = "~/work"; args = "--agent work-assistant"; };
};
};
}
Options
cli.rofi-project-opener.enable
Whether to enable rofi-project-opener.
Type: boolean
Default: false
cli.rofi-project-opener.projectDirs
Attribute set of base directories to scan for project subdirectories.
Type: attrsOf (submodule)
Each entry is a submodule with:
| Option | Type | Default | Description |
|---|---|---|---|
path |
str |
required | Base directory path (supports ~) |
args |
str |
"" |
Arguments to pass to command |
Default:
{
dev = { path = "~/dev"; };
projects = { path = "~/projects"; };
}
Example:
projectDirs = {
nixpkgs = { path = "~/p/NIX"; args = "--agent nix-expert"; };
chat = { path = "~/p/CHAT"; args = "--agent chiron"; };
dev = { path = "~/dev"; };
work = { path = "~/work"; args = "--profile work"; };
};
cli.rofi-project-opener.terminal
Terminal emulator to use for launching projects.
Type: either str package
Default: "kitty"
Examples:
# Using a package
terminal = pkgs.kitty;
terminal = pkgs.alacritty;
# Using a string (must be in PATH)
terminal = "kitty";
terminal = "wezterm";
cli.rofi-project-opener.terminalCommand
Command to run in the terminal after navigating to the project directory.
Type: str
Default: "" (runs opencode with args)
Placeholders:
%s- Project path%a- Project args (fromprojectDirs.<name>.args)
Examples:
# Default behavior - run opencode with project args
terminalCommand = "";
# Explicit opencode with args
terminalCommand = "opencode %a";
# Different editor
terminalCommand = "nvim";
# VSCode with path
terminalCommand = "code %s";
# Custom application
terminalCommand = "my-dev-tool --project %s %a";
cli.rofi-project-opener.rofiPrompt
Prompt text displayed in the Rofi menu.
Type: str
Default: "Select project"
cli.rofi-project-opener.rofiArgs
Arguments to pass to Rofi.
Type: listOf str
Default: ["-dmenu" "-i"]
Example:
rofiArgs = ["-dmenu" "-i" "-theme" "gruvbox" "-width" "50"];
Generated Files
The module generates these configuration files:
~/.config/rofi-project-opener/projects.json
JSON file containing project directories:
{
"dev": {"path": "~/dev", "args": ""},
"work": {"path": "~/work", "args": "--agent work-assistant"}
}
~/.config/rofi-project-opener/config
Shell configuration file:
TERMINAL="/nix/store/.../bin/kitty"
TERMINAL_CMD="opencode %a"
ROFI_PROMPT="Select project"
ROFI_ARGS="-dmenu -i"
Full Example
{config, pkgs, ...}: {
imports = [m3ta-nixpkgs.homeManagerModules.default];
cli.rofi-project-opener = {
enable = true;
# Project directories with optional args
projectDirs = {
nixpkgs = {
path = "~/p/NIX";
args = "";
};
chat = {
path = "~/p/CHAT";
args = "--agent chiron";
};
dev = {
path = "~/dev";
args = "";
};
};
# Terminal configuration
terminal = pkgs.kitty;
terminalCommand = "opencode %a";
# Rofi configuration
rofiPrompt = "Open Project";
rofiArgs = ["-dmenu" "-i" "-theme" "nord"];
};
}
Usage
After enabling, run:
rofi-project-opener
Or bind to a keyboard shortcut in your window manager:
Hyprland:
wayland.windowManager.hyprland.settings.bind = [
"$mod, P, exec, rofi-project-opener"
];
Sway:
wayland.windowManager.sway.config.keybindings = {
"${modifier}+p" = "exec rofi-project-opener";
};
Related
- rofi-project-opener Package - Package documentation
- zellij-ps Module - Similar project switcher for Zellij
- Home Manager Overview - All Home Manager modules