rofi/1.7.0/rofi-script.5/index.html

1485 lines
33 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="prev" href="../rofi-theme.5/">
<link rel="icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.4.2, mkdocs-material-9.0.6">
<title>Script - Rofi Documentation</title>
<link rel="stylesheet" href="../../assets/stylesheets/main.558e4712.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.2505c338.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#rofi-script-5-rofi-script" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="Rofi Documentation" class="md-header__button md-logo" aria-label="Rofi Documentation" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg>
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Rofi Documentation
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Script
</span>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/davatorium/rofi/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="Rofi Documentation" class="md-nav__button md-logo" aria-label="Rofi Documentation" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg>
</a>
Rofi Documentation
</label>
<div class="md-nav__source">
<a href="https://github.com/davatorium/rofi/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../COPYING/" class="md-nav__link">
License
</a>
</li>
<li class="md-nav__item">
<a href="https://github.com/davatorium/rofi/issues" class="md-nav__link">
Issue Tracker
</a>
</li>
<li class="md-nav__item">
<a href="https://github.com/davatorium/rofi/discussions" class="md-nav__link">
Discussions Forum
</a>
</li>
<li class="md-nav__item">
<a href="../../downloads/" class="md-nav__link">
Downloads
</a>
</li>
<li class="md-nav__item">
<a href="../../INSTALL/" class="md-nav__link">
Installation
</a>
</li>
<li class="md-nav__item">
<a href="../../CONFIG/" class="md-nav__link">
Configuration
</a>
</li>
<li class="md-nav__item">
<a href="../../themes/themes/" class="md-nav__link">
Themes
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " data-md-toggle="__nav_8" type="checkbox" id="__nav_8" >
<label class="md-nav__link" for="__nav_8" tabindex="0" aria-expanded="false">
Guides
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Guides" data-md-level="1">
<label class="md-nav__title" for="__nav_8">
<span class="md-nav__icon md-icon"></span>
Guides
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../guides/Transparency/theme3-transparency/" class="md-nav__link">
Transparency
</a>
</li>
<li class="md-nav__item">
<a href="../../guides/Positioning/theme3-positioning/" class="md-nav__link">
Positioning
</a>
</li>
<li class="md-nav__item">
<a href="../../guides/Plugins/2017-04-19-rofi-140-sneak-preview-plugins/" class="md-nav__link">
Plugins
</a>
</li>
<li class="md-nav__item">
<a href="../../guides/DynamicThemes/dynamic_themes/" class="md-nav__link">
Dynamic Theme
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " data-md-toggle="__nav_9" type="checkbox" id="__nav_9" >
<label class="md-nav__link" for="__nav_9" tabindex="0" aria-expanded="false">
Current
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Current" data-md-level="1">
<label class="md-nav__title" for="__nav_9">
<span class="md-nav__icon md-icon"></span>
Current
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../current/rofi.1/" class="md-nav__link">
Rofi
</a>
</li>
<li class="md-nav__item">
<a href="../../current/rofi-theme.5/" class="md-nav__link">
Themes
</a>
</li>
<li class="md-nav__item">
<a href="../../current/rofi-dmenu.5/" class="md-nav__link">
Dmenu
</a>
</li>
<li class="md-nav__item">
<a href="../../current/rofi-script.5/" class="md-nav__link">
Script
</a>
</li>
<li class="md-nav__item">
<a href="../../current/rofi-debugging.5/" class="md-nav__link">
Debugging
</a>
</li>
<li class="md-nav__item">
<a href="../../current/rofi-keys.5/" class="md-nav__link">
Keys
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " data-md-toggle="__nav_10" type="checkbox" id="__nav_10" >
<label class="md-nav__link" for="__nav_10" tabindex="0" aria-expanded="false">
1.7.5
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="1.7.5" data-md-level="1">
<label class="md-nav__title" for="__nav_10">
<span class="md-nav__icon md-icon"></span>
1.7.5
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../1.7.5/rofi.1/" class="md-nav__link">
Rofi
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.5/rofi-theme.5/" class="md-nav__link">
Themes
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.5/rofi-dmenu.5/" class="md-nav__link">
Dmenu
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.5/rofi-script.5/" class="md-nav__link">
Script
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.5/rofi-debugging.5/" class="md-nav__link">
Debugging
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.5/rofi-keys.5/" class="md-nav__link">
Keys
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " data-md-toggle="__nav_11" type="checkbox" id="__nav_11" >
<label class="md-nav__link" for="__nav_11" tabindex="0" aria-expanded="false">
1.7.4
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="1.7.4" data-md-level="1">
<label class="md-nav__title" for="__nav_11">
<span class="md-nav__icon md-icon"></span>
1.7.4
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../1.7.4/rofi.1/" class="md-nav__link">
Rofi
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.4/rofi-theme.5/" class="md-nav__link">
Themes
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.4/rofi-dmenu.5/" class="md-nav__link">
Dmenu
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.4/rofi-script.5/" class="md-nav__link">
Script
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.4/rofi-debugging.5/" class="md-nav__link">
Debugging
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.4/rofi-keys.5/" class="md-nav__link">
Keys
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " data-md-toggle="__nav_12" type="checkbox" id="__nav_12" >
<label class="md-nav__link" for="__nav_12" tabindex="0" aria-expanded="false">
1.7.3
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="1.7.3" data-md-level="1">
<label class="md-nav__title" for="__nav_12">
<span class="md-nav__icon md-icon"></span>
1.7.3
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../1.7.3/rofi.1/" class="md-nav__link">
Rofi
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.3/rofi-theme.5/" class="md-nav__link">
Themes
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.3/rofi-dmenu.5/" class="md-nav__link">
Dmenu
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.3/rofi-script.5/" class="md-nav__link">
Script
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.3/rofi-debugging.5/" class="md-nav__link">
Debugging
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.3/rofi-keys.5/" class="md-nav__link">
Keys
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " data-md-toggle="__nav_13" type="checkbox" id="__nav_13" >
<label class="md-nav__link" for="__nav_13" tabindex="0" aria-expanded="false">
1.7.2
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="1.7.2" data-md-level="1">
<label class="md-nav__title" for="__nav_13">
<span class="md-nav__icon md-icon"></span>
1.7.2
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../1.7.2/rofi.1/" class="md-nav__link">
Rofi
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.2/rofi-theme.5/" class="md-nav__link">
Themes
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.2/rofi-script.5/" class="md-nav__link">
Script
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " data-md-toggle="__nav_14" type="checkbox" id="__nav_14" >
<label class="md-nav__link" for="__nav_14" tabindex="0" aria-expanded="false">
1.7.1
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="1.7.1" data-md-level="1">
<label class="md-nav__title" for="__nav_14">
<span class="md-nav__icon md-icon"></span>
1.7.1
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../1.7.1/rofi.1/" class="md-nav__link">
Rofi
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.1/rofi-theme.5/" class="md-nav__link">
Themes
</a>
</li>
<li class="md-nav__item">
<a href="../../1.7.1/rofi-script.5/" class="md-nav__link">
Script
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " data-md-toggle="__nav_15" type="checkbox" id="__nav_15" checked>
<label class="md-nav__link" for="__nav_15" tabindex="0" aria-expanded="true">
1.7.0
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="1.7.0" data-md-level="1">
<label class="md-nav__title" for="__nav_15">
<span class="md-nav__icon md-icon"></span>
1.7.0
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../rofi.1/" class="md-nav__link">
Rofi
</a>
</li>
<li class="md-nav__item">
<a href="../rofi-theme.5/" class="md-nav__link">
Themes
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
Script
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
Script
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#name" class="md-nav__link">
NAME
</a>
</li>
<li class="md-nav__item">
<a href="#description" class="md-nav__link">
DESCRIPTION
</a>
</li>
<li class="md-nav__item">
<a href="#usage" class="md-nav__link">
USAGE
</a>
</li>
<li class="md-nav__item">
<a href="#api" class="md-nav__link">
API
</a>
</li>
<li class="md-nav__item">
<a href="#environment" class="md-nav__link">
Environment
</a>
<nav class="md-nav" aria-label="Environment">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#rofi_retv" class="md-nav__link">
ROFI_RETV
</a>
</li>
<li class="md-nav__item">
<a href="#rofi_info" class="md-nav__link">
ROFI_INFO
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#passing-mode-options" class="md-nav__link">
Passing mode options
</a>
</li>
<li class="md-nav__item">
<a href="#parsing-row-options" class="md-nav__link">
Parsing row options
</a>
</li>
<li class="md-nav__item">
<a href="#executing-external-program" class="md-nav__link">
Executing external program
</a>
</li>
<li class="md-nav__item">
<a href="#dash-shell" class="md-nav__link">
DASH shell
</a>
</li>
<li class="md-nav__item">
<a href="#see-also" class="md-nav__link">
SEE ALSO
</a>
</li>
<li class="md-nav__item">
<a href="#author" class="md-nav__link">
AUTHOR
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#name" class="md-nav__link">
NAME
</a>
</li>
<li class="md-nav__item">
<a href="#description" class="md-nav__link">
DESCRIPTION
</a>
</li>
<li class="md-nav__item">
<a href="#usage" class="md-nav__link">
USAGE
</a>
</li>
<li class="md-nav__item">
<a href="#api" class="md-nav__link">
API
</a>
</li>
<li class="md-nav__item">
<a href="#environment" class="md-nav__link">
Environment
</a>
<nav class="md-nav" aria-label="Environment">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#rofi_retv" class="md-nav__link">
ROFI_RETV
</a>
</li>
<li class="md-nav__item">
<a href="#rofi_info" class="md-nav__link">
ROFI_INFO
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#passing-mode-options" class="md-nav__link">
Passing mode options
</a>
</li>
<li class="md-nav__item">
<a href="#parsing-row-options" class="md-nav__link">
Parsing row options
</a>
</li>
<li class="md-nav__item">
<a href="#executing-external-program" class="md-nav__link">
Executing external program
</a>
</li>
<li class="md-nav__item">
<a href="#dash-shell" class="md-nav__link">
DASH shell
</a>
</li>
<li class="md-nav__item">
<a href="#see-also" class="md-nav__link">
SEE ALSO
</a>
</li>
<li class="md-nav__item">
<a href="#author" class="md-nav__link">
AUTHOR
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="rofi-script-5-rofi-script">ROFI-SCRIPT 5 rofi-script</h1>
<h2 id="name">NAME</h2>
<p><strong>rofi script mode</strong> - Rofi format for scriptable modi.</p>
<h2 id="description">DESCRIPTION</h2>
<p><strong>rofi</strong> supports modes that use simple scripts in the background to generate a list and process the result from user
actions. This provide a simple interface to make simple extensions to rofi.</p>
<h2 id="usage">USAGE</h2>
<p>To specify a script mode, set a mode with the following syntax: "{name}:{executable}"</p>
<p>For example:</p>
<pre><code>rofi -show fb -modi &quot;fb:file_browser.sh&quot;
</code></pre>
<p>The name should be unique.</p>
<h2 id="api">API</h2>
<p>Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline
(<code>\n</code>) (This can be changed by the script).
If the user selects an option, rofi calls the executable with the text of that option as the first argument.
If the script returns no entries, rofi quits.</p>
<p>A simple script would be:</p>
<pre><code class="language-bash">#!/usr/bin/env bash
if [ x&quot;$@&quot; = x&quot;quit&quot; ]
then
exit 0
fi
echo &quot;reload&quot;
echo &quot;quit&quot;
</code></pre>
<p>This shows two entries, reload and quit. When the quit entry is selected, rofi closes.</p>
<h2 id="environment">Environment</h2>
<p>Rofi sets the following environment variable when executing the script:</p>
<h3 id="rofi_retv"><code>ROFI_RETV</code></h3>
<p>An integer number with the current state:</p>
<ul>
<li><strong>0</strong>: Initial call of script.</li>
<li><strong>1</strong>: Selected an entry.</li>
<li><strong>2</strong>: Selected a custom entry.</li>
<li><strong>10-28</strong>: Custom keybinding 1-19 ( need to be explicitly enabled by script ).</li>
</ul>
<h3 id="rofi_info"><code>ROFI_INFO</code></h3>
<p>Environment get set when selected entry get set with the property value of the 'info' row option, if set.</p>
<h2 id="passing-mode-options">Passing mode options</h2>
<p>Extra options, like setting the prompt, can be set by the script.
Extra options are lines that start with a NULL character (<code>\0</code>) followed by a key, separator (<code>\x1f</code>) and value.</p>
<p>For example to set the prompt:</p>
<pre><code class="language-bash"> echo -en &quot;\0prompt\x1fChange prompt\n&quot;
</code></pre>
<p>The following extra options exists:</p>
<ul>
<li><strong>prompt</strong>: Update the prompt text.</li>
<li><strong>message</strong>: Update the message text.</li>
<li><strong>markup-rows</strong>: If 'true' renders markup in the row.</li>
<li><strong>urgent</strong>: Mark rows as urgent. (for syntax see the urgent option in dmenu mode)</li>
<li><strong>active</strong>: Mark rows as active. (for syntax see the active option in dmenu mode)</li>
<li><strong>delim</strong>: Set the delimiter for for next rows. Default is '\n' and this option should finish with this. Only call this on first call of script, it is remembered for consecutive calls.</li>
<li><strong>no-custom</strong>: If set to 'true'; only accept listed entries, ignore custom input.</li>
<li><strong>use-hot-keys</strong>: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow.</li>
</ul>
<h2 id="parsing-row-options">Parsing row options</h2>
<p>Extra options for individual rows can be set.
The extra option can be specified following the same syntax as mode option, but following the entry.</p>
<p>For example:</p>
<pre><code class="language-bash"> echo -en &quot;aap\0icon\x1ffolder\n&quot;
</code></pre>
<p>The following options are supported:</p>
<ul>
<li><strong>icon</strong>: Set the icon for that row.</li>
<li><strong>meta</strong>: Specify invisible search terms.</li>
<li><strong>nonselectable</strong>: If true the row cannot activated.</li>
<li><strong>info</strong>: Info that, on selection, gets placed in the <code>ROFI_INFO</code> environment variable. This entry does not get searched.</li>
</ul>
<p>multiple entries can be passed using the <code>\x1f</code> separator.</p>
<pre><code class="language-bash"> echo -en &quot;aap\0icon\x1ffolder\x1finfo\x1ftest\n&quot;
</code></pre>
<h2 id="executing-external-program">Executing external program</h2>
<p>If you want to launch an external program from the script, you need to make sure it is launched in the background.
If not rofi will wait for its output (to display).</p>
<p>In bash the best way to do this is using <code>coproc</code>.</p>
<pre><code class="language-bash"> coproc ( myApp &gt; /dev/null 2&gt;&amp;1 )
</code></pre>
<h2 id="dash-shell">DASH shell</h2>
<p>If you use the <code>dash</code> shell for your script, take special care with how dash handles escaped values for the separators.
See issue #1201 on github.</p>
<h2 id="see-also">SEE ALSO</h2>
<p>rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)</p>
<h2 id="author">AUTHOR</h2>
<p>Qball Cow <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#113;&#98;&#97;&#108;&#108;&#64;&#103;&#109;&#112;&#99;&#108;&#105;&#101;&#110;&#116;&#46;&#111;&#114;&#103;">&#113;&#98;&#97;&#108;&#108;&#64;&#103;&#109;&#112;&#99;&#108;&#105;&#101;&#110;&#116;&#46;&#111;&#114;&#103;</a></p>
<p>Rasmus Steinke <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#114;&#97;&#115;&#105;&#64;&#120;&#115;&#115;&#110;&#46;&#97;&#116;">&#114;&#97;&#115;&#105;&#64;&#120;&#115;&#115;&#110;&#46;&#97;&#116;</a></p>
<p>Quentin Glidic <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#115;&#97;&#114;&#100;&#101;&#109;&#102;&#102;&#55;&#43;&#114;&#111;&#102;&#105;&#64;&#115;&#97;&#114;&#100;&#101;&#109;&#102;&#102;&#55;&#46;&#110;&#101;&#116;">&#115;&#97;&#114;&#100;&#101;&#109;&#102;&#102;&#55;&#43;&#114;&#111;&#102;&#105;&#64;&#115;&#97;&#114;&#100;&#101;&#109;&#102;&#102;&#55;&#46;&#110;&#101;&#116;</a></p>
<p>Original code based on work by: Sean Pringle <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#115;&#101;&#97;&#110;&#46;&#112;&#114;&#105;&#110;&#103;&#108;&#101;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;">&#115;&#101;&#97;&#110;&#46;&#112;&#114;&#105;&#110;&#103;&#108;&#101;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;</a></p>
<p>For a full list of authors, check the AUTHORS file.</p>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../..", "features": [], "search": "../../assets/javascripts/workers/search.e5c33ebb.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
<script src="../../assets/javascripts/bundle.51d95adb.min.js"></script>
<script src="../../search/main.js"></script>
</body>
</html>