mirror of
https://github.com/lbonn/rofi
synced 2024-11-25 21:30:21 +00:00
[DOC] Update rofi-script update with remark-lint remarks.
This commit is contained in:
parent
3446e88cb8
commit
b23fc0fff4
4 changed files with 271 additions and 148 deletions
|
@ -298,14 +298,14 @@ Select next entry
|
|||
Go to next row, if one left, accept it, if no left next mode.
|
||||
|
||||
.PP
|
||||
\fBDefault\fP:
|
||||
\fBDefault\fP:
|
||||
|
||||
.SS \fBkb-element-next\fP
|
||||
.PP
|
||||
Go to next row.
|
||||
|
||||
.PP
|
||||
\fBDefault\fP: Tab
|
||||
\fBDefault\fP: Tab
|
||||
|
||||
.SS \fBkb-element-prev\fP
|
||||
.PP
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
## NAME
|
||||
|
||||
**rofi keys** - Rofi Key and Mouse bindings
|
||||
|
||||
**rofi keys** - Rofi Key and Mouse bindings
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
@ -65,14 +64,16 @@ configuration {
|
|||
## Keyboard Bindings
|
||||
|
||||
### **kb-primary-paste**:
|
||||
|
||||
Paste primary selection
|
||||
|
||||
**Default**: Control+V,Shift+Insert
|
||||
**Default**: Control+V,Shift+Insert
|
||||
|
||||
### **kb-secondary-paste**
|
||||
|
||||
Paste clipboard
|
||||
|
||||
**Default**: Control+v,Insert
|
||||
**Default**: Control+v,Insert
|
||||
|
||||
### **kb-secondary-copy**
|
||||
|
||||
|
@ -81,346 +82,415 @@ Copy current selection to clipboard
|
|||
**Default**: Control+c
|
||||
|
||||
### **kb-clear-line**
|
||||
|
||||
Clear input line
|
||||
|
||||
**Default**: Control+w
|
||||
**Default**: Control+w
|
||||
|
||||
### **kb-move-front**
|
||||
|
||||
Beginning of line
|
||||
|
||||
**Default**: Control+a
|
||||
**Default**: Control+a
|
||||
|
||||
### **kb-move-end**
|
||||
|
||||
End of line
|
||||
|
||||
**Default**: Control+e
|
||||
**Default**: Control+e
|
||||
|
||||
### **kb-move-word-back**
|
||||
|
||||
Move back one word
|
||||
|
||||
**Default**: Alt+b,Control+Left
|
||||
**Default**: Alt+b,Control+Left
|
||||
|
||||
### **kb-move-word-forward**
|
||||
|
||||
Move forward one word
|
||||
|
||||
**Default**: Alt+f,Control+Right
|
||||
**Default**: Alt+f,Control+Right
|
||||
|
||||
### **kb-move-char-back**
|
||||
|
||||
Move back one char
|
||||
|
||||
**Default**: Left,Control+b
|
||||
**Default**: Left,Control+b
|
||||
|
||||
### **kb-move-char-forward**
|
||||
|
||||
Move forward one char
|
||||
|
||||
**Default**: Right,Control+f
|
||||
**Default**: Right,Control+f
|
||||
|
||||
### **kb-remove-word-back**
|
||||
|
||||
Delete previous word
|
||||
|
||||
**Default**: Control+Alt+h,Control+BackSpace
|
||||
**Default**: Control+Alt+h,Control+BackSpace
|
||||
|
||||
### **kb-remove-word-forward**
|
||||
|
||||
Delete next word
|
||||
|
||||
**Default**: Control+Alt+d
|
||||
**Default**: Control+Alt+d
|
||||
|
||||
### **kb-remove-char-forward**
|
||||
|
||||
Delete next char
|
||||
|
||||
**Default**: Delete,Control+d
|
||||
**Default**: Delete,Control+d
|
||||
|
||||
### **kb-remove-char-back**
|
||||
|
||||
Delete previous char
|
||||
|
||||
**Default**: BackSpace,Shift+BackSpace,Control+h
|
||||
**Default**: BackSpace,Shift+BackSpace,Control+h
|
||||
|
||||
### **kb-remove-to-eol**
|
||||
|
||||
Delete till the end of line
|
||||
|
||||
**Default**: Control+k
|
||||
**Default**: Control+k
|
||||
|
||||
### **kb-remove-to-sol**
|
||||
|
||||
Delete till the start of line
|
||||
|
||||
**Default**: Control+u
|
||||
**Default**: Control+u
|
||||
|
||||
### **kb-accept-entry**
|
||||
|
||||
Accept entry
|
||||
|
||||
**Default**: Control+j,Control+m,Return,KP_Enter
|
||||
**Default**: Control+j,Control+m,Return,KP\_Enter
|
||||
|
||||
### **kb-accept-custom**
|
||||
|
||||
Use entered text as command (in ssh/run modes)
|
||||
|
||||
**Default**: Control+Return
|
||||
**Default**: Control+Return
|
||||
|
||||
### **kb-accept-custom-alt**
|
||||
|
||||
Use entered text as command (in ssh/run modes)
|
||||
|
||||
**Default**: Control+Shift+Return
|
||||
**Default**: Control+Shift+Return
|
||||
|
||||
### **kb-accept-alt**
|
||||
|
||||
Use alternate accept command.
|
||||
|
||||
**Default**: Shift+Return
|
||||
**Default**: Shift+Return
|
||||
|
||||
### **kb-delete-entry**
|
||||
|
||||
Delete entry from history
|
||||
|
||||
**Default**: Shift+Delete
|
||||
**Default**: Shift+Delete
|
||||
|
||||
### **kb-mode-next**
|
||||
|
||||
Switch to the next mode.
|
||||
|
||||
**Default**: Shift+Right,Control+Tab
|
||||
**Default**: Shift+Right,Control+Tab
|
||||
|
||||
### **kb-mode-previous**
|
||||
|
||||
Switch to the previous mode.
|
||||
|
||||
**Default**: Shift+Left,Control+ISO_Left_Tab
|
||||
**Default**: Shift+Left,Control+ISO\_Left\_Tab
|
||||
|
||||
### **kb-mode-complete**
|
||||
|
||||
Start completion for mode.
|
||||
|
||||
**Default**: Control+l
|
||||
**Default**: Control+l
|
||||
|
||||
### **kb-row-left**
|
||||
|
||||
Go to the previous column
|
||||
|
||||
**Default**: Control+Page_Up
|
||||
**Default**: Control+Page\_Up
|
||||
|
||||
### **kb-row-right**
|
||||
|
||||
Go to the next column
|
||||
|
||||
**Default**: Control+Page_Down
|
||||
**Default**: Control+Page\_Down
|
||||
|
||||
### **kb-row-up**
|
||||
|
||||
Select previous entry
|
||||
|
||||
**Default**: Up,Control+p
|
||||
**Default**: Up,Control+p
|
||||
|
||||
### **kb-row-down**
|
||||
|
||||
Select next entry
|
||||
|
||||
**Default**: Down,Control+n
|
||||
**Default**: Down,Control+n
|
||||
|
||||
### **kb-row-tab**
|
||||
|
||||
Go to next row, if one left, accept it, if no left next mode.
|
||||
|
||||
**Default**:
|
||||
**Default**:
|
||||
|
||||
### **kb-element-next**
|
||||
|
||||
Go to next row.
|
||||
|
||||
**Default**: Tab
|
||||
**Default**: Tab
|
||||
|
||||
### **kb-element-prev**
|
||||
|
||||
Go to previous row.
|
||||
|
||||
**Default**: ISO_Left_Tab
|
||||
**Default**: ISO\_Left\_Tab
|
||||
|
||||
### **kb-page-prev**
|
||||
|
||||
Go to the previous page
|
||||
|
||||
**Default**: Page_Up
|
||||
**Default**: Page\_Up
|
||||
|
||||
### **kb-page-next**
|
||||
|
||||
Go to the next page
|
||||
|
||||
**Default**: Page_Down
|
||||
**Default**: Page\_Down
|
||||
|
||||
### **kb-row-first**
|
||||
|
||||
Go to the first entry
|
||||
|
||||
**Default**: Home,KP_Home
|
||||
**Default**: Home,KP\_Home
|
||||
|
||||
### **kb-row-last**
|
||||
|
||||
Go to the last entry
|
||||
|
||||
**Default**: End,KP_End
|
||||
**Default**: End,KP\_End
|
||||
|
||||
### **kb-row-select**
|
||||
|
||||
Set selected item as input text
|
||||
|
||||
**Default**: Control+space
|
||||
**Default**: Control+space
|
||||
|
||||
### **kb-screenshot**
|
||||
|
||||
Take a screenshot of the rofi window
|
||||
|
||||
**Default**: Alt+S
|
||||
**Default**: Alt+S
|
||||
|
||||
### **kb-ellipsize**
|
||||
|
||||
Toggle between ellipsize modes for displayed data
|
||||
|
||||
**Default**: Alt+period
|
||||
**Default**: Alt+period
|
||||
|
||||
### **kb-toggle-case-sensitivity**
|
||||
|
||||
Toggle case sensitivity
|
||||
|
||||
**Default**: grave,dead_grave
|
||||
**Default**: grave,dead\_grave
|
||||
|
||||
### **kb-toggle-sort**
|
||||
|
||||
Toggle sort
|
||||
|
||||
**Default**: Alt+grave
|
||||
**Default**: Alt+grave
|
||||
|
||||
### **kb-cancel**
|
||||
|
||||
Quit rofi
|
||||
|
||||
**Default**: Escape,Control+g,Control+bracketleft
|
||||
**Default**: Escape,Control+g,Control+bracketleft
|
||||
|
||||
### **kb-custom-1**
|
||||
|
||||
Custom keybinding 1
|
||||
|
||||
**Default**: Alt+1
|
||||
**Default**: Alt+1
|
||||
|
||||
### **kb-custom-2**
|
||||
|
||||
Custom keybinding 2
|
||||
|
||||
**Default**: Alt+2
|
||||
**Default**: Alt+2
|
||||
|
||||
### **kb-custom-3**
|
||||
|
||||
Custom keybinding 3
|
||||
|
||||
**Default**: Alt+3
|
||||
**Default**: Alt+3
|
||||
|
||||
### **kb-custom-4**
|
||||
|
||||
Custom keybinding 4
|
||||
|
||||
**Default**: Alt+4
|
||||
**Default**: Alt+4
|
||||
|
||||
### **kb-custom-5**
|
||||
|
||||
Custom Keybinding 5
|
||||
|
||||
**Default**: Alt+5
|
||||
**Default**: Alt+5
|
||||
|
||||
### **kb-custom-6**
|
||||
|
||||
Custom keybinding 6
|
||||
|
||||
**Default**: Alt+6
|
||||
**Default**: Alt+6
|
||||
|
||||
### **kb-custom-7**
|
||||
|
||||
Custom Keybinding 7
|
||||
|
||||
**Default**: Alt+7
|
||||
**Default**: Alt+7
|
||||
|
||||
### **kb-custom-8**
|
||||
|
||||
Custom keybinding 8
|
||||
|
||||
**Default**: Alt+8
|
||||
**Default**: Alt+8
|
||||
|
||||
### **kb-custom-9**
|
||||
|
||||
Custom keybinding 9
|
||||
|
||||
**Default**: Alt+9
|
||||
**Default**: Alt+9
|
||||
|
||||
### **kb-custom-10**
|
||||
|
||||
Custom keybinding 10
|
||||
|
||||
**Default**: Alt+0
|
||||
**Default**: Alt+0
|
||||
|
||||
### **kb-custom-11**
|
||||
|
||||
Custom keybinding 11
|
||||
|
||||
**Default**: Alt+exclam
|
||||
**Default**: Alt+exclam
|
||||
|
||||
### **kb-custom-12**
|
||||
|
||||
Custom keybinding 12
|
||||
|
||||
**Default**: Alt+at
|
||||
**Default**: Alt+at
|
||||
|
||||
### **kb-custom-13**
|
||||
|
||||
Custom keybinding 13
|
||||
|
||||
**Default**: Alt+numbersign
|
||||
**Default**: Alt+numbersign
|
||||
|
||||
### **kb-custom-14**
|
||||
|
||||
Custom keybinding 14
|
||||
|
||||
**Default**: Alt+dollar
|
||||
**Default**: Alt+dollar
|
||||
|
||||
### **kb-custom-15**
|
||||
|
||||
Custom keybinding 15
|
||||
|
||||
**Default**: Alt+percent
|
||||
**Default**: Alt+percent
|
||||
|
||||
### **kb-custom-16**
|
||||
|
||||
Custom keybinding 16
|
||||
|
||||
**Default**: Alt+dead_circumflex
|
||||
**Default**: Alt+dead\_circumflex
|
||||
|
||||
### **kb-custom-17**
|
||||
|
||||
Custom keybinding 17
|
||||
|
||||
**Default**: Alt+ampersand
|
||||
**Default**: Alt+ampersand
|
||||
|
||||
### **kb-custom-18**
|
||||
|
||||
Custom keybinding 18
|
||||
|
||||
**Default**: Alt+asterisk
|
||||
**Default**: Alt+asterisk
|
||||
|
||||
### **kb-custom-19**
|
||||
|
||||
Custom Keybinding 19
|
||||
|
||||
**Default**: Alt+parenleft
|
||||
**Default**: Alt+parenleft
|
||||
|
||||
### **kb-select-1**
|
||||
|
||||
Select row 1
|
||||
|
||||
**Default**: Super+1
|
||||
**Default**: Super+1
|
||||
|
||||
### **kb-select-2**
|
||||
|
||||
Select row 2
|
||||
|
||||
**Default**: Super+2
|
||||
**Default**: Super+2
|
||||
|
||||
### **kb-select-3**
|
||||
|
||||
Select row 3
|
||||
|
||||
**Default**: Super+3
|
||||
**Default**: Super+3
|
||||
|
||||
### **kb-select-4**
|
||||
|
||||
Select row 4
|
||||
|
||||
**Default**: Super+4
|
||||
**Default**: Super+4
|
||||
|
||||
### **kb-select-5**
|
||||
|
||||
Select row 5
|
||||
|
||||
**Default**: Super+5
|
||||
**Default**: Super+5
|
||||
|
||||
### **kb-select-6**
|
||||
|
||||
Select row 6
|
||||
|
||||
**Default**: Super+6
|
||||
**Default**: Super+6
|
||||
|
||||
### **kb-select-7**
|
||||
|
||||
Select row 7
|
||||
|
||||
**Default**: Super+7
|
||||
**Default**: Super+7
|
||||
|
||||
### **kb-select-8**
|
||||
|
||||
Select row 8
|
||||
|
||||
**Default**: Super+8
|
||||
**Default**: Super+8
|
||||
|
||||
### **kb-select-9**
|
||||
|
||||
Select row 9
|
||||
|
||||
**Default**: Super+9
|
||||
**Default**: Super+9
|
||||
|
||||
### **kb-select-10**
|
||||
|
||||
Select row 10
|
||||
|
||||
**Default**: Super+0
|
||||
**Default**: Super+0
|
||||
|
||||
### **kb-entry-history-up**
|
||||
|
||||
Go up in the entry history.
|
||||
|
||||
**Default**: Control+Up
|
||||
|
||||
### **kb-entry-history-down**
|
||||
|
||||
Go down in the entry history.
|
||||
|
||||
**Default**: Control+Down
|
||||
|
@ -428,44 +498,50 @@ Go down in the entry history.
|
|||
## Mouse Bindings
|
||||
|
||||
### **ml-row-left**
|
||||
|
||||
Go to the previous column
|
||||
|
||||
**Default**: ScrollLeft
|
||||
**Default**: ScrollLeft
|
||||
|
||||
### **ml-row-right**
|
||||
|
||||
Go to the next column
|
||||
|
||||
**Default**: ScrollRight
|
||||
**Default**: ScrollRight
|
||||
|
||||
### **ml-row-up**
|
||||
|
||||
Select previous entry
|
||||
|
||||
**Default**: ScrollUp
|
||||
**Default**: ScrollUp
|
||||
|
||||
### **ml-row-down**
|
||||
|
||||
Select next entry
|
||||
|
||||
**Default**: ScrollDown
|
||||
**Default**: ScrollDown
|
||||
|
||||
### **me-select-entry**
|
||||
|
||||
Select hovered row
|
||||
|
||||
**Default**: MousePrimary
|
||||
**Default**: MousePrimary
|
||||
|
||||
### **me-accept-entry**
|
||||
|
||||
Accept hovered row
|
||||
|
||||
**Default**: MouseDPrimary
|
||||
**Default**: MouseDPrimary
|
||||
|
||||
### **me-accept-custom**
|
||||
|
||||
Accept hovered row with custom action
|
||||
|
||||
**Default**: Control+MouseDPrimary
|
||||
|
||||
**Default**: Control+MouseDPrimary
|
||||
|
||||
## 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
|
||||
|
||||
|
@ -475,7 +551,6 @@ Rasmus Steinke <rasi@xssn.at>
|
|||
|
||||
Morgane Glidic <sardemff7+rofi@sardemff7.net>
|
||||
|
||||
|
||||
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
|
||||
|
||||
For a full list of authors, check the AUTHORS file.
|
||||
|
|
|
@ -12,7 +12,8 @@ to make simple extensions to rofi.
|
|||
|
||||
.SH USAGE
|
||||
.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
|
||||
For example:
|
||||
|
@ -58,7 +59,8 @@ echo "quit"
|
|||
.RE
|
||||
|
||||
.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
|
||||
.PP
|
||||
|
@ -82,7 +84,8 @@ An integer number with the current state:
|
|||
|
||||
.SS \fB\fCROFI_INFO\fR
|
||||
.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
|
||||
.PP
|
||||
|
@ -90,8 +93,9 @@ Environment get set when script sets \fB\fCdata\fR option in header.
|
|||
|
||||
.SH Passing mode options
|
||||
.PP
|
||||
Extra options, like setting the prompt, can be set by the script.
|
||||
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.
|
||||
Extra options, like setting the prompt, can be set by the script. 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.
|
||||
|
||||
.PP
|
||||
For example to set the prompt:
|
||||
|
@ -116,30 +120,40 @@ The following extra options exists:
|
|||
.IP \(bu 2
|
||||
\fBmarkup-rows\fP: If 'true' renders markup in the row.
|
||||
.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
|
||||
\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
|
||||
\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
|
||||
\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
|
||||
\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
|
||||
\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
|
||||
\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
|
||||
\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
|
||||
\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
|
||||
|
||||
.SH Parsing row options
|
||||
.PP
|
||||
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.
|
||||
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.
|
||||
|
||||
.PP
|
||||
For example:
|
||||
|
@ -164,7 +178,8 @@ The following options are supported:
|
|||
.IP \(bu 2
|
||||
\fBnonselectable\fP: If true the row cannot activated.
|
||||
.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
|
||||
\fBurgent\fP: Set urgent flag on entry (true/false)
|
||||
.IP \(bu 2
|
||||
|
@ -186,8 +201,9 @@ multiple entries can be passed using the \fB\fC\\x1f\fR separator.
|
|||
|
||||
.SH Executing external program
|
||||
.PP
|
||||
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).
|
||||
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).
|
||||
|
||||
.PP
|
||||
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
|
||||
.PP
|
||||
If you use the \fB\fCdash\fR shell for your script, take special care with how dash handles escaped values for the separators.
|
||||
See issue #1201 on github.
|
||||
If you use the \fB\fCdash\fR shell for your script, take special care with how dash
|
||||
handles escaped values for the separators. See issue #1201 on github.
|
||||
|
||||
.SH Script locations
|
||||
.PP
|
||||
|
@ -223,13 +239,15 @@ Scripts located in the following location are loaded on startup:
|
|||
|
||||
.RS
|
||||
.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
|
||||
|
||||
.SH SEE ALSO
|
||||
.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
|
||||
.PP
|
||||
|
|
|
@ -4,21 +4,20 @@
|
|||
|
||||
**rofi script mode** - Rofi format for scriptable mode.
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
**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
|
||||
to make simple extensions to rofi.
|
||||
|
||||
|
||||
## 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:
|
||||
|
||||
```
|
||||
```bash
|
||||
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
|
||||
|
||||
|
@ -56,14 +56,15 @@ Rofi sets the following environment variable when executing the script:
|
|||
|
||||
An integer number with the current state:
|
||||
|
||||
* **0**: Initial call of script.
|
||||
* **1**: Selected an entry.
|
||||
* **2**: Selected a custom entry.
|
||||
* **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
|
||||
- **0**: Initial call of script.
|
||||
- **1**: Selected an entry.
|
||||
- **2**: Selected a custom entry.
|
||||
- **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
|
||||
|
||||
### `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`
|
||||
|
||||
|
@ -71,8 +72,9 @@ Environment get set when script sets `data` option in header.
|
|||
|
||||
## Passing mode options
|
||||
|
||||
Extra options, like setting the prompt, can be set by the script.
|
||||
Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value.
|
||||
Extra options, like setting the prompt, can be set by the script. Extra options
|
||||
are lines that start with a NULL character (`\0`) followed by a key, separator
|
||||
(`\x1f`) and value.
|
||||
|
||||
For example to set the prompt:
|
||||
|
||||
|
@ -82,23 +84,44 @@ For example to set the prompt:
|
|||
|
||||
The following extra options exists:
|
||||
|
||||
* **prompt**: Update the prompt text.
|
||||
* **message**: Update the message text.
|
||||
* **markup-rows**: If 'true' renders markup in the row.
|
||||
* **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)
|
||||
* **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.
|
||||
- **prompt**: Update the prompt text.
|
||||
|
||||
- **message**: Update the message text.
|
||||
|
||||
- **markup-rows**: If 'true' renders markup in the row.
|
||||
|
||||
- **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)
|
||||
|
||||
- **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
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
For example:
|
||||
|
||||
|
@ -108,12 +131,18 @@ For example:
|
|||
|
||||
The following options are supported:
|
||||
|
||||
* **icon**: Set the icon for that row.
|
||||
* **meta**: Specify invisible search terms.
|
||||
* **nonselectable**: If true the row cannot activated.
|
||||
* **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)
|
||||
- **icon**: Set the icon for that row.
|
||||
|
||||
- **meta**: Specify invisible search terms.
|
||||
|
||||
- **nonselectable**: If true the row cannot activated.
|
||||
|
||||
- **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.
|
||||
|
||||
|
@ -123,8 +152,9 @@ multiple entries can be passed using the `\x1f` separator.
|
|||
|
||||
## 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 not rofi will wait for its output (to display).
|
||||
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).
|
||||
|
||||
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 )
|
||||
```
|
||||
|
||||
|
||||
## DASH shell
|
||||
|
||||
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators.
|
||||
See issue #1201 on github.
|
||||
If you use the `dash` shell for your script, take special care with how dash
|
||||
handles escaped values for the separators. See issue #1201 on github.
|
||||
|
||||
## Script locations
|
||||
|
||||
To specify a script there are the following options:
|
||||
|
||||
* Specify an absolute path to the script.
|
||||
* The script is executable and located in your $PATH
|
||||
- Specify an absolute path to the script.
|
||||
- The script is executable and located in your $PATH
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
@ -161,7 +192,6 @@ Rasmus Steinke <rasi@xssn.at>
|
|||
|
||||
Morgane Glidic <sardemff7+rofi@sardemff7.net>
|
||||
|
||||
|
||||
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
|
||||
|
||||
For a full list of authors, check the AUTHORS file.
|
||||
|
|
Loading…
Reference in a new issue