1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

[DOC] Update rofi-script update with remark-lint remarks.

This commit is contained in:
Dave Davenport 2023-03-27 12:08:54 +02:00
parent 3446e88cb8
commit b23fc0fff4
4 changed files with 271 additions and 148 deletions

View file

@ -298,14 +298,14 @@ Select next entry
Go to next row, if one left, accept it, if no left next mode. Go to next row, if one left, accept it, if no left next mode.
.PP .PP
\fBDefault\fP: \fBDefault\fP:
.SS \fBkb-element-next\fP .SS \fBkb-element-next\fP
.PP .PP
Go to next row. Go to next row.
.PP .PP
\fBDefault\fP: Tab \fBDefault\fP: Tab
.SS \fBkb-element-prev\fP .SS \fBkb-element-prev\fP
.PP .PP

View file

@ -2,8 +2,7 @@
## NAME ## NAME
**rofi keys** - Rofi Key and Mouse bindings **rofi keys** - Rofi Key and Mouse bindings
## DESCRIPTION ## DESCRIPTION
@ -65,14 +64,16 @@ configuration {
## Keyboard Bindings ## Keyboard Bindings
### **kb-primary-paste**: ### **kb-primary-paste**:
Paste primary selection Paste primary selection
**Default**: Control+V,Shift+Insert **Default**: Control+V,Shift+Insert
### **kb-secondary-paste** ### **kb-secondary-paste**
Paste clipboard Paste clipboard
**Default**: Control+v,Insert **Default**: Control+v,Insert
### **kb-secondary-copy** ### **kb-secondary-copy**
@ -81,346 +82,415 @@ Copy current selection to clipboard
**Default**: Control+c **Default**: Control+c
### **kb-clear-line** ### **kb-clear-line**
Clear input line Clear input line
**Default**: Control+w **Default**: Control+w
### **kb-move-front** ### **kb-move-front**
Beginning of line Beginning of line
**Default**: Control+a **Default**: Control+a
### **kb-move-end** ### **kb-move-end**
End of line End of line
**Default**: Control+e **Default**: Control+e
### **kb-move-word-back** ### **kb-move-word-back**
Move back one word Move back one word
**Default**: Alt+b,Control+Left **Default**: Alt+b,Control+Left
### **kb-move-word-forward** ### **kb-move-word-forward**
Move forward one word Move forward one word
**Default**: Alt+f,Control+Right **Default**: Alt+f,Control+Right
### **kb-move-char-back** ### **kb-move-char-back**
Move back one char Move back one char
**Default**: Left,Control+b **Default**: Left,Control+b
### **kb-move-char-forward** ### **kb-move-char-forward**
Move forward one char Move forward one char
**Default**: Right,Control+f **Default**: Right,Control+f
### **kb-remove-word-back** ### **kb-remove-word-back**
Delete previous word Delete previous word
**Default**: Control+Alt+h,Control+BackSpace **Default**: Control+Alt+h,Control+BackSpace
### **kb-remove-word-forward** ### **kb-remove-word-forward**
Delete next word Delete next word
**Default**: Control+Alt+d **Default**: Control+Alt+d
### **kb-remove-char-forward** ### **kb-remove-char-forward**
Delete next char Delete next char
**Default**: Delete,Control+d **Default**: Delete,Control+d
### **kb-remove-char-back** ### **kb-remove-char-back**
Delete previous char Delete previous char
**Default**: BackSpace,Shift+BackSpace,Control+h **Default**: BackSpace,Shift+BackSpace,Control+h
### **kb-remove-to-eol** ### **kb-remove-to-eol**
Delete till the end of line Delete till the end of line
**Default**: Control+k **Default**: Control+k
### **kb-remove-to-sol** ### **kb-remove-to-sol**
Delete till the start of line Delete till the start of line
**Default**: Control+u **Default**: Control+u
### **kb-accept-entry** ### **kb-accept-entry**
Accept entry Accept entry
**Default**: Control+j,Control+m,Return,KP_Enter **Default**: Control+j,Control+m,Return,KP\_Enter
### **kb-accept-custom** ### **kb-accept-custom**
Use entered text as command (in ssh/run modes) Use entered text as command (in ssh/run modes)
**Default**: Control+Return **Default**: Control+Return
### **kb-accept-custom-alt** ### **kb-accept-custom-alt**
Use entered text as command (in ssh/run modes) Use entered text as command (in ssh/run modes)
**Default**: Control+Shift+Return **Default**: Control+Shift+Return
### **kb-accept-alt** ### **kb-accept-alt**
Use alternate accept command. Use alternate accept command.
**Default**: Shift+Return **Default**: Shift+Return
### **kb-delete-entry** ### **kb-delete-entry**
Delete entry from history Delete entry from history
**Default**: Shift+Delete **Default**: Shift+Delete
### **kb-mode-next** ### **kb-mode-next**
Switch to the next mode. Switch to the next mode.
**Default**: Shift+Right,Control+Tab **Default**: Shift+Right,Control+Tab
### **kb-mode-previous** ### **kb-mode-previous**
Switch to the previous mode. Switch to the previous mode.
**Default**: Shift+Left,Control+ISO_Left_Tab **Default**: Shift+Left,Control+ISO\_Left\_Tab
### **kb-mode-complete** ### **kb-mode-complete**
Start completion for mode. Start completion for mode.
**Default**: Control+l **Default**: Control+l
### **kb-row-left** ### **kb-row-left**
Go to the previous column Go to the previous column
**Default**: Control+Page_Up **Default**: Control+Page\_Up
### **kb-row-right** ### **kb-row-right**
Go to the next column Go to the next column
**Default**: Control+Page_Down **Default**: Control+Page\_Down
### **kb-row-up** ### **kb-row-up**
Select previous entry Select previous entry
**Default**: Up,Control+p **Default**: Up,Control+p
### **kb-row-down** ### **kb-row-down**
Select next entry Select next entry
**Default**: Down,Control+n **Default**: Down,Control+n
### **kb-row-tab** ### **kb-row-tab**
Go to next row, if one left, accept it, if no left next mode. Go to next row, if one left, accept it, if no left next mode.
**Default**: **Default**:
### **kb-element-next** ### **kb-element-next**
Go to next row. Go to next row.
**Default**: Tab **Default**: Tab
### **kb-element-prev** ### **kb-element-prev**
Go to previous row. Go to previous row.
**Default**: ISO_Left_Tab **Default**: ISO\_Left\_Tab
### **kb-page-prev** ### **kb-page-prev**
Go to the previous page Go to the previous page
**Default**: Page_Up **Default**: Page\_Up
### **kb-page-next** ### **kb-page-next**
Go to the next page Go to the next page
**Default**: Page_Down **Default**: Page\_Down
### **kb-row-first** ### **kb-row-first**
Go to the first entry Go to the first entry
**Default**: Home,KP_Home **Default**: Home,KP\_Home
### **kb-row-last** ### **kb-row-last**
Go to the last entry Go to the last entry
**Default**: End,KP_End **Default**: End,KP\_End
### **kb-row-select** ### **kb-row-select**
Set selected item as input text Set selected item as input text
**Default**: Control+space **Default**: Control+space
### **kb-screenshot** ### **kb-screenshot**
Take a screenshot of the rofi window Take a screenshot of the rofi window
**Default**: Alt+S **Default**: Alt+S
### **kb-ellipsize** ### **kb-ellipsize**
Toggle between ellipsize modes for displayed data Toggle between ellipsize modes for displayed data
**Default**: Alt+period **Default**: Alt+period
### **kb-toggle-case-sensitivity** ### **kb-toggle-case-sensitivity**
Toggle case sensitivity Toggle case sensitivity
**Default**: grave,dead_grave **Default**: grave,dead\_grave
### **kb-toggle-sort** ### **kb-toggle-sort**
Toggle sort Toggle sort
**Default**: Alt+grave **Default**: Alt+grave
### **kb-cancel** ### **kb-cancel**
Quit rofi Quit rofi
**Default**: Escape,Control+g,Control+bracketleft **Default**: Escape,Control+g,Control+bracketleft
### **kb-custom-1** ### **kb-custom-1**
Custom keybinding 1 Custom keybinding 1
**Default**: Alt+1 **Default**: Alt+1
### **kb-custom-2** ### **kb-custom-2**
Custom keybinding 2 Custom keybinding 2
**Default**: Alt+2 **Default**: Alt+2
### **kb-custom-3** ### **kb-custom-3**
Custom keybinding 3 Custom keybinding 3
**Default**: Alt+3 **Default**: Alt+3
### **kb-custom-4** ### **kb-custom-4**
Custom keybinding 4 Custom keybinding 4
**Default**: Alt+4 **Default**: Alt+4
### **kb-custom-5** ### **kb-custom-5**
Custom Keybinding 5 Custom Keybinding 5
**Default**: Alt+5 **Default**: Alt+5
### **kb-custom-6** ### **kb-custom-6**
Custom keybinding 6 Custom keybinding 6
**Default**: Alt+6 **Default**: Alt+6
### **kb-custom-7** ### **kb-custom-7**
Custom Keybinding 7 Custom Keybinding 7
**Default**: Alt+7 **Default**: Alt+7
### **kb-custom-8** ### **kb-custom-8**
Custom keybinding 8 Custom keybinding 8
**Default**: Alt+8 **Default**: Alt+8
### **kb-custom-9** ### **kb-custom-9**
Custom keybinding 9 Custom keybinding 9
**Default**: Alt+9 **Default**: Alt+9
### **kb-custom-10** ### **kb-custom-10**
Custom keybinding 10 Custom keybinding 10
**Default**: Alt+0 **Default**: Alt+0
### **kb-custom-11** ### **kb-custom-11**
Custom keybinding 11 Custom keybinding 11
**Default**: Alt+exclam **Default**: Alt+exclam
### **kb-custom-12** ### **kb-custom-12**
Custom keybinding 12 Custom keybinding 12
**Default**: Alt+at **Default**: Alt+at
### **kb-custom-13** ### **kb-custom-13**
Custom keybinding 13 Custom keybinding 13
**Default**: Alt+numbersign **Default**: Alt+numbersign
### **kb-custom-14** ### **kb-custom-14**
Custom keybinding 14 Custom keybinding 14
**Default**: Alt+dollar **Default**: Alt+dollar
### **kb-custom-15** ### **kb-custom-15**
Custom keybinding 15 Custom keybinding 15
**Default**: Alt+percent **Default**: Alt+percent
### **kb-custom-16** ### **kb-custom-16**
Custom keybinding 16 Custom keybinding 16
**Default**: Alt+dead_circumflex **Default**: Alt+dead\_circumflex
### **kb-custom-17** ### **kb-custom-17**
Custom keybinding 17 Custom keybinding 17
**Default**: Alt+ampersand **Default**: Alt+ampersand
### **kb-custom-18** ### **kb-custom-18**
Custom keybinding 18 Custom keybinding 18
**Default**: Alt+asterisk **Default**: Alt+asterisk
### **kb-custom-19** ### **kb-custom-19**
Custom Keybinding 19 Custom Keybinding 19
**Default**: Alt+parenleft **Default**: Alt+parenleft
### **kb-select-1** ### **kb-select-1**
Select row 1 Select row 1
**Default**: Super+1 **Default**: Super+1
### **kb-select-2** ### **kb-select-2**
Select row 2 Select row 2
**Default**: Super+2 **Default**: Super+2
### **kb-select-3** ### **kb-select-3**
Select row 3 Select row 3
**Default**: Super+3 **Default**: Super+3
### **kb-select-4** ### **kb-select-4**
Select row 4 Select row 4
**Default**: Super+4 **Default**: Super+4
### **kb-select-5** ### **kb-select-5**
Select row 5 Select row 5
**Default**: Super+5 **Default**: Super+5
### **kb-select-6** ### **kb-select-6**
Select row 6 Select row 6
**Default**: Super+6 **Default**: Super+6
### **kb-select-7** ### **kb-select-7**
Select row 7 Select row 7
**Default**: Super+7 **Default**: Super+7
### **kb-select-8** ### **kb-select-8**
Select row 8 Select row 8
**Default**: Super+8 **Default**: Super+8
### **kb-select-9** ### **kb-select-9**
Select row 9 Select row 9
**Default**: Super+9 **Default**: Super+9
### **kb-select-10** ### **kb-select-10**
Select row 10 Select row 10
**Default**: Super+0 **Default**: Super+0
### **kb-entry-history-up** ### **kb-entry-history-up**
Go up in the entry history. Go up in the entry history.
**Default**: Control+Up **Default**: Control+Up
### **kb-entry-history-down** ### **kb-entry-history-down**
Go down in the entry history. Go down in the entry history.
**Default**: Control+Down **Default**: Control+Down
@ -428,44 +498,50 @@ Go down in the entry history.
## Mouse Bindings ## Mouse Bindings
### **ml-row-left** ### **ml-row-left**
Go to the previous column Go to the previous column
**Default**: ScrollLeft **Default**: ScrollLeft
### **ml-row-right** ### **ml-row-right**
Go to the next column Go to the next column
**Default**: ScrollRight **Default**: ScrollRight
### **ml-row-up** ### **ml-row-up**
Select previous entry Select previous entry
**Default**: ScrollUp **Default**: ScrollUp
### **ml-row-down** ### **ml-row-down**
Select next entry Select next entry
**Default**: ScrollDown **Default**: ScrollDown
### **me-select-entry** ### **me-select-entry**
Select hovered row Select hovered row
**Default**: MousePrimary **Default**: MousePrimary
### **me-accept-entry** ### **me-accept-entry**
Accept hovered row Accept hovered row
**Default**: MouseDPrimary **Default**: MouseDPrimary
### **me-accept-custom** ### **me-accept-custom**
Accept hovered row with custom action Accept hovered row with custom action
**Default**: Control+MouseDPrimary **Default**: Control+MouseDPrimary
## SEE ALSO ## SEE ALSO
rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5) rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5)
## AUTHOR ## AUTHOR
@ -475,7 +551,6 @@ Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net> Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com> Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file. For a full list of authors, check the AUTHORS file.

View file

@ -12,7 +12,8 @@ to make simple extensions to rofi.
.SH USAGE .SH USAGE
.PP .PP
To specify a script mode, set a mode with the following syntax: "{name}:{executable}" To specify a script mode, set a mode with the following syntax:
"{name}:{executable}"
.PP .PP
For example: For example:
@ -58,7 +59,8 @@ echo "quit"
.RE .RE
.PP .PP
This shows two entries, reload and quit. When the quit entry is selected, rofi closes. This shows two entries, reload and quit. When the quit entry is selected, rofi
closes.
.SH Environment .SH Environment
.PP .PP
@ -82,7 +84,8 @@ An integer number with the current state:
.SS \fB\fCROFI_INFO\fR .SS \fB\fCROFI_INFO\fR
.PP .PP
Environment get set when selected entry get set with the property value of the 'info' row option, if set. Environment get set when selected entry get set with the property value of the
'info' row option, if set.
.SS \fB\fCROFI_DATA\fR .SS \fB\fCROFI_DATA\fR
.PP .PP
@ -90,8 +93,9 @@ Environment get set when script sets \fB\fCdata\fR option in header.
.SH Passing mode options .SH Passing mode options
.PP .PP
Extra options, like setting the prompt, can be set by the script. Extra options, like setting the prompt, can be set by the script. Extra options
Extra options are lines that start with a NULL character (\fB\fC\\0\fR) followed by a key, separator (\fB\fC\\x1f\fR) and value. are lines that start with a NULL character (\fB\fC\\0\fR) followed by a key, separator
(\fB\fC\\x1f\fR) and value.
.PP .PP
For example to set the prompt: For example to set the prompt:
@ -116,30 +120,40 @@ The following extra options exists:
.IP \(bu 2 .IP \(bu 2
\fBmarkup-rows\fP: If 'true' renders markup in the row. \fBmarkup-rows\fP: If 'true' renders markup in the row.
.IP \(bu 2 .IP \(bu 2
\fBurgent\fP: Mark rows as urgent. (for syntax see the urgent option in dmenu mode) \fBurgent\fP: Mark rows as urgent. (for syntax see the urgent option in
dmenu mode)
.IP \(bu 2 .IP \(bu 2
\fBactive\fP: Mark rows as active. (for syntax see the active option in dmenu mode) \fBactive\fP: Mark rows as active. (for syntax see the active option in
dmenu mode)
.IP \(bu 2 .IP \(bu 2
\fBdelim\fP: 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. \fBdelim\fP: 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.
.IP \(bu 2 .IP \(bu 2
\fBno-custom\fP: If set to 'true'; only accept listed entries, ignore custom input. \fBno-custom\fP: If set to 'true'; only accept listed entries, ignore custom
input.
.IP \(bu 2 .IP \(bu 2
\fBuse-hot-keys\fP: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow. \fBuse-hot-keys\fP: If set to true, it enabled the Custom keybindings for
script. Warning this breaks the normal rofi flow.
.IP \(bu 2 .IP \(bu 2
\fBkeep-selection\fP: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared. \fBkeep-selection\fP: If set, the selection is not moved to the first entry,
but the current position is maintained. The filter is cleared.
.IP \(bu 2 .IP \(bu 2
\fBnew-selection\fP: If \fB\fCkeep-selection\fR is set, this allows you to override the selected entry (absolute position). \fBnew-selection\fP: If \fB\fCkeep-selection\fR is set, this allows you to override
the selected entry (absolute position).
.IP \(bu 2 .IP \(bu 2
\fBdata\fP: Passed data to the next execution of the script via \fBROFI_DATA\fP\&. \fBdata\fP: Passed data to the next execution of the script via
\fBROFI_DATA\fP\&.
.IP \(bu 2 .IP \(bu 2
\fBtheme\fP: Small theme snippet to f.e. change the background color of a widget. \fBtheme\fP: Small theme snippet to f.e. change the background color of
a widget.
.RE .RE
.SH Parsing row options .SH Parsing row options
.PP .PP
Extra options for individual rows can be set. Extra options for individual rows can be set. The extra option can be specified
The extra option can be specified following the same syntax as mode option, but following the entry. following the same syntax as mode option, but following the entry.
.PP .PP
For example: For example:
@ -164,7 +178,8 @@ The following options are supported:
.IP \(bu 2 .IP \(bu 2
\fBnonselectable\fP: If true the row cannot activated. \fBnonselectable\fP: If true the row cannot activated.
.IP \(bu 2 .IP \(bu 2
\fBinfo\fP: Info that, on selection, gets placed in the \fB\fCROFI_INFO\fR environment variable. This entry does not get searched. \fBinfo\fP: Info that, on selection, gets placed in the \fB\fCROFI_INFO\fR
environment variable. This entry does not get searched.
.IP \(bu 2 .IP \(bu 2
\fBurgent\fP: Set urgent flag on entry (true/false) \fBurgent\fP: Set urgent flag on entry (true/false)
.IP \(bu 2 .IP \(bu 2
@ -186,8 +201,9 @@ multiple entries can be passed using the \fB\fC\\x1f\fR separator.
.SH Executing external program .SH Executing external program
.PP .PP
If you want to launch an external program from the script, you need to make sure it is launched in the background. If you want to launch an external program from the script, you need to make
If not rofi will wait for its output (to display). sure it is launched in the background. If not rofi will wait for its output (to
display).
.PP .PP
In bash the best way to do this is using \fB\fCcoproc\fR\&. In bash the best way to do this is using \fB\fCcoproc\fR\&.
@ -203,8 +219,8 @@ In bash the best way to do this is using \fB\fCcoproc\fR\&.
.SH DASH shell .SH DASH shell
.PP .PP
If you use the \fB\fCdash\fR shell for your script, take special care with how dash handles escaped values for the separators. If you use the \fB\fCdash\fR shell for your script, take special care with how dash
See issue #1201 on github. handles escaped values for the separators. See issue #1201 on github.
.SH Script locations .SH Script locations
.PP .PP
@ -223,13 +239,15 @@ Scripts located in the following location are loaded on startup:
.RS .RS
.IP \(bu 2 .IP \(bu 2
The script is in \fB\fC$XDG_CONFIG_PATH/rofi/scripts/\fR, this is usually \fB\fC~/.config/rofi/scripts/\fR\&. The script is in \fB\fC$XDG_CONFIG_PATH/rofi/scripts/\fR, this is usually
\fB\fC~/.config/rofi/scripts/\fR\&.
.RE .RE
.SH SEE ALSO .SH SEE ALSO
.PP .PP
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1) rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5),
rofi-theme-selector(1)
.SH AUTHOR .SH AUTHOR
.PP .PP

View file

@ -4,21 +4,20 @@
**rofi script mode** - Rofi format for scriptable mode. **rofi script mode** - Rofi format for scriptable mode.
## DESCRIPTION ## DESCRIPTION
**rofi** supports modes that use simple scripts in the background to generate a **rofi** 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 list and process the result from user actions. This provide a simple interface
to make simple extensions to rofi. to make simple extensions to rofi.
## USAGE ## USAGE
To specify a script mode, set a mode with the following syntax: "{name}:{executable}" To specify a script mode, set a mode with the following syntax:
"{name}:{executable}"
For example: For example:
``` ```bash
rofi -show fb -modes "fb:file_browser.sh" rofi -show fb -modes "fb:file_browser.sh"
``` ```
@ -46,7 +45,8 @@ echo "quit"
``` ```
This shows two entries, reload and quit. When the quit entry is selected, rofi closes. This shows two entries, reload and quit. When the quit entry is selected, rofi
closes.
## Environment ## Environment
@ -56,14 +56,15 @@ Rofi sets the following environment variable when executing the script:
An integer number with the current state: An integer number with the current state:
* **0**: Initial call of script. - **0**: Initial call of script.
* **1**: Selected an entry. - **1**: Selected an entry.
* **2**: Selected a custom entry. - **2**: Selected a custom entry.
* **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ). - **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
### `ROFI_INFO` ### `ROFI_INFO`
Environment get set when selected entry get set with the property value of the 'info' row option, if set. Environment get set when selected entry get set with the property value of the
'info' row option, if set.
### `ROFI_DATA` ### `ROFI_DATA`
@ -71,8 +72,9 @@ Environment get set when script sets `data` option in header.
## Passing mode options ## Passing mode options
Extra options, like setting the prompt, can be set by the script. Extra options, like setting the prompt, can be set by the script. Extra options
Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value. are lines that start with a NULL character (`\0`) followed by a key, separator
(`\x1f`) and value.
For example to set the prompt: For example to set the prompt:
@ -82,23 +84,44 @@ For example to set the prompt:
The following extra options exists: The following extra options exists:
* **prompt**: Update the prompt text. - **prompt**: Update the prompt text.
* **message**: Update the message text.
* **markup-rows**: If 'true' renders markup in the row. - **message**: Update the message text.
* **urgent**: Mark rows as urgent. (for syntax see the urgent option in dmenu mode)
* **active**: Mark rows as active. (for syntax see the active option in dmenu mode) - **markup-rows**: If 'true' renders markup in the row.
* **delim**: 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.
* **no-custom**: If set to 'true'; only accept listed entries, ignore custom input. - **urgent**: Mark rows as urgent. (for syntax see the urgent option in
* **use-hot-keys**: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow. dmenu mode)
* **keep-selection**: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared.
* **new-selection**: If `keep-selection` is set, this allows you to override the selected entry (absolute position). - **active**: Mark rows as active. (for syntax see the active option in
* **data**: Passed data to the next execution of the script via **ROFI_DATA**. dmenu mode)
* **theme**: Small theme snippet to f.e. change the background color of a widget.
- **delim**: 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.
- **no-custom**: If set to 'true'; only accept listed entries, ignore custom
input.
- **use-hot-keys**: If set to true, it enabled the Custom keybindings for
script. Warning this breaks the normal rofi flow.
- **keep-selection**: If set, the selection is not moved to the first entry,
but the current position is maintained. The filter is cleared.
- **new-selection**: If `keep-selection` is set, this allows you to override
the selected entry (absolute position).
- **data**: Passed data to the next execution of the script via
**ROFI\_DATA**.
- **theme**: Small theme snippet to f.e. change the background color of
a widget.
## Parsing row options ## Parsing row options
Extra options for individual rows can be set. Extra options for individual rows can be set. The extra option can be specified
The extra option can be specified following the same syntax as mode option, but following the entry. following the same syntax as mode option, but following the entry.
For example: For example:
@ -108,12 +131,18 @@ For example:
The following options are supported: The following options are supported:
* **icon**: Set the icon for that row. - **icon**: Set the icon for that row.
* **meta**: Specify invisible search terms.
* **nonselectable**: If true the row cannot activated. - **meta**: Specify invisible search terms.
* **info**: Info that, on selection, gets placed in the `ROFI_INFO` environment variable. This entry does not get searched.
* **urgent**: Set urgent flag on entry (true/false) - **nonselectable**: If true the row cannot activated.
* **active**: Set active flag on entry (true/false)
- **info**: Info that, on selection, gets placed in the `ROFI_INFO`
environment variable. This entry does not get searched.
- **urgent**: Set urgent flag on entry (true/false)
- **active**: Set active flag on entry (true/false)
multiple entries can be passed using the `\x1f` separator. multiple entries can be passed using the `\x1f` separator.
@ -123,8 +152,9 @@ multiple entries can be passed using the `\x1f` separator.
## Executing external program ## Executing external program
If you want to launch an external program from the script, you need to make sure it is launched in the background. If you want to launch an external program from the script, you need to make
If not rofi will wait for its output (to display). sure it is launched in the background. If not rofi will wait for its output (to
display).
In bash the best way to do this is using `coproc`. In bash the best way to do this is using `coproc`.
@ -132,26 +162,27 @@ In bash the best way to do this is using `coproc`.
coproc ( myApp > /dev/null 2>&1 ) coproc ( myApp > /dev/null 2>&1 )
``` ```
## DASH shell ## DASH shell
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators. If you use the `dash` shell for your script, take special care with how dash
See issue #1201 on github. handles escaped values for the separators. See issue #1201 on github.
## Script locations ## Script locations
To specify a script there are the following options: To specify a script there are the following options:
* Specify an absolute path to the script. - Specify an absolute path to the script.
* The script is executable and located in your $PATH - The script is executable and located in your $PATH
Scripts located in the following location are loaded on startup: Scripts located in the following location are loaded on startup:
* The script is in `$XDG_CONFIG_PATH/rofi/scripts/`, this is usually `~/.config/rofi/scripts/`. - The script is in `$XDG_CONFIG_PATH/rofi/scripts/`, this is usually
`~/.config/rofi/scripts/`.
## SEE ALSO ## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1) rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5),
rofi-theme-selector(1)
## AUTHOR ## AUTHOR
@ -161,7 +192,6 @@ Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net> Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com> Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file. For a full list of authors, check the AUTHORS file.