rofi
rofi is a popular application launcher / window switcher.
This module constructs
ward.process.cmd(...)invocations; it does not parse output. consumers can usewardlib.tools.out(or their own parsing) on the:output()result.
Import
local Rofi = require("wardlib.app.rofi").Rofi
API
Rofi.bin
Executable name or path (default: "rofi").
Rofi.dmenu(opts)
Builds: rofi <common...> -dmenu <dmenu...>
Rofi.show(mode, opts)
Builds: rofi <common...> -show <mode> <extra...>
Options
RofiCommonOpts
config: string?→-config <file>theme: string?→-theme <theme>theme_str: string?→-theme-str <string>modi: string?→-modi <modes>show_icons: boolean?→-show-iconsterminal: string?→-terminal <terminal>extra: string[]?→ extra argv appended after modeled options
RofiDmenuOpts
Extends RofiCommonOpts and adds:
sep: string?→-sep <sep>prompt: string?→-p <prompt>lines: number?→-l <n>insensitive: boolean?→-ionly_match: boolean?→-only-matchno_custom: boolean?→-no-customformat: string?→-format <fmt>select: string?→-select <string>mesg: string?→-mesg <msg>password: boolean?→-passwordmarkup_rows: boolean?→-markup-rowsmulti_select: boolean?→-multi-selectsync: boolean?→-syncinput: string?→-input <file>window_title: string?→-window-title <title>windowid: string?→-w <windowid>
Examples
run launcher
local Rofi = require("wardlib.app.rofi").Rofi
Rofi.show("run", {
modi = "run,drun",
show_icons = true,
}):output()
-dmenu mode
local Rofi = require("wardlib.app.rofi").Rofi
Rofi.dmenu({ prompt = "Run" }):output()