mirror of
https://github.com/lbonn/rofi
synced 2024-11-10 06:14:14 +00:00
Merge remote-tracking branch 'upstream/next' into wayland
This commit is contained in:
commit
bb85634182
213 changed files with 25040 additions and 2415 deletions
|
@ -27,7 +27,7 @@ sources:
|
||||||
tasks:
|
tasks:
|
||||||
- setup: |
|
- setup: |
|
||||||
cd rofi
|
cd rofi
|
||||||
meson setup builddir .
|
meson setup builddir . -Db_lto=true
|
||||||
- build: |
|
- build: |
|
||||||
ninja -C rofi/builddir
|
ninja -C rofi/builddir
|
||||||
- test: |
|
- test: |
|
||||||
|
@ -38,4 +38,4 @@ tasks:
|
||||||
- dist: |
|
- dist: |
|
||||||
ninja -C rofi/builddir dist
|
ninja -C rofi/builddir dist
|
||||||
artifacts:
|
artifacts:
|
||||||
- rofi/builddir/meson-dist/rofi-1.7.3-dev.tar.xz
|
- rofi/builddir/meson-dist/rofi-1.7.5-dev.tar.xz
|
||||||
|
|
17
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
17
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
@ -88,5 +88,22 @@ body:
|
||||||
label: "Additional information"
|
label: "Additional information"
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: wayland
|
||||||
|
attributes:
|
||||||
|
label: Using wayland display server protocol
|
||||||
|
description: I have checked and confirm that I am not using wayland as display server protocol. See [here](https://github.com/DaveDavenport/rofi/wiki/Wayland) for more information.
|
||||||
|
options:
|
||||||
|
- label: "No, I don't use the wayland display server protocol"
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: latestversion
|
||||||
|
attributes:
|
||||||
|
label: I've checked if the issue exists in the latest stable release
|
||||||
|
description: I confirm that I verified the issue still exists in the latest stable release.
|
||||||
|
options:
|
||||||
|
- label: "Yes, I have checked the problem exists in the latest stable version"
|
||||||
|
required: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
4
.github/actions/autotools/action.yml
vendored
4
.github/actions/autotools/action.yml
vendored
|
@ -30,7 +30,7 @@ runs:
|
||||||
run: cd builddir && make distcheck
|
run: cd builddir && make distcheck
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: doxy
|
- id: doxy
|
||||||
run: cd builddir && make doxy 2>&1 > doxygen.log
|
run: cd builddir && make doxy > doxygen.log 2>&1
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: doxycheck
|
- id: doxycheck
|
||||||
uses: ./.github/actions/doxycheck
|
uses: ./.github/actions/doxycheck
|
||||||
|
@ -45,7 +45,7 @@ runs:
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
- id: upload
|
- id: upload
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: tarballs
|
name: tarballs
|
||||||
path: |
|
path: |
|
||||||
|
|
2
.github/actions/doxycheck/action.yml
vendored
2
.github/actions/doxycheck/action.yml
vendored
|
@ -20,5 +20,5 @@ runs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
python2 ./doxy-coverage/doxy-coverage.py builddir/doc/html/xml/
|
python ./doxy-coverage/doxy-coverage.py builddir/doc/html/xml/
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
3
.github/actions/setup/action.yml
vendored
3
.github/actions/setup/action.yml
vendored
|
@ -5,7 +5,7 @@ runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- id: python
|
- id: python
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
- id: apt
|
- id: apt
|
||||||
|
@ -31,6 +31,7 @@ runs:
|
||||||
libxcb-xkb-dev \
|
libxcb-xkb-dev \
|
||||||
libxcb-xrm-dev \
|
libxcb-xrm-dev \
|
||||||
libxcb-cursor-dev \
|
libxcb-cursor-dev \
|
||||||
|
libxcb-imdkit-dev \
|
||||||
libxkbcommon-dev \
|
libxkbcommon-dev \
|
||||||
libxkbcommon-dev \
|
libxkbcommon-dev \
|
||||||
libxkbcommon-x11-dev \
|
libxkbcommon-x11-dev \
|
||||||
|
|
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
build-meson-gcc:
|
build-meson-gcc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
|
@ -28,7 +28,7 @@ jobs:
|
||||||
build-meson-clang:
|
build-meson-clang:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
|
@ -38,7 +38,7 @@ jobs:
|
||||||
build-meson-gcc-wayland:
|
build-meson-gcc-wayland:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
|
@ -49,7 +49,7 @@ jobs:
|
||||||
build-meson-gcc-xcb:
|
build-meson-gcc-xcb:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
|
|
57
.github/workflows/codeql.yml
vendored
Normal file
57
.github/workflows/codeql.yml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'next', 'master' ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ 'next' ]
|
||||||
|
schedule:
|
||||||
|
- cron: '59 13 * * 3'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'cpp' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||||
|
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||||
|
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||||
|
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- uses: ./.github/actions/setup
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
|
||||||
|
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||||
|
# queries: security-extended,security-and-quality
|
||||||
|
|
||||||
|
- uses: ./.github/actions/meson
|
||||||
|
with:
|
||||||
|
cc: gcc
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
with:
|
||||||
|
category: "/language:${{matrix.language}}"
|
20
.github/workflows/mkdocs.yml
vendored
Normal file
20
.github/workflows/mkdocs.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
name: Publish docs via GitHub Pages
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- sphinx
|
||||||
|
- next
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Deploy docs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout master
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Deploy docs
|
||||||
|
uses: mhausenblas/mkdocs-deploy-gh-pages@master
|
||||||
|
env:
|
||||||
|
CONFIG_FILE: mkdocs/mkdocs.yml
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +1,6 @@
|
||||||
/build/
|
/build*/
|
||||||
|
/.cache/
|
||||||
|
/.vscode/
|
||||||
|
|
||||||
# autotools generated files
|
# autotools generated files
|
||||||
/missing
|
/missing
|
||||||
|
|
116
CONFIG.md
116
CONFIG.md
|
@ -1,31 +1,19 @@
|
||||||
> # :warning: This page does not describe all of **ROFI**'s configuration options, just the most common usecase. For the full configuration options, check the manpages.
|
> This page does not describe all of **ROFI**'s configuration options, just the
|
||||||
|
> most common usecase. For the full configuration options, check the manpages.
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
## Where does the configuration live
|
||||||
## :exclamation: Upgrade from old configuration format to new :exclamation:
|
|
||||||
|
|
||||||
In release after '2 Jan 2020' you can convert to the new configuration format by using the following command:
|
Rofi's configurations, custom themes live in `${XDG_CONFIG_HOME}/rofi/`, on
|
||||||
|
most systems this is `~/.config/rofi/`.
|
||||||
```bash
|
|
||||||
rofi -upgrade-config
|
|
||||||
```
|
|
||||||
|
|
||||||
This will create `~/.config/rofi/config.rasi` (or the default location for your system) with the previously configured options.
|
|
||||||
|
|
||||||
From 1.7.0 the old configuration format is no longer supported and the `-upgrade-config` option is no longer available.
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
# Where does the configuration live
|
|
||||||
|
|
||||||
Rofi's configurations, custom themes live in `${XDG_CONFIG_HOME}/rofi/`, on most systems this is `~/.config/rofi/`.
|
|
||||||
|
|
||||||
The name of the main configuration file is `config.rasi`. (`~/.config/rofi/config.rasi`).
|
The name of the main configuration file is `config.rasi`. (`~/.config/rofi/config.rasi`).
|
||||||
|
|
||||||
# Create an empty configuration file
|
## Create an empty configuration file
|
||||||
|
|
||||||
Open `~/.config/rofi/config.rasi` in your favorite text editor and add the following block:
|
Open `~/.config/rofi/config.rasi` in your favorite text editor and add the
|
||||||
|
following block:
|
||||||
|
|
||||||
```css
|
```css
|
||||||
configuration {
|
configuration {
|
||||||
|
@ -34,9 +22,10 @@ configuration {
|
||||||
```
|
```
|
||||||
You can now set the options in the `configuration` block.
|
You can now set the options in the `configuration` block.
|
||||||
|
|
||||||
# Create a configuration file from current setup
|
## Create a configuration file from current setup
|
||||||
|
|
||||||
If you do not want to start from scratch, or want to migrate from older configuration format, you can get tell rofi to dumps it configuration:
|
If you do not want to start from scratch, or want to migrate from older
|
||||||
|
configuration format, you can get tell rofi to dumps it configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rofi -dump-config > ~/.config/rofi/config.rasi
|
rofi -dump-config > ~/.config/rofi/config.rasi
|
||||||
|
@ -62,60 +51,68 @@ configuration {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
# Configuration file format
|
To create a copy of the current theme, you can run:
|
||||||
|
|
||||||
## Encoding
|
```bash
|
||||||
|
rofi -dump-theme > ~/.config/rofi/current.rasi
|
||||||
|
```
|
||||||
|
|
||||||
The encoding of the file is utf-8. Both Unix (`\n`) and windows (`\r\n`) newlines format are supported. But Unix is preferred.
|
## Configuration file format
|
||||||
|
|
||||||
## Comments
|
### Encoding
|
||||||
|
|
||||||
|
The encoding of the file is utf-8. Both Unix (`\n`) and windows (`\r\n`)
|
||||||
|
newlines format are supported. But Unix is preferred.
|
||||||
|
|
||||||
|
### Comments
|
||||||
|
|
||||||
C and C++ file comments are supported.
|
C and C++ file comments are supported.
|
||||||
|
|
||||||
* Anything after `// ` and before a newline is considered a comment.
|
- Anything after `// ` and before a newline is considered a comment.
|
||||||
* Everything between `/*` and `*/` is a comment.
|
- Everything between `/*` and `*/` is a comment.
|
||||||
|
|
||||||
Comments can be nested and the C comments can be inline.
|
Comments can be nested and the C comments can be inline.
|
||||||
|
|
||||||
The following is valid:
|
The following is valid:
|
||||||
|
|
||||||
```
|
```css
|
||||||
// Magic comment.
|
// Magic comment.
|
||||||
property: /* comment */ value;
|
property: /* comment */ value;
|
||||||
```
|
```
|
||||||
|
|
||||||
However, this is not:
|
However, this is not:
|
||||||
|
|
||||||
```
|
```css
|
||||||
prop/*comment*/erty: value;
|
prop/*comment*/erty: value;
|
||||||
```
|
```
|
||||||
|
|
||||||
## White space
|
### White space
|
||||||
|
|
||||||
White space and newlines, like comments, are ignored by the parser.
|
White space and newlines, like comments, are ignored by the parser.
|
||||||
|
|
||||||
This:
|
This:
|
||||||
|
|
||||||
```
|
```css
|
||||||
property: name;
|
property: name;
|
||||||
```
|
```
|
||||||
|
|
||||||
Is identical to:
|
Is identical to:
|
||||||
|
|
||||||
```
|
```css
|
||||||
property :
|
property :
|
||||||
name
|
name
|
||||||
|
|
||||||
;
|
;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Data types
|
### Data types
|
||||||
|
|
||||||
**ROFI**'s configuration supports several data formats:
|
**ROFI**'s configuration supports several data formats:
|
||||||
|
|
||||||
### String
|
#### String
|
||||||
|
|
||||||
A string is always surrounded by double quotes (`"`). Between the quotes there can be any printable character.
|
A string is always surrounded by double quotes (`"`). Between the quotes there
|
||||||
|
can be any printable character.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@ -124,17 +121,17 @@ For example:
|
||||||
ml-row-down: "ScrollDown";
|
ml-row-down: "ScrollDown";
|
||||||
```
|
```
|
||||||
|
|
||||||
### Number
|
#### Number
|
||||||
|
|
||||||
An integer may contain any full number.
|
An integer may contain any full number.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
```css
|
||||||
eh: 2;
|
eh: 2;
|
||||||
```
|
```
|
||||||
|
|
||||||
### Boolean
|
#### Boolean
|
||||||
|
|
||||||
Boolean value is either `true` or `false`. This is case-sensitive.
|
Boolean value is either `true` or `false`. This is case-sensitive.
|
||||||
|
|
||||||
|
@ -144,23 +141,25 @@ For example:
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
```
|
```
|
||||||
|
|
||||||
This is equal to the `-show-icons` option on the commandline, and `show-icons: false;` is equal to `-no-show-icons`.
|
This is equal to the `-show-icons` option on the commandline, and `show-icons:
|
||||||
|
false;` is equal to `-no-show-icons`.
|
||||||
|
|
||||||
### Character
|
#### Character
|
||||||
|
|
||||||
Character value is always surrounded by single quotes (') and should contain a single character.
|
Character value is always surrounded by single quotes (') and should contain a
|
||||||
It supports escaping.
|
single character. It supports escaping.
|
||||||
|
|
||||||
```css
|
```css
|
||||||
matching-negate-char: '-';
|
matching-negate-char: '-';
|
||||||
```
|
```
|
||||||
|
|
||||||
### List
|
#### List
|
||||||
|
|
||||||
This is not supported by the old configuration system, but can be used in the **rasi** format.
|
This is not supported by the old configuration system, but can be used in the
|
||||||
|
**rasi** format.
|
||||||
|
|
||||||
A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated.
|
A list starts with a '[' and ends with a ']'. The entries in the list are
|
||||||
The entry in the list single ASCII words.
|
comma-separated. The entry in the list single ASCII words.
|
||||||
|
|
||||||
```css
|
```css
|
||||||
combi-modes: [window,drun];
|
combi-modes: [window,drun];
|
||||||
|
@ -171,21 +170,23 @@ For older versions you have :
|
||||||
combi-modes: "window,drun";
|
combi-modes: "window,drun";
|
||||||
```
|
```
|
||||||
|
|
||||||
# Get a list of all possible options
|
## Get a list of all possible options
|
||||||
|
|
||||||
There are 2 ways to get a list of all options:
|
There are 2 ways to get a list of all options:
|
||||||
|
|
||||||
1. Dump the configuration file explained above. (`rofi -dump-config`)
|
1. Dump the configuration file explained above. (`rofi -dump-config`)
|
||||||
2. Look at output of `rofi -h`.
|
1. Look at output of `rofi -h`.
|
||||||
|
|
||||||
To see what values an option support check the manpage, it describes most of them.
|
To see what values an option support check the manpage, it describes most of
|
||||||
|
them.
|
||||||
|
|
||||||
NOTE: not all options might be in the manpage, as options can be added at run-time. (f.e. by plugins).
|
NOTE: not all options might be in the manpage, as options can be added at
|
||||||
|
run-time. (f.e. by plugins).
|
||||||
|
|
||||||
|
## Splitting configuration over multiple files
|
||||||
|
|
||||||
# Splitting configuration over multiple files
|
It is possible to split configuration over multiple files using imports. For
|
||||||
|
example in `~/.config/rofi/config.rasi`
|
||||||
It is possible to split configuration over multiple files using imports. For example in `~/.config/rofi/config.rasi`
|
|
||||||
|
|
||||||
```css
|
```css
|
||||||
configuration {
|
configuration {
|
||||||
|
@ -195,6 +196,7 @@ configuration {
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Rofi will first parse the config block in `~/.config/rofi/config.rasi`, then parse `~/.config/rofi/myConfig.rasi` and then load the theme `myTheme`.\
|
Rofi will first parse the config block in `~/.config/rofi/config.rasi`, then
|
||||||
More information can be obtained from **Themes** section\
|
parse `~/.config/rofi/myConfig.rasi` and then load the theme `myTheme`. More
|
||||||
Imports can be nested.
|
information can be obtained from the **rofi-theme(5)** manpage. Imports can be
|
||||||
|
nested.
|
||||||
|
|
2
COPYING
2
COPYING
|
@ -1,5 +1,5 @@
|
||||||
MIT/X11 License
|
MIT/X11 License
|
||||||
Modified 2013-2022 Qball Cow <qball@gmpclient.org>
|
Modified 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
Copyright (c) 2012 Sean Pringle <sean.pringle@gmail.com>
|
Copyright (c) 2012 Sean Pringle <sean.pringle@gmail.com>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|
|
@ -8,7 +8,7 @@ fi
|
||||||
if [ "$@" ]
|
if [ "$@" ]
|
||||||
then
|
then
|
||||||
# Override the previously set prompt.
|
# Override the previously set prompt.
|
||||||
echo -en "\0theme\x1felement-text { background-color: "$@";}\n"
|
echo -en "\0theme\x1felement-text { background-color: $@;}\n"
|
||||||
echo -en "\0keep-selection\x1ftrue\n"
|
echo -en "\0keep-selection\x1ftrue\n"
|
||||||
# echo -en "\0new-selection\x1f2\n"
|
# echo -en "\0new-selection\x1f2\n"
|
||||||
echo "red"
|
echo "red"
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ "$@" = "quit" ]
|
if [[ "$@" = "quit" ]]
|
||||||
then
|
then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Override the previously set prompt.
|
# Override the previously set prompt.
|
||||||
# We only want to do this on first call of script.
|
# We only want to do this on first call of script.
|
||||||
if [ $ROFI_RETV = 0 ]
|
if [[ $ROFI_RETV = 0 ]]
|
||||||
then
|
then
|
||||||
echo -en "\x00delim\x1f\\x1\n"
|
echo -en "\x00delim\x1f\\x1\n"
|
||||||
fi
|
fi
|
||||||
|
echo -en "\x00message\x1fmy line1\nmyline2\nmy line3\x1"
|
||||||
echo -en "\x00prompt\x1fChange prompt\x1"
|
echo -en "\x00prompt\x1fChange prompt\x1"
|
||||||
for a in {1..10}
|
for a in {1..10}
|
||||||
do
|
do
|
||||||
|
|
153
INSTALL.md
153
INSTALL.md
|
@ -1,6 +1,7 @@
|
||||||
# Installation guide
|
# Installation guide
|
||||||
|
|
||||||
This guide explains how to install rofi using its build system and how you can make debug builds.
|
This guide explains how to install rofi using its build system and how you can
|
||||||
|
make debug builds.
|
||||||
|
|
||||||
Rofi uses autotools (GNU Build system), for more information see
|
Rofi uses autotools (GNU Build system), for more information see
|
||||||
[here](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html).
|
[here](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html).
|
||||||
|
@ -8,40 +9,64 @@ You can also use [Meson](https://mesonbuild.com/) as an alternative.
|
||||||
|
|
||||||
## DEPENDENCY
|
## DEPENDENCY
|
||||||
|
|
||||||
### For building:
|
### For building
|
||||||
|
|
||||||
* C compiler that supports the c99 standard. (gcc or clang)
|
- C compiler that supports the c99 standard. (gcc or clang)
|
||||||
* make
|
|
||||||
* autoconf
|
- make
|
||||||
* automake (1.11.3 or up)
|
|
||||||
* pkg-config
|
- autoconf
|
||||||
* flex 2.5.39 or higher
|
|
||||||
* bison
|
- automake (1.11.3 or up)
|
||||||
* check (Can be disabled using the `--disable-check` configure flag)
|
|
||||||
|
- pkg-config
|
||||||
|
|
||||||
|
- flex 2.5.39 or higher
|
||||||
|
|
||||||
|
- bison
|
||||||
|
|
||||||
|
- check (Can be disabled using the `--disable-check` configure flag)
|
||||||
check is used for build-time tests and does not affect functionality.
|
check is used for build-time tests and does not affect functionality.
|
||||||
* Developer packages of the external libraries
|
|
||||||
* glib-compile-resources
|
- Developer packages of the external libraries
|
||||||
|
|
||||||
|
- glib-compile-resources
|
||||||
|
|
||||||
### External libraries
|
### External libraries
|
||||||
|
|
||||||
* libpango >= 1.50
|
- libpango >= 1.50
|
||||||
* libpangocairo
|
|
||||||
* libcairo
|
|
||||||
* libcairo-xcb
|
|
||||||
* libglib2.0 >= 2.68
|
|
||||||
* gmodule-2.0
|
|
||||||
* gio-unix-2.0
|
|
||||||
* libgdk-pixbuf-2.0
|
|
||||||
* libstartup-notification-1.0
|
|
||||||
* libxkbcommon >= 0.4.1
|
|
||||||
* libxkbcommon-x11
|
|
||||||
* libxcb (sometimes split, you need libxcb, libxcb-xkb and libxcb-randr libxcb-xinerama)
|
|
||||||
* xcb-util
|
|
||||||
* xcb-util-wm (sometimes split as libxcb-ewmh and libxcb-icccm)
|
|
||||||
* xcb-util-cursor
|
|
||||||
|
|
||||||
On debian based systems, the developer packages are in the form of: `<package>-dev` on rpm based
|
- libpangocairo
|
||||||
`<package>-devel`.
|
|
||||||
|
- libcairo
|
||||||
|
|
||||||
|
- libcairo-xcb
|
||||||
|
|
||||||
|
- libglib2.0 >= 2.68
|
||||||
|
- gmodule-2.0
|
||||||
|
- gio-unix-2.0
|
||||||
|
|
||||||
|
- libgdk-pixbuf-2.0
|
||||||
|
|
||||||
|
- libstartup-notification-1.0
|
||||||
|
|
||||||
|
- libxkbcommon >= 0.4.1
|
||||||
|
|
||||||
|
- libxkbcommon-x11
|
||||||
|
|
||||||
|
- libxcb (sometimes split, you need libxcb, libxcb-xkb and libxcb-randr
|
||||||
|
libxcb-xinerama)
|
||||||
|
|
||||||
|
- xcb-util
|
||||||
|
|
||||||
|
- xcb-util-wm (sometimes split as libxcb-ewmh and libxcb-icccm)
|
||||||
|
|
||||||
|
- xcb-util-cursor
|
||||||
|
|
||||||
|
- xcb-imdkit (optional, 1.0.3 or up preferred)
|
||||||
|
|
||||||
|
On debian based systems, the developer packages are in the form of:
|
||||||
|
`<package>-dev` on rpm based `<package>-devel`.
|
||||||
|
|
||||||
For wayland support:
|
For wayland support:
|
||||||
|
|
||||||
|
@ -54,94 +79,127 @@ For wayland support:
|
||||||
|
|
||||||
Create a build directory and enter it:
|
Create a build directory and enter it:
|
||||||
|
|
||||||
|
```bash
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
|
```
|
||||||
|
|
||||||
Check dependencies and configure build system:
|
Check dependencies and configure build system:
|
||||||
|
|
||||||
|
```bash
|
||||||
../configure
|
../configure
|
||||||
|
```
|
||||||
|
|
||||||
Build Rofi:
|
Build Rofi:
|
||||||
|
|
||||||
|
```bash
|
||||||
make
|
make
|
||||||
|
```
|
||||||
|
|
||||||
The actual install, execute as root (if needed):
|
The actual install, execute as root (if needed):
|
||||||
|
|
||||||
|
```bash
|
||||||
make install
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
The default installation prefix is: `/usr/local/` use `./configure --prefix={prefix}` to install into another location.
|
The default installation prefix is: `/usr/local/` use `./configure
|
||||||
|
--prefix={prefix}` to install into another location.
|
||||||
|
|
||||||
### Meson
|
### Meson
|
||||||
|
|
||||||
Check dependencies and configure build system:
|
Check dependencies and configure build system:
|
||||||
|
|
||||||
|
```bash
|
||||||
meson setup build
|
meson setup build
|
||||||
|
```
|
||||||
|
|
||||||
Build Rofi:
|
Build Rofi:
|
||||||
|
|
||||||
|
```bash
|
||||||
ninja -C build
|
ninja -C build
|
||||||
|
```
|
||||||
|
|
||||||
The actual install, execute as root (if needed):
|
The actual install, execute as root (if needed):
|
||||||
|
|
||||||
|
```bash
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
|
```
|
||||||
|
|
||||||
The default installation prefix is: `/usr/local/` use `meson setup build --prefix={prefix}` to install into another location.
|
The default installation prefix is: `/usr/local/` use `meson setup build
|
||||||
|
--prefix={prefix}` to install into another location.
|
||||||
|
|
||||||
## Install a checkout from git
|
## Install a checkout from git
|
||||||
|
|
||||||
The GitHub Pages version of these directions may be out of date. Please use
|
The GitHub Pages version of these directions may be out of date. Please use
|
||||||
[INSTALL.md from the online repo][master-install] or your local repository.
|
[INSTALL.md from the online repo][master-install] or your local repository.
|
||||||
|
|
||||||
[master-install]: https://github.com/DaveDavenport/rofi/blob/master/INSTALL.md#install-a-checkout-from-git
|
|
||||||
|
|
||||||
If you don't have a checkout:
|
If you don't have a checkout:
|
||||||
|
|
||||||
|
```bash
|
||||||
git clone --recursive https://github.com/DaveDavenport/rofi
|
git clone --recursive https://github.com/DaveDavenport/rofi
|
||||||
cd rofi/
|
cd rofi/
|
||||||
|
```
|
||||||
|
|
||||||
If you already have a checkout:
|
If you already have a checkout:
|
||||||
|
|
||||||
|
```bash
|
||||||
cd rofi/
|
cd rofi/
|
||||||
git pull
|
git pull
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
```
|
||||||
|
|
||||||
For Autotools you have an extra step, to generate build system:
|
For Autotools you have an extra step, to generate build system:
|
||||||
|
|
||||||
|
```bash
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
|
```
|
||||||
|
|
||||||
From this point, use the same steps you use for a release.
|
From this point, use the same steps you use for a release.
|
||||||
|
|
||||||
## Options for configure
|
## Options for configure
|
||||||
|
|
||||||
When you run the configure step there are several options you can configure.
|
When you run the configure step there are several options you can configure.
|
||||||
|
|
||||||
For Autotools, you can see the full list with `./configure --help`.
|
For Autotools, you can see the full list with `./configure --help`.
|
||||||
For Meson, before the initial setup, you can see rofi options in `meson_options.txt` and Meson options with `meson setup --help`.
|
|
||||||
After the initial setup, use `meson configure build`.
|
|
||||||
|
|
||||||
The most useful one to set the installation prefix:
|
For Meson, before the initial setup, you can see rofi options in
|
||||||
|
`meson_options.txt` and Meson options with `meson setup --help`. Meson's
|
||||||
|
built-in options can be set using regular command line arguments, like so:
|
||||||
|
`meson setup build --option=value`. Rofi-specific options can be set using the
|
||||||
|
`-D` argument, like so: `meson setup build -Doption=value`. After the build dir
|
||||||
|
is set up by `meson setup build`, the `meson configure build` command can be
|
||||||
|
used to configure options, by the same means.
|
||||||
|
|
||||||
|
The most useful one to set is the installation prefix:
|
||||||
|
|
||||||
|
```bash
|
||||||
# Autotools
|
# Autotools
|
||||||
../configure --prefix=<installation path>
|
../configure --prefix=<installation path>
|
||||||
|
|
||||||
# Meson
|
# Meson
|
||||||
meson setup build --prefix <installation path>
|
meson setup build --prefix <installation path>
|
||||||
|
```
|
||||||
|
|
||||||
f.e.
|
f.e.
|
||||||
|
|
||||||
|
```bash
|
||||||
# Autotools
|
# Autotools
|
||||||
../configure --prefix=/usr/
|
../configure --prefix=/usr/
|
||||||
|
|
||||||
# Meson
|
# Meson
|
||||||
meson setup build --prefix /usr
|
meson setup build --prefix /usr
|
||||||
|
```
|
||||||
|
|
||||||
### Install locally
|
### Install locally
|
||||||
|
|
||||||
or to install locally:
|
or to install locally:
|
||||||
|
|
||||||
|
```bash
|
||||||
# Autotools
|
# Autotools
|
||||||
../configure --prefix=${HOME}/.local/
|
../configure --prefix=${HOME}/.local/
|
||||||
|
|
||||||
# Meson
|
# Meson
|
||||||
meson setup build --prefix ${HOME}/.local
|
meson setup build --prefix ${HOME}/.local
|
||||||
|
```
|
||||||
|
|
||||||
## Options for make
|
## Options for make
|
||||||
|
|
||||||
|
@ -151,38 +209,47 @@ When you run make you can tweak the build process a little.
|
||||||
|
|
||||||
Show the commands called:
|
Show the commands called:
|
||||||
|
|
||||||
|
```bash
|
||||||
# Autotools
|
# Autotools
|
||||||
make V=1
|
make V=1
|
||||||
|
|
||||||
# Meson
|
# Meson
|
||||||
ninja -C build -v
|
ninja -C build -v
|
||||||
|
```
|
||||||
|
|
||||||
### Debug build
|
### Debug build
|
||||||
|
|
||||||
Compile with debug symbols and no optimization, this is useful for making backtraces:
|
Compile with debug symbols and no optimization, this is useful for making
|
||||||
|
backtraces:
|
||||||
|
|
||||||
|
```bash
|
||||||
# Autotools
|
# Autotools
|
||||||
make CFLAGS="-O0 -g3" clean rofi
|
make CFLAGS="-O0 -g3" clean rofi
|
||||||
|
|
||||||
# Meson
|
# Meson
|
||||||
meson configure build --debug
|
meson configure build --debug
|
||||||
ninja -C build
|
ninja -C build
|
||||||
|
```
|
||||||
|
|
||||||
### Get a backtrace
|
### Get a backtrace
|
||||||
|
|
||||||
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
|
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it
|
||||||
mouse. So if it crashes in GDB you are stuck.
|
grabs keyboard and mouse. So if it crashes in GDB you are stuck. The best way
|
||||||
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
|
to go is to enable core file. (ulimit -c unlimited in bash) then make rofi
|
||||||
can then load the core in GDB.
|
crash. You can then load the core in GDB.
|
||||||
|
|
||||||
|
```bash
|
||||||
# Autotools
|
# Autotools
|
||||||
gdb rofi core
|
gdb rofi core
|
||||||
|
|
||||||
# Meson (because it uses a separate build directory)
|
# Meson (because it uses a separate build directory)
|
||||||
gdb build/rofi core
|
gdb build/rofi core
|
||||||
|
```
|
||||||
|
|
||||||
> Where the core file is located and what its exact name is different on each distributions. Please consult the
|
> Where the core file is located and what its exact name is different on each
|
||||||
> relevant documentation.
|
> distributions. Please consult the relevant documentation.
|
||||||
|
|
||||||
|
For more information see the rofi-debugging(5) manpage.
|
||||||
|
|
||||||
## Install distribution
|
## Install distribution
|
||||||
|
|
||||||
|
|
16
Makefile.am
16
Makefile.am
|
@ -89,6 +89,7 @@ SOURCES=\
|
||||||
source/modes/script.c\
|
source/modes/script.c\
|
||||||
source/modes/help-keys.c\
|
source/modes/help-keys.c\
|
||||||
source/modes/filebrowser.c\
|
source/modes/filebrowser.c\
|
||||||
|
source/modes/recursivebrowser.c\
|
||||||
include/display.h\
|
include/display.h\
|
||||||
include/xcb.h\
|
include/xcb.h\
|
||||||
include/xcb-internal.h\
|
include/xcb-internal.h\
|
||||||
|
@ -126,6 +127,7 @@ SOURCES=\
|
||||||
include/modes/modes.h\
|
include/modes/modes.h\
|
||||||
include/modes/help-keys.h\
|
include/modes/help-keys.h\
|
||||||
include/modes/filebrowser.h\
|
include/modes/filebrowser.h\
|
||||||
|
include/modes/recursivebrowser.h\
|
||||||
include/modes/dmenuscriptshared.h\
|
include/modes/dmenuscriptshared.h\
|
||||||
resources/resources.c\
|
resources/resources.c\
|
||||||
resources/resources.h
|
resources/resources.h
|
||||||
|
@ -145,6 +147,7 @@ rofi_CFLAGS=\
|
||||||
$(libsn_CFLAGS)\
|
$(libsn_CFLAGS)\
|
||||||
$(cairo_CFLAGS)\
|
$(cairo_CFLAGS)\
|
||||||
$(gdkpixbuf_CFLAGS)\
|
$(gdkpixbuf_CFLAGS)\
|
||||||
|
$(imdclient_CFLAGS)\
|
||||||
-DMANPAGE_PATH="\"$(mandir)/\""\
|
-DMANPAGE_PATH="\"$(mandir)/\""\
|
||||||
-I$(top_srcdir)/include/\
|
-I$(top_srcdir)/include/\
|
||||||
-I$(top_builddir)/lexer/\
|
-I$(top_builddir)/lexer/\
|
||||||
|
@ -165,6 +168,7 @@ rofi_LDADD=\
|
||||||
$(pango_LIBS)\
|
$(pango_LIBS)\
|
||||||
$(cairo_LIBS)\
|
$(cairo_LIBS)\
|
||||||
$(gdkpixbuf_LIBS)\
|
$(gdkpixbuf_LIBS)\
|
||||||
|
$(imdclient_LIBS)\
|
||||||
$(LIBS)
|
$(LIBS)
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -212,7 +216,7 @@ theme_DATA=\
|
||||||
themes/dmenu.rasi\
|
themes/dmenu.rasi\
|
||||||
themes/docu.rasi\
|
themes/docu.rasi\
|
||||||
themes/glue_pro_blue.rasi\
|
themes/glue_pro_blue.rasi\
|
||||||
themes/gruvbox-common.rasi\
|
themes/gruvbox-common.rasinc\
|
||||||
themes/gruvbox-dark-hard.rasi\
|
themes/gruvbox-dark-hard.rasi\
|
||||||
themes/gruvbox-dark-soft.rasi\
|
themes/gruvbox-dark-soft.rasi\
|
||||||
themes/gruvbox-dark.rasi\
|
themes/gruvbox-dark.rasi\
|
||||||
|
@ -227,7 +231,10 @@ theme_DATA=\
|
||||||
themes/solarized.rasi\
|
themes/solarized.rasi\
|
||||||
themes/solarized_alternate.rasi\
|
themes/solarized_alternate.rasi\
|
||||||
themes/fancy.rasi\
|
themes/fancy.rasi\
|
||||||
|
themes/fancy2.rasi\
|
||||||
themes/iggy.rasi\
|
themes/iggy.rasi\
|
||||||
|
themes/material.rasi\
|
||||||
|
themes/fullscreen-preview.rasi\
|
||||||
themes/iggy.jpg
|
themes/iggy.jpg
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -285,6 +292,7 @@ history_test_CFLAGS=\
|
||||||
$(NKUTILS_CFLAGS)\
|
$(NKUTILS_CFLAGS)\
|
||||||
$(libsn_CFLAGS)\
|
$(libsn_CFLAGS)\
|
||||||
$(cairo_CFLAGS)\
|
$(cairo_CFLAGS)\
|
||||||
|
$(pango_CFLAGS)\
|
||||||
-DTHEME_DIR=\"$(themedir)\"\
|
-DTHEME_DIR=\"$(themedir)\"\
|
||||||
-DPLUGIN_PATH=\"${libdir}/rofi\"\
|
-DPLUGIN_PATH=\"${libdir}/rofi\"\
|
||||||
-I$(top_srcdir)/include/\
|
-I$(top_srcdir)/include/\
|
||||||
|
@ -293,6 +301,7 @@ history_test_CFLAGS=\
|
||||||
|
|
||||||
history_test_LDADD=\
|
history_test_LDADD=\
|
||||||
$(glib_LIBS)\
|
$(glib_LIBS)\
|
||||||
|
$(pango_LIBS)\
|
||||||
$(NKUTILS_LIBS)
|
$(NKUTILS_LIBS)
|
||||||
|
|
||||||
history_test_SOURCES=\
|
history_test_SOURCES=\
|
||||||
|
@ -314,6 +323,7 @@ textbox_test_CFLAGS=\
|
||||||
$(cairo_CFLAGS)\
|
$(cairo_CFLAGS)\
|
||||||
$(libsn_CFLAGS)\
|
$(libsn_CFLAGS)\
|
||||||
$(gdkpixbuf_CFLAGS)\
|
$(gdkpixbuf_CFLAGS)\
|
||||||
|
$(pango_CFLAGS)\
|
||||||
-DPLUGIN_PATH=\"${libdir}/rofi\"\
|
-DPLUGIN_PATH=\"${libdir}/rofi\"\
|
||||||
-DTHEME_DIR=\"$(themedir)\"\
|
-DTHEME_DIR=\"$(themedir)\"\
|
||||||
-I$(top_srcdir)/include/\
|
-I$(top_srcdir)/include/\
|
||||||
|
@ -329,6 +339,7 @@ textbox_test_LDADD=\
|
||||||
$(NKUTILS_LIBS)\
|
$(NKUTILS_LIBS)\
|
||||||
$(GW_XCB_LIBS)\
|
$(GW_XCB_LIBS)\
|
||||||
$(cairo_LIBS)\
|
$(cairo_LIBS)\
|
||||||
|
$(pango_LIBS)\
|
||||||
$(libsn_LIBS)
|
$(libsn_LIBS)
|
||||||
|
|
||||||
helper_pidfile_CFLAGS=$(textbox_test_CFLAGS)
|
helper_pidfile_CFLAGS=$(textbox_test_CFLAGS)
|
||||||
|
@ -626,7 +637,7 @@ coverage-clean:
|
||||||
.PHONY: .FORCE
|
.PHONY: .FORCE
|
||||||
.FORCE:
|
.FORCE:
|
||||||
|
|
||||||
icondir=$(datadir)/icons/hicolor/apps/
|
icondir=$(datadir)/icons/hicolor/scalable/apps/
|
||||||
icon_DATA=\
|
icon_DATA=\
|
||||||
data/rofi.svg
|
data/rofi.svg
|
||||||
|
|
||||||
|
@ -657,7 +668,6 @@ EXTRA_DIST += \
|
||||||
subprojects/libgwater/nl/libgwater-nl.c \
|
subprojects/libgwater/nl/libgwater-nl.c \
|
||||||
subprojects/libgwater/alsa-mixer/libgwater-alsa-mixer.h \
|
subprojects/libgwater/alsa-mixer/libgwater-alsa-mixer.h \
|
||||||
subprojects/libgwater/alsa-mixer/libgwater-alsa-mixer.c \
|
subprojects/libgwater/alsa-mixer/libgwater-alsa-mixer.c \
|
||||||
doc/meson_build_manpages.sh \
|
|
||||||
data/rofi.png\
|
data/rofi.png\
|
||||||
meson_options.txt \
|
meson_options.txt \
|
||||||
meson.build
|
meson.build
|
||||||
|
|
234
README.md
234
README.md
|
@ -7,101 +7,133 @@
|
||||||
<a href="https://repology.org/metapackage/rofi-wayland/versions"><img src="https://repology.org/badge/tiny-repos/rofi-wayland.svg"></a>
|
<a href="https://repology.org/metapackage/rofi-wayland/versions"><img src="https://repology.org/badge/tiny-repos/rofi-wayland.svg"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1 align="center">
|
<h1 align="center"> Rofi </h1>
|
||||||
Rofi
|
|
||||||
</h1>
|
|
||||||
<p align="center"><i>A window switcher, Application launcher and dmenu replacement</i>.</p>
|
<p align="center"><i>A window switcher, Application launcher and dmenu replacement</i>.</p>
|
||||||
|
|
||||||
https://user-images.githubusercontent.com/84911063/139428874-fe182dd6-82c6-49b8-8da1-920ddda3d1ed.mp4
|
https://user-images.githubusercontent.com/84911063/139428874-fe182dd6-82c6-49b8-8da1-920ddda3d1ed.mp4
|
||||||
|
|
||||||
|
|
||||||
**This is a fork of [Rofi](https://github.com/davatorium/rofi) with added support for Wayland via the [layer shell protocol](https://github.com/swaywm/wlr-protocols).**
|
**This is a fork of [Rofi](https://github.com/davatorium/rofi) with added support for Wayland via the [layer shell protocol](https://github.com/swaywm/wlr-protocols).**
|
||||||
**For more information, see the [Wayland support section](#wayland-support)**
|
**For more information, see the [Wayland support section](#wayland-support)**
|
||||||
|
|
||||||
**Rofi** started as a clone of simpleswitcher, written by [Sean Pringle](http://github.com/seanpringle/simpleswitcher) - a
|
**Rofi** started as a clone of simpleswitcher, written by [Sean
|
||||||
popup window switcher roughly based on [superswitcher](http://code.google.com/p/superswitcher/).
|
Pringle](http://github.com/seanpringle/simpleswitcher) - a popup window
|
||||||
Simpleswitcher laid the foundations, and therefore Sean Pringle deserves most of the credit for this tool. **Rofi**
|
switcher roughly based on
|
||||||
(renamed, as it lost the *simple* property) has been extended with extra features, like an application launcher and
|
[superswitcher](http://code.google.com/p/superswitcher/). Simpleswitcher laid
|
||||||
ssh-launcher, and can act as a drop-in dmenu replacement, making it a very versatile tool.
|
the foundations, and therefore Sean Pringle deserves most of the credit for
|
||||||
|
this tool. **Rofi** (renamed, as it lost the *simple* property) has been
|
||||||
|
extended with extra features, like an application launcher and ssh-launcher,
|
||||||
|
and can act as a drop-in dmenu replacement, making it a very versatile tool.
|
||||||
|
|
||||||
**Rofi**, like dmenu, will provide the user with a textual list of options where one or more can be selected.
|
**Rofi**, like dmenu, will provide the user with a textual list of options
|
||||||
This can either be running an application, selecting a window, or options provided by an external script.
|
where one or more can be selected.
|
||||||
|
This can either be running an application, selecting a window, or options
|
||||||
|
provided by an external script.
|
||||||
|
|
||||||
|
### What is rofi not?
|
||||||
## What is rofi not?
|
|
||||||
|
|
||||||
Rofi is not:
|
Rofi is not:
|
||||||
|
|
||||||
* A UI toolkit.
|
- A UI toolkit.
|
||||||
* A library to be used in other applications.
|
|
||||||
* An application that can support every possible use-case. It tries to be generic enough to be usable by everybody.
|
|
||||||
* Specific functionality can be added using scripts or plugins, many exists.
|
|
||||||
* Just a dmenu replacement. The dmenu functionality is a nice 'extra' to **rofi**, not its main purpose.
|
|
||||||
|
|
||||||
|
- A library to be used in other applications.
|
||||||
|
|
||||||
# Table of Contents
|
- An application that can support every possible use-case. It tries to be
|
||||||
|
generic enough to be usable by everybody.
|
||||||
|
- Specific functionality can be added using scripts or plugins, many exists.
|
||||||
|
|
||||||
|
- Just a dmenu replacement. The dmenu functionality is a nice 'extra' to
|
||||||
|
**rofi**, not its main purpose.
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
- [Features](#features)
|
- [Features](#features)
|
||||||
- [Modes](#modes)
|
- [Modes](#modes)
|
||||||
- [Manpages](#manpage)
|
- [Manpages](#manpage)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Quickstart](#quickstart)
|
- [Quickstart](#quickstart)
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
- [Themes](#themes)
|
- [Themes](#themes)
|
||||||
- [Screenshots](#screenshots)
|
- [Screenshots](#screenshots)
|
||||||
- [Wiki](#wiki)
|
- [Wiki](#wiki)
|
||||||
|
|
||||||
# Features
|
## Features
|
||||||
|
|
||||||
Its main features are:
|
Its main features are:
|
||||||
|
|
||||||
* Fully configurable keyboard navigation
|
- Fully configurable keyboard navigation
|
||||||
* Type to filter
|
|
||||||
* Tokenized: type any word in any order to filter
|
|
||||||
* Case insensitive (togglable)
|
|
||||||
* Support for fuzzy-, regex-, and glob matching
|
|
||||||
* UTF-8 enabled
|
|
||||||
* UTF-8-aware string collating
|
|
||||||
* International keyboard support (\`e -> è)
|
|
||||||
* RTL language support
|
|
||||||
* Cairo drawing and Pango font rendering
|
|
||||||
* Built-in modes:
|
|
||||||
* Window switcher mode
|
|
||||||
* EWMH compatible WM
|
|
||||||
* Application launcher
|
|
||||||
* Desktop file application launcher
|
|
||||||
* SSH launcher mode
|
|
||||||
* Combi mode, allowing several modes to be merged into one list
|
|
||||||
* History-based ordering — last 25 choices are ordered on top based on use (optional)
|
|
||||||
* Levenshtein distance or fzf like sorting of matches (optional)
|
|
||||||
* Drop-in dmenu replacement
|
|
||||||
* Many added improvements
|
|
||||||
* Easily extensible using scripts and plugins
|
|
||||||
* Advanced Theming
|
|
||||||
|
|
||||||
# Modes
|
- Type to filter
|
||||||
|
- Tokenized: type any word in any order to filter
|
||||||
|
- Case insensitive (togglable)
|
||||||
|
- Support for fuzzy-, regex-, prefix-, and glob-matching
|
||||||
|
|
||||||
**Rofi** has several built-in modes implementing common use cases and can be extended by scripts (either called from
|
- UTF-8 enabled
|
||||||
|
- UTF-8-aware string collating
|
||||||
|
- International keyboard support (\`e -> è)
|
||||||
|
|
||||||
|
- RTL language support
|
||||||
|
|
||||||
|
- Cairo drawing and Pango font rendering
|
||||||
|
|
||||||
|
- Built-in modes:
|
||||||
|
- Window switcher mode
|
||||||
|
- EWMH compatible WM
|
||||||
|
- Work arounds for i3,bspwm
|
||||||
|
|
||||||
|
- Application launcher
|
||||||
|
|
||||||
|
- Desktop file application launcher
|
||||||
|
|
||||||
|
- SSH launcher mode
|
||||||
|
|
||||||
|
- File browser
|
||||||
|
|
||||||
|
- Combi mode, allowing several modes to be merged into one list
|
||||||
|
|
||||||
|
- History-based ordering — last 25 choices are ordered on top based on use
|
||||||
|
(optional)
|
||||||
|
|
||||||
|
- Levenshtein distance or fzf like sorting of matches (optional)
|
||||||
|
|
||||||
|
- Drop-in dmenu replacement
|
||||||
|
- Many added improvements
|
||||||
|
|
||||||
|
- Easily extensible using scripts and plugins
|
||||||
|
|
||||||
|
- Advanced Theming
|
||||||
|
|
||||||
|
## Modes
|
||||||
|
|
||||||
|
**Rofi** has several built-in modes implementing common use cases and can be
|
||||||
|
extended by scripts (either called from
|
||||||
**Rofi** or calling **Rofi**) or plugins.
|
**Rofi** or calling **Rofi**) or plugins.
|
||||||
|
|
||||||
Below is a list of the different modes:
|
Below is a list of the different modes:
|
||||||
|
|
||||||
* **run**: launch applications from $PATH, with option to launch in terminal.
|
- **run**: launch applications from $PATH, with option to launch in terminal.
|
||||||
* **drun**: launch applications based on desktop files. It tries to be compliant to the XDG standard.
|
|
||||||
* **window**: Switch between windows on an EWMH compatible window manager.
|
- **drun**: launch applications based on desktop files. It tries to be
|
||||||
* **ssh**: Connect to a remote host via ssh.
|
compliant to the XDG standard.
|
||||||
* **file-browser**: A basic file-browser for opening files.
|
|
||||||
* **keys**: list internal keybindings.
|
- **window**: Switch between windows on an EWMH compatible window manager.
|
||||||
* **script**: Write (limited) custom mode using simple scripts.
|
|
||||||
* **combi**: Combine multiple modes into one.
|
- **ssh**: Connect to a remote host via ssh.
|
||||||
|
|
||||||
|
- **filebrowser**: A basic file-browser for opening files.
|
||||||
|
|
||||||
|
- **keys**: list internal keybindings.
|
||||||
|
|
||||||
|
- **script**: Write (limited) custom mode using simple scripts.
|
||||||
|
|
||||||
|
- **combi**: Combine multiple modes into one.
|
||||||
|
|
||||||
**Rofi** is known to work on Linux and BSD.
|
**Rofi** is known to work on Linux and BSD.
|
||||||
|
|
||||||
# Wayland support
|
## Wayland support
|
||||||
|
|
||||||
|
|
||||||
## Build
|
### Build
|
||||||
|
|
||||||
Please follow the [meson build instructions](INSTALL.md#meson) to build this fork, as autotools builds are not yet supported.
|
Please follow the [meson build instructions](INSTALL.md#meson) to build this fork, as autotools builds are not yet supported.
|
||||||
|
|
||||||
|
@ -111,7 +143,7 @@ rofi can also be built _without_ XCB:
|
||||||
|
|
||||||
meson build -Dxcb=disabled
|
meson build -Dxcb=disabled
|
||||||
|
|
||||||
## Usage
|
### Usage
|
||||||
|
|
||||||
**Rofi** options an configurations are compatible with this fork. It should automatically select the xcb or wayland backend depending on the environment it is run on.
|
**Rofi** options an configurations are compatible with this fork. It should automatically select the xcb or wayland backend depending on the environment it is run on.
|
||||||
|
|
||||||
|
@ -119,7 +151,7 @@ To force the use of the xcb backend (if enabled during build), the `-x11` option
|
||||||
|
|
||||||
rofi -x11 ...
|
rofi -x11 ...
|
||||||
|
|
||||||
## Differences with rofi (in wayland mode)
|
### Differences with rofi (in wayland mode)
|
||||||
|
|
||||||
* `-normal-window` flag in Wayland mode. Though it is also considered as a toy/deprecated feature in Upstream rofi
|
* `-normal-window` flag in Wayland mode. Though it is also considered as a toy/deprecated feature in Upstream rofi
|
||||||
* selecting which monitor to run rofi on in Wayland mode, rofi only shows up on the currently focused monitor
|
* selecting which monitor to run rofi on in Wayland mode, rofi only shows up on the currently focused monitor
|
||||||
|
@ -128,75 +160,87 @@ To force the use of the xcb backend (if enabled during build), the `-x11` option
|
||||||
|
|
||||||
Window switcher mode is now ready to use on compositors with support for wlr-foreign-toplevel-management.
|
Window switcher mode is now ready to use on compositors with support for wlr-foreign-toplevel-management.
|
||||||
|
|
||||||
# Manpage
|
## Manpage
|
||||||
|
|
||||||
For more up to date information, please see the manpages. The other sections and links might have outdated information as they have relatively less maintainance than the manpages. So, if you come across any issues please consult manpages, [discussion from upstream rofi](https://github.com/davatorium/rofi/discussions) and [issue tracker](https://github.com/lbonn/rofi/issues?q=) before filing new issue.
|
For more up to date information, please see the manpages. The other sections and links might have outdated information as they have relatively less maintainance than the manpages. So, if you come across any issues please consult manpages, [discussion from upstream rofi](https://github.com/davatorium/rofi/discussions) and [issue tracker](https://github.com/lbonn/rofi/issues?q=) before filing new issue.
|
||||||
|
|
||||||
* Manpages:
|
- Manpages:
|
||||||
* [rofi](doc/rofi.1.markdown)
|
- [rofi](doc/rofi.1.markdown)
|
||||||
* [rofi-theme](doc/rofi-theme.5.markdown)
|
- [rofi-theme](doc/rofi-theme.5.markdown)
|
||||||
* [rofi-debugging](doc/rofi-debugging.5.markdown)
|
- [rofi-debugging](doc/rofi-debugging.5.markdown)
|
||||||
* [rofi-script](doc/rofi-script.5.markdown)
|
- [rofi-script](doc/rofi-script.5.markdown)
|
||||||
* [rofi-theme-selector](doc/rofi-theme-selector.1.markdown)
|
- [rofi-theme-selector](doc/rofi-theme-selector.1.markdown)
|
||||||
* [rofi-keys](doc/rofi-keys.5.markdown)
|
- [rofi-keys](doc/rofi-keys.5.markdown)
|
||||||
* [rofi-dmenu](doc/rofi-dmenu.5.markdown)
|
- [rofi-dmenu](doc/rofi-dmenu.5.markdown)
|
||||||
|
|
||||||
# Installation
|
## Installation
|
||||||
|
|
||||||
Please see the [installation guide](INSTALL.md) for instructions on how to
|
Please see the [installation guide](INSTALL.md) for instructions on how to
|
||||||
install **Rofi**.
|
install **Rofi**.
|
||||||
|
|
||||||
# Quickstart
|
## Quickstart
|
||||||
|
|
||||||
## Usage
|
### Usage
|
||||||
|
|
||||||
> **This section just gives a brief overview of the various options. To get the full set of options see the _manpages_ section above**
|
> **This section just gives a brief overview of the various options. To get the
|
||||||
|
> full set of options see the [manpages](#manpage) section above**
|
||||||
|
|
||||||
#### Running rofi
|
#### Running rofi
|
||||||
|
|
||||||
To launch **rofi** directly in a certain mode, specify a mode with `rofi -show <mode>`.
|
To launch **rofi** directly in a certain mode, specify a mode with `rofi -show <mode>`.
|
||||||
To show the `run` dialog:
|
To show the `run` dialog:
|
||||||
|
|
||||||
|
```bash
|
||||||
rofi -show run
|
rofi -show run
|
||||||
|
```
|
||||||
|
|
||||||
Or get the options from a script:
|
Or get the options from a script:
|
||||||
|
|
||||||
|
```bash
|
||||||
~/my_script.sh | rofi -dmenu
|
~/my_script.sh | rofi -dmenu
|
||||||
|
```
|
||||||
|
|
||||||
Specify an ordered, comma-separated list of modes to enable.
|
Specify an ordered, comma-separated list of modes to enable. Enabled modes can
|
||||||
Enabled modes can be changed at runtime. Default key is `Ctrl+Tab`.
|
be changed at runtime. Default key is `Ctrl+Tab`. If no modes are specified,
|
||||||
If no modes are specified, all configured modes will be enabled.
|
all configured modes will be enabled. To only show the `run` and `ssh`
|
||||||
To only show the `run` and `ssh` launcher:
|
launcher:
|
||||||
|
|
||||||
|
```bash
|
||||||
rofi -modes "run,ssh" -show run
|
rofi -modes "run,ssh" -show run
|
||||||
|
```
|
||||||
|
|
||||||
The modes to combine in combi mode.
|
The modes to combine in combi mode.
|
||||||
For syntax to `-combi-modes `, see `-modes`.
|
For syntax to `-combi-modes `, see `-modes`.
|
||||||
To get one merge view, of `window`,`run`, and `ssh`:
|
To get one merge view, of `window`,`run`, and `ssh`:
|
||||||
|
|
||||||
rofi -show combi -combi-modes "window,run,ssh" -modes combi
|
```bash
|
||||||
|
rofi -show combi -combi-modes "window,run,ssh" -modes combi
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
### Configuration
|
||||||
|
|
||||||
Generate a default configuration file
|
Generate a default configuration file
|
||||||
```
|
|
||||||
|
```bash
|
||||||
mkdir -p ~/.config/rofi
|
mkdir -p ~/.config/rofi
|
||||||
rofi -dump-config > ~/.config/rofi/config.rasi
|
rofi -dump-config > ~/.config/rofi/config.rasi
|
||||||
```
|
```
|
||||||
|
|
||||||
This creates a file called `config.rasi` in the `~/.config/rofi/` folder. You can modify this file to set configuration settings and modify themes. `config.rasi` is the file rofi looks to by default.
|
This creates a file called `config.rasi` in the `~/.config/rofi/` folder. You
|
||||||
|
can modify this file to set configuration settings and modify themes.
|
||||||
|
`config.rasi` is the file rofi looks to by default.
|
||||||
|
|
||||||
Please see the [configuration guide](https://github.com/lbonn/rofi/blob/wayland/CONFIG.md) for a summary of configuration options. More detailed options are provided in the manpages.
|
Please see the [configuration guide](https://github.com/lbonn/rofi/blob/wayland/CONFIG.md) for a summary of configuration options. More detailed options are provided in the manpages.
|
||||||
|
|
||||||
## Themes
|
### Themes
|
||||||
|
|
||||||
Please see the [themes manpages](https://github.com/lbonn/rofi/blob/wayland/doc/rofi-theme.5.markdown) for a detailed description.
|
Please see the [themes manpages](https://github.com/lbonn/rofi/blob/wayland/doc/rofi-theme.5.markdown) for a detailed description.
|
||||||
|
|
||||||
|
|
||||||
The latest bundled themes can be found [here](https://github.com/lbonn/rofi/tree/wayland/themes).
|
The latest bundled themes can be found
|
||||||
|
[here](https://github.com/lbonn/rofi/tree/next/themes).
|
||||||
|
|
||||||
# Screenshots
|
## Screenshots
|
||||||
|
|
||||||
Rezlooks:
|
Rezlooks:
|
||||||
|
|
||||||
|
@ -210,20 +254,20 @@ Default theme:
|
||||||
|
|
||||||
![default](https://raw.githubusercontent.com/davatorium/rofi/next/releasenotes/1.4.0/rofi-no-fzf.png)
|
![default](https://raw.githubusercontent.com/davatorium/rofi/next/releasenotes/1.4.0/rofi-no-fzf.png)
|
||||||
|
|
||||||
# Wiki
|
## Wiki
|
||||||
|
|
||||||
| ❗ **The upstream rofi Wiki is currently unmaintained and might contain outdated data ** |
|
| ❗ **The upstream rofi Wiki is currently unmaintained and might contain outdated data ** |
|
||||||
| --- |
|
| --- |
|
||||||
|
|
||||||
[Go to upstream rofi wiki](https://github.com/davatorium/rofi/wiki) .
|
[Go to upstream rofi wiki](https://github.com/davatorium/rofi/wiki) .
|
||||||
|
|
||||||
#### Contents
|
### Contents
|
||||||
|
|
||||||
* [User scripts](https://github.com/davatorium/rofi/wiki/User-scripts)
|
- [User scripts](https://github.com/davatorium/rofi/wiki/User-scripts)
|
||||||
* [Examples](https://github.com/davatorium/rofi/wiki#examples)
|
- [Examples](https://github.com/davatorium/rofi/wiki#examples)
|
||||||
* [dmenu Specs](https://github.com/davatorium/rofi/wiki/dmenu_specs)
|
- [dmenu Specs](https://github.com/davatorium/rofi/wiki/dmenu_specs)
|
||||||
* [mode Specs](https://github.com/davatorium/rofi/wiki/mode-Specs)
|
- [mode Specs](https://github.com/davatorium/rofi/wiki/mode-Specs)
|
||||||
* [F.A.Q.](https://github.com/davatorium/rofi/wiki/Frequently-Asked-Questions).
|
- [F.A.Q.](https://github.com/davatorium/rofi/wiki/Frequently-Asked-Questions).
|
||||||
* [Script mode](https://github.com/davatorium/rofi/wiki/rfc-script-mode)
|
- [Script mode](https://github.com/davatorium/rofi/wiki/rfc-script-mode)
|
||||||
* [Creating an issue](https://github.com/davatorium/rofi/blob/master/.github/CONTRIBUTING.md)
|
- [Creating an issue](https://github.com/davatorium/rofi/blob/master/.github/CONTRIBUTING.md)
|
||||||
* [Creating a Pull request](https://github.com/davatorium/rofi/wiki/Creating-a-pull-request)
|
- [Creating a Pull request](https://github.com/davatorium/rofi/wiki/Creating-a-pull-request)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -158,4 +158,6 @@ Settings config = {
|
||||||
.refilter_timeout_limit = 300,
|
.refilter_timeout_limit = 300,
|
||||||
/** workaround for broken xserver (#300 on xserver, #611) */
|
/** workaround for broken xserver (#300 on xserver, #611) */
|
||||||
.xserver_i300_workaround = FALSE,
|
.xserver_i300_workaround = FALSE,
|
||||||
|
/** What browser to use for completion */
|
||||||
|
.completer_mode = "recursivebrowser",
|
||||||
};
|
};
|
||||||
|
|
14
configure.ac
14
configure.ac
|
@ -1,4 +1,4 @@
|
||||||
AC_INIT([rofi], [1.7.5-dev], [https://github.com/davatorium/rofi/],[],[https://reddit.com/r/qtools/])
|
AC_INIT([rofi], [1.7.5-dev], [https://github.com/davatorium/rofi/],[],[https://github.com/davatorium/rofi/discussions])
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([source/rofi.c])
|
AC_CONFIG_SRCDIR([source/rofi.c])
|
||||||
AC_CONFIG_HEADER([config.h])
|
AC_CONFIG_HEADER([config.h])
|
||||||
|
@ -145,7 +145,17 @@ NK_INIT([bindings xdg-theme])
|
||||||
PKG_CHECK_MODULES([glib], [glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0])
|
PKG_CHECK_MODULES([glib], [glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0])
|
||||||
AC_DEFINE_UNQUOTED([GLIB_VERSION_MIN_REQUIRED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The lower GLib version supported])
|
AC_DEFINE_UNQUOTED([GLIB_VERSION_MIN_REQUIRED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The lower GLib version supported])
|
||||||
AC_DEFINE_UNQUOTED([GLIB_VERSION_MAX_ALLOWED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The highest GLib version supported])
|
AC_DEFINE_UNQUOTED([GLIB_VERSION_MAX_ALLOWED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The highest GLib version supported])
|
||||||
GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama])
|
GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama ])
|
||||||
|
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([imdkit], AS_HELP_STRING([--enable-imdkit], [Build with checks using check library (default: disabled)]))
|
||||||
|
|
||||||
|
AS_IF([test "x${enable_imdkit}" = "xyes"], [
|
||||||
|
PKG_CHECK_MODULES([imdclient], [xcb-imdkit <= 1.0.2 ],
|
||||||
|
[AC_DEFINE([XCB_IMDKIT_1_0_3_LOWER], [1], [Indicate lower version of imdclient])
|
||||||
|
AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])],
|
||||||
|
[PKG_CHECK_MODULES([imdclient], [xcb-imdkit >= 1.0.3],[AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])],[HAVE_IMDKIT=0])])
|
||||||
|
])
|
||||||
PKG_CHECK_MODULES([pango], [pango pangocairo])
|
PKG_CHECK_MODULES([pango], [pango pangocairo])
|
||||||
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
|
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
|
||||||
PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 ])
|
PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 ])
|
||||||
|
|
|
@ -1,17 +1,25 @@
|
||||||
gomd2man = find_program('go-md2man', required: false)
|
gomd2man = find_program('go-md2man', required: false)
|
||||||
if gomd2man.found()
|
if gomd2man.found()
|
||||||
run_target('update-manpage',
|
man_targets = []
|
||||||
command: [ 'meson_build_manpages.sh', files(
|
foreach f: [
|
||||||
'rofi.1.markdown',
|
'rofi.1',
|
||||||
'rofi-theme-selector.1.markdown',
|
'rofi-theme-selector.1',
|
||||||
'rofi-theme.5.markdown',
|
'rofi-theme.5',
|
||||||
'rofi-dmenu.5.markdown',
|
'rofi-dmenu.5',
|
||||||
'rofi-debugging.5.markdown',
|
'rofi-debugging.5',
|
||||||
'rofi-keys.5.markdown',
|
'rofi-keys.5',
|
||||||
'rofi-script.5.markdown',
|
'rofi-script.5',
|
||||||
'rofi-sensible-terminal.1.markdown'
|
'rofi-sensible-terminal.1'
|
||||||
)]
|
]
|
||||||
)
|
man_targets += custom_target(f,
|
||||||
|
input: '.'.join([f, 'markdown']),
|
||||||
|
output: f,
|
||||||
|
command: [ 'go-md2man',
|
||||||
|
'-in', files('.'.join([f,'markdown'])),
|
||||||
|
'-out', files(f)
|
||||||
|
])
|
||||||
|
endforeach
|
||||||
|
run_target('update-manpage', command: ['true'], depends: man_targets)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
doxy_conf = configuration_data()
|
doxy_conf = configuration_data()
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
## Did not get this working in meson directly.
|
|
||||||
## not via generator or custom_target.
|
|
||||||
|
|
||||||
|
|
||||||
pushd "${MESON_BUILD_ROOT}"
|
|
||||||
|
|
||||||
for a in $@
|
|
||||||
do
|
|
||||||
go-md2man -in $a -out ${a%.markdown}
|
|
||||||
done
|
|
|
@ -5,14 +5,15 @@
|
||||||
Debugging rofi.
|
Debugging rofi.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test
|
When reporting an issue with rofi crashing, or misbehaving. It helps to do some
|
||||||
to help pin-point the problem.
|
small test to help pin-point the problem.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
First try disabling your custom configuration: \fB\fC-no-config\fR
|
First try disabling your custom configuration: \fB\fC-no-config\fR
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
This disables the parsing of the configuration files. This runs rofi in \fIstock\fP mode.
|
This disables the parsing of the configuration files. This runs rofi in \fIstock\fP
|
||||||
|
mode.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
If you run custom C plugins, you can disable the plugins using: \fB\fC-no-plugins\fR
|
If you run custom C plugins, you can disable the plugins using: \fB\fC-no-plugins\fR
|
||||||
|
@ -33,8 +34,8 @@ rofi -dump-theme
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\fCrofi -help\fR provides us with the configuration files parsed, the exact version, monitor layout
|
\fB\fCrofi -help\fR provides us with the configuration files parsed, the exact
|
||||||
and more useful information.
|
version, monitor layout and more useful information.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
The \fB\fCrofi -dump-config\fR and \fB\fCrofi -dump-theme\fR output gives us \fB\fCrofi\fR
|
The \fB\fCrofi -dump-config\fR and \fB\fCrofi -dump-theme\fR output gives us \fB\fCrofi\fR
|
||||||
|
@ -57,8 +58,8 @@ G_MESSAGES_DEBUG=Timings rofi -show drun
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
It will show a trace with (useful) timing information at relevant points during the execution.
|
It will show a trace with (useful) timing information at relevant points during
|
||||||
This will help debugging when rofi is slow to start.
|
the execution. This will help debugging when rofi is slow to start.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Example trace:
|
Example trace:
|
||||||
|
@ -123,9 +124,11 @@ Example trace:
|
||||||
|
|
||||||
.SH Debug domains
|
.SH Debug domains
|
||||||
.PP
|
.PP
|
||||||
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
|
To further debug the plugin, you can get a trace with (lots of) debug
|
||||||
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G_MESSAGES_DEBUG
|
information. This debug output can be enabled for multiple parts in rofi using
|
||||||
environment variable. At the time of creation of this page, the following debug domains exist:
|
the glib debug framework. Debug domains can be enabled by setting the
|
||||||
|
G_MESSAGES_DEBUG environment variable. At the time of creation of this page,
|
||||||
|
the following debug domains exist:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
@ -173,7 +176,8 @@ Helpers.IconFetcher: Information about icon lookup.
|
||||||
For full list see \fB\fCman rofi\fR\&.
|
For full list see \fB\fCman rofi\fR\&.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Example: \fB\fCG_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun\fR To get specific output from the Desktop file run dialog.
|
Example: \fB\fCG_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun\fR To get specific output
|
||||||
|
from the Desktop file run dialog.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
To redirect the debug output to a file (\fB\fC~/rofi.log\fR) add:
|
To redirect the debug output to a file (\fB\fC~/rofi.log\fR) add:
|
||||||
|
@ -191,7 +195,7 @@ rofi -show drun -log ~/rofi.log
|
||||||
Specifying the logfile automatically enabled all log domains.
|
Specifying the logfile automatically enabled all log domains.
|
||||||
This can be useful when rofi is launched from a window manager.
|
This can be useful when rofi is launched from a window manager.
|
||||||
|
|
||||||
.SH Creating a backtrace.
|
.SH Creating a backtrace
|
||||||
.PP
|
.PP
|
||||||
First make sure you compile \fBrofi\fP with debug symbols:
|
First make sure you compile \fBrofi\fP with debug symbols:
|
||||||
|
|
||||||
|
@ -205,10 +209,10 @@ make CFLAGS="-O0 -g3" clean rofi
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
|
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it
|
||||||
mouse. So if it crashes in GDB you are stuck.
|
grabs keyboard and mouse. So if it crashes in GDB you are stuck. The best way
|
||||||
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
|
to go is to enable core file. (ulimit -c unlimited in bash) then make rofi
|
||||||
can then load the core in GDB.
|
crash. You can then load the core in GDB.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
|
@ -235,11 +239,13 @@ thread apply all bt
|
||||||
The output trace is useful when reporting crashes.
|
The output trace is useful when reporting crashes.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Some distribution have \fB\fCsystemd-coredump\fR, this way you can easily get a backtrace via \fB\fCcoredumpctl\fR\&.
|
Some distribution have \fB\fCsystemd-coredump\fR, this way you can easily get a
|
||||||
|
backtrace via \fB\fCcoredumpctl\fR\&.
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.PP
|
.PP
|
||||||
\fBrofi-sensible-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi-debugging(5)\fP, \fBrofi-theme(5)\fP, \fBrofi-script(5)\fP, \fBrofi-keys(5)\fP,\fBrofi-theme-selector(1)\fP
|
rofi-sensible-terminal(1), dmenu(1), rofi-debugging(5), rofi-theme(5),
|
||||||
|
rofi-script(5), rofi-keys(5),rofi-theme-selector(1)
|
||||||
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.RS
|
.RS
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
|
|
||||||
Debugging rofi.
|
Debugging rofi.
|
||||||
|
|
||||||
When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test
|
When reporting an issue with rofi crashing, or misbehaving. It helps to do some
|
||||||
to help pin-point the problem.
|
small test to help pin-point the problem.
|
||||||
|
|
||||||
First try disabling your custom configuration: `-no-config`
|
First try disabling your custom configuration: `-no-config`
|
||||||
|
|
||||||
This disables the parsing of the configuration files. This runs rofi in *stock* mode.
|
This disables the parsing of the configuration files. This runs rofi in *stock*
|
||||||
|
mode.
|
||||||
|
|
||||||
If you run custom C plugins, you can disable the plugins using: `-no-plugins`
|
If you run custom C plugins, you can disable the plugins using: `-no-plugins`
|
||||||
|
|
||||||
|
|
||||||
## Get the relevant information for an issue
|
## Get the relevant information for an issue
|
||||||
|
|
||||||
Please pastebin the output of the following commands:
|
Please pastebin the output of the following commands:
|
||||||
|
@ -24,15 +24,14 @@ rofi -dump-config
|
||||||
rofi -dump-theme
|
rofi -dump-theme
|
||||||
```
|
```
|
||||||
|
|
||||||
`rofi -help` provides us with the configuration files parsed, the exact version, monitor layout
|
`rofi -help` provides us with the configuration files parsed, the exact
|
||||||
and more useful information.
|
version, monitor layout and more useful information.
|
||||||
|
|
||||||
The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi`
|
The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi`
|
||||||
interpretation of your configuration and theme.
|
interpretation of your configuration and theme.
|
||||||
|
|
||||||
Please check the output for identifiable information and remove this.
|
Please check the output for identifiable information and remove this.
|
||||||
|
|
||||||
|
|
||||||
## Timing traces
|
## Timing traces
|
||||||
|
|
||||||
To get a timing trace, enable the **Timings** debug domain.
|
To get a timing trace, enable the **Timings** debug domain.
|
||||||
|
@ -40,13 +39,12 @@ To get a timing trace, enable the **Timings** debug domain.
|
||||||
```bash
|
```bash
|
||||||
G_MESSAGES_DEBUG=Timings rofi -show drun
|
G_MESSAGES_DEBUG=Timings rofi -show drun
|
||||||
```
|
```
|
||||||
|
It will show a trace with (useful) timing information at relevant points during
|
||||||
It will show a trace with (useful) timing information at relevant points during the execution.
|
the execution. This will help debugging when rofi is slow to start.
|
||||||
This will help debugging when rofi is slow to start.
|
|
||||||
|
|
||||||
Example trace:
|
Example trace:
|
||||||
|
|
||||||
```
|
```text
|
||||||
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
|
||||||
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
|
||||||
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
|
||||||
|
@ -99,48 +97,49 @@ Example trace:
|
||||||
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
|
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Debug domains
|
## Debug domains
|
||||||
|
|
||||||
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
|
To further debug the plugin, you can get a trace with (lots of) debug
|
||||||
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G\_MESSAGES\_DEBUG
|
information. This debug output can be enabled for multiple parts in rofi using
|
||||||
environment variable. At the time of creation of this page, the following debug domains exist:
|
the glib debug framework. Debug domains can be enabled by setting the
|
||||||
|
G\_MESSAGES\_DEBUG environment variable. At the time of creation of this page,
|
||||||
|
the following debug domains exist:
|
||||||
|
|
||||||
* all: Show debug information from all domains.
|
- all: Show debug information from all domains.
|
||||||
* X11Helper: The X11 Helper functions.
|
- X11Helper: The X11 Helper functions.
|
||||||
* View: The main window view functions.
|
- View: The main window view functions.
|
||||||
* Widgets.Box: The Box widget.
|
- Widgets.Box: The Box widget.
|
||||||
* Modes.DMenu: The dmenu mode.
|
- Modes.DMenu: The dmenu mode.
|
||||||
* Modes.Run: The run mode.
|
- Modes.Run: The run mode.
|
||||||
* Modes.DRun: The desktop file run mode.
|
- Modes.DRun: The desktop file run mode.
|
||||||
* Modes.Window: The window mode.
|
- Modes.Window: The window mode.
|
||||||
* Modes.Script: The script mode.
|
- Modes.Script: The script mode.
|
||||||
* Modes.Combi: The script mode.
|
- Modes.Combi: The script mode.
|
||||||
* Modes.Ssh: The ssh mode.
|
- Modes.Ssh: The ssh mode.
|
||||||
* Rofi: The main application.
|
- Rofi: The main application.
|
||||||
* Timings: Get timing output.
|
- Timings: Get timing output.
|
||||||
* Theme: Theme engine debug output. (warning lots of output).
|
- Theme: Theme engine debug output. (warning lots of output).
|
||||||
* Widgets.Icon: The Icon widget.
|
- Widgets.Icon: The Icon widget.
|
||||||
* Widgets.Box: The box widget.
|
- Widgets.Box: The box widget.
|
||||||
* Widgets.Container: The container widget.
|
- Widgets.Container: The container widget.
|
||||||
* Widgets.Window: The window widget.
|
- Widgets.Window: The window widget.
|
||||||
* Helpers.IconFetcher: Information about icon lookup.
|
- Helpers.IconFetcher: Information about icon lookup.
|
||||||
|
|
||||||
For full list see `man rofi`.
|
For full list see `man rofi`.
|
||||||
|
|
||||||
Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output from the Desktop file run dialog.
|
Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output
|
||||||
|
from the Desktop file run dialog.
|
||||||
|
|
||||||
To redirect the debug output to a file (`~/rofi.log`) add:
|
To redirect the debug output to a file (`~/rofi.log`) add:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
rofi -show drun -log ~/rofi.log
|
rofi -show drun -log ~/rofi.log
|
||||||
```
|
```
|
||||||
|
|
||||||
Specifying the logfile automatically enabled all log domains.
|
Specifying the logfile automatically enabled all log domains.
|
||||||
This can be useful when rofi is launched from a window manager.
|
This can be useful when rofi is launched from a window manager.
|
||||||
|
|
||||||
|
## Creating a backtrace
|
||||||
## Creating a backtrace.
|
|
||||||
|
|
||||||
First make sure you compile **rofi** with debug symbols:
|
First make sure you compile **rofi** with debug symbols:
|
||||||
|
|
||||||
|
@ -148,10 +147,10 @@ First make sure you compile **rofi** with debug symbols:
|
||||||
make CFLAGS="-O0 -g3" clean rofi
|
make CFLAGS="-O0 -g3" clean rofi
|
||||||
```
|
```
|
||||||
|
|
||||||
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
|
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it
|
||||||
mouse. So if it crashes in GDB you are stuck.
|
grabs keyboard and mouse. So if it crashes in GDB you are stuck. The best way
|
||||||
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
|
to go is to enable core file. (ulimit -c unlimited in bash) then make rofi
|
||||||
can then load the core in GDB.
|
crash. You can then load the core in GDB.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
gdb rofi core
|
gdb rofi core
|
||||||
|
@ -159,17 +158,19 @@ gdb rofi core
|
||||||
|
|
||||||
Then type inside gdb:
|
Then type inside gdb:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
thread apply all bt
|
thread apply all bt
|
||||||
```
|
```
|
||||||
|
|
||||||
The output trace is useful when reporting crashes.
|
The output trace is useful when reporting crashes.
|
||||||
|
|
||||||
Some distribution have `systemd-coredump`, this way you can easily get a backtrace via `coredumpctl`.
|
Some distribution have `systemd-coredump`, this way you can easily get a
|
||||||
|
backtrace via `coredumpctl`.
|
||||||
|
|
||||||
## SEE ALSO
|
## SEE ALSO
|
||||||
|
|
||||||
**rofi-sensible-terminal(1)**, **dmenu(1)**, **rofi-debugging(5)**, **rofi-theme(5)**, **rofi-script(5)**, **rofi-keys(5)**,**rofi-theme-selector(1)**
|
rofi-sensible-terminal(1), dmenu(1), rofi-debugging(5), rofi-theme(5),
|
||||||
|
rofi-script(5), rofi-keys(5),rofi-theme-selector(1)
|
||||||
|
|
||||||
## AUTHOR
|
## AUTHOR
|
||||||
|
|
||||||
|
|
|
@ -14,22 +14,25 @@ The website for \fB\fCdmenu\fR can be found here
|
||||||
\[la]http://tools.suckless.org/dmenu/\[ra]\&.
|
\[la]http://tools.suckless.org/dmenu/\[ra]\&.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fBrofi\fP does not aim to be 100% compatible with \fB\fCdmenu\fR\&. There are simply too many flavors of \fB\fCdmenu\fR\&.
|
\fBrofi\fP does not aim to be 100% compatible with \fB\fCdmenu\fR\&. There are simply too
|
||||||
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
|
many flavors of \fB\fCdmenu\fR\&. The idea is that the basic usage command-line flags
|
||||||
Besides, \fBrofi\fP offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
|
are obeyed, theme-related flags are not. Besides, \fBrofi\fP offers some extended
|
||||||
|
features (like multi-select, highlighting, message bar, extra key bindings).
|
||||||
|
|
||||||
.SH BASIC CONCEPT
|
.SH BASIC CONCEPT
|
||||||
.PP
|
.PP
|
||||||
In \fB\fCdmenu\fR mode, \fBrofi\fP reads data from standard in, splits them into separate entries and displays them.
|
In \fB\fCdmenu\fR mode, \fBrofi\fP reads data from standard in, splits them into
|
||||||
If the user selects an row, this is printed out to standard out, allow the script to process it further.
|
separate entries and displays them. If the user selects a row, this is printed
|
||||||
|
out to standard out, allowing the script to process it further.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
|
By default separation of rows is done on new lines, making it easy to pipe the
|
||||||
\fBrofi\fP and the output of rofi into the next.
|
output a one application into \fBrofi\fP and the output of rofi into the next.
|
||||||
|
|
||||||
.SH USAGE
|
.SH USAGE
|
||||||
.PP
|
.PP
|
||||||
By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation mode.
|
By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation
|
||||||
|
mode.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
|
@ -43,7 +46,8 @@ ls | rofi -dmenu
|
||||||
.SS DMENU DROP-IN REPLACEMENT
|
.SS DMENU DROP-IN REPLACEMENT
|
||||||
.PP
|
.PP
|
||||||
If \fB\fCargv[0]\fR (calling command) is dmenu, \fBrofi\fP will start in dmenu mode.
|
If \fB\fCargv[0]\fR (calling command) is dmenu, \fBrofi\fP will start in dmenu mode.
|
||||||
This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&.
|
This way, it can be used as a drop-in replacement for dmenu. Just copy or
|
||||||
|
symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
|
@ -57,18 +61,20 @@ ln -s /usr/bin/rofi /usr/bin/dmenu
|
||||||
.SS DMENU VS SCRIPT MODE
|
.SS DMENU VS SCRIPT MODE
|
||||||
.PP
|
.PP
|
||||||
Script mode is used to extend \fBrofi\fP, dmenu mode is used to extend a script.
|
Script mode is used to extend \fBrofi\fP, dmenu mode is used to extend a script.
|
||||||
The two do share much of the same input format. Please see the \fBrofi-script(5)\fP manpage for more information.
|
The two do share much of the same input format. Please see the
|
||||||
|
\fBrofi-script(5)\fP manpage for more information.
|
||||||
|
|
||||||
.SS DMENU SPECIFIC COMMANDLINE FLAGS
|
.SS DMENU SPECIFIC COMMANDLINE FLAGS
|
||||||
.PP
|
.PP
|
||||||
A lot of these options can also be modified by the script using special input. See the \fBrofi-script(5)\fP manpage
|
A lot of these options can also be modified by the script using special input.
|
||||||
for more information about this syntax.
|
See the \fBrofi-script(5)\fP manpage for more information about this syntax.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\fC-sep\fR \fIseparator\fP
|
\fB\fC-sep\fR \fIseparator\fP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a separator:
|
Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a
|
||||||
|
separator:
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
|
@ -83,7 +89,8 @@ echo "a|b|c|d|e" | rofi -sep '|' -dmenu
|
||||||
\fB\fC-p\fR \fIprompt\fP
|
\fB\fC-p\fR \fIprompt\fP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey', a,b,c,d, or e.
|
Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey',
|
||||||
|
a,b,c,d, or e.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
|
@ -125,7 +132,10 @@ Makes \fB\fCdmenu\fR searches case-insensitive
|
||||||
\fB\fC-a\fR \fIX\fP
|
\fB\fC-a\fR \fIX\fP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Active row, mark \fIX\fP as active. Where \fIX\fP is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify:
|
Active row, mark \fIX\fP as active. Where \fIX\fP is a comma-separated list of
|
||||||
|
python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the
|
||||||
|
last row with -2 preceding it, ranges are left-open and right-close, and so on.
|
||||||
|
You can specify:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
@ -166,7 +176,8 @@ This mode returns directly when no entries given.
|
||||||
\fB\fC-format\fR \fIformat\fP
|
\fB\fC-format\fR \fIformat\fP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Allows the output of dmenu to be customized (N is the total number of input entries):
|
Allows the output of dmenu to be customized (N is the total number of input
|
||||||
|
entries):
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
@ -199,8 +210,9 @@ Select first line that matches the given string
|
||||||
\fB\fC-mesg\fR \fIstring\fP
|
\fB\fC-mesg\fR \fIstring\fP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Add a message line below the filter entry box. Supports Pango markup.
|
Add a message line below the filter entry box. Supports Pango markup. For more
|
||||||
For more information on supported markup, see here
|
information on supported markup, see
|
||||||
|
here
|
||||||
\[la]https://docs.gtk.org/Pango/pango_markup.html\[ra]
|
\[la]https://docs.gtk.org/Pango/pango_markup.html\[ra]
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
|
@ -229,22 +241,26 @@ Hide the input text. This should not be considered secure!
|
||||||
.PP
|
.PP
|
||||||
Tell \fBrofi\fP that DMenu input is Pango markup encoded, and should be rendered.
|
Tell \fBrofi\fP that DMenu input is Pango markup encoded, and should be rendered.
|
||||||
See here
|
See here
|
||||||
\[la]https://developer.gnome.org/pygtk/stable/pango-markup-language.html\[ra] for details about Pango markup.
|
\[la]https://developer.gnome.org/pygtk/stable/pango-markup-language.html\[ra]
|
||||||
|
for details about Pango markup.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\fC-multi-select\fR
|
\fB\fC-multi-select\fR
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.
|
Allow multiple lines to be selected. Adds a small selection indicator to the
|
||||||
|
left of each entry.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\fC-sync\fR
|
\fB\fC-sync\fR
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Force \fBrofi\fP mode to first read all data from stdin before showing the selection window. This is original dmenu behavior.
|
Force \fBrofi\fP mode to first read all data from stdin before showing the
|
||||||
|
selection window. This is original dmenu behavior.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
|
Note: the default asynchronous mode will also be automatically disabled if used
|
||||||
|
with conflicting options,
|
||||||
such as \fB\fC-dump\fR, \fB\fC-only-match\fR or \fB\fC-auto-select\fR\&.
|
such as \fB\fC-dump\fR, \fB\fC-only-match\fR or \fB\fC-auto-select\fR\&.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
|
@ -298,6 +314,20 @@ When multi-select is enabled, prefix this string when element is not selected.
|
||||||
.PP
|
.PP
|
||||||
\fIdefault\fP: "☐ "
|
\fIdefault\fP: "☐ "
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\fC-ellipsize-mode\fR (start|middle|end)
|
||||||
|
|
||||||
|
.PP
|
||||||
|
Set ellipsize mode on the listview.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fIdefault\fP "end"
|
||||||
|
|
||||||
|
.SH PARSING ROW OPTIONS
|
||||||
|
.PP
|
||||||
|
Extra options for individual rows can be also set. See the \fBrofi-script(5)\fP
|
||||||
|
manpage for details; the syntax and supported features are identical.
|
||||||
|
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
.RS
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
@ -311,7 +341,8 @@ When multi-select is enabled, prefix this string when element is not selected.
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.PP
|
.PP
|
||||||
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5),
|
||||||
|
rofi-theme-selector(1), ascii(7)
|
||||||
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
**rofi dmenu mode** - Rofi dmenu emulation
|
**rofi dmenu mode** - Rofi dmenu emulation
|
||||||
|
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
||||||
To integrate **rofi** into scripts as simple selection dialogs,
|
To integrate **rofi** into scripts as simple selection dialogs,
|
||||||
|
@ -12,58 +11,67 @@ To integrate **rofi** into scripts as simple selection dialogs,
|
||||||
|
|
||||||
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
|
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
|
||||||
|
|
||||||
**rofi** does not aim to be 100% compatible with `dmenu`. There are simply too many flavors of `dmenu`.
|
**rofi** does not aim to be 100% compatible with `dmenu`. There are simply too
|
||||||
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
|
many flavors of `dmenu`. The idea is that the basic usage command-line flags
|
||||||
Besides, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
|
are obeyed, theme-related flags are not. Besides, **rofi** offers some extended
|
||||||
|
features (like multi-select, highlighting, message bar, extra key bindings).
|
||||||
|
|
||||||
## BASIC CONCEPT
|
## BASIC CONCEPT
|
||||||
|
|
||||||
In `dmenu` mode, **rofi** reads data from standard in, splits them into separate entries and displays them.
|
In `dmenu` mode, **rofi** reads data from standard in, splits them into
|
||||||
If the user selects an row, this is printed out to standard out, allow the script to process it further.
|
separate entries and displays them. If the user selects a row, this is printed
|
||||||
|
out to standard out, allowing the script to process it further.
|
||||||
|
|
||||||
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
|
By default separation of rows is done on new lines, making it easy to pipe the
|
||||||
**rofi** and the output of rofi into the next.
|
output a one application into **rofi** and the output of rofi into the next.
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
|
|
||||||
By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation mode.
|
By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation
|
||||||
|
mode.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ls | rofi -dmenu
|
ls | rofi -dmenu
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### DMENU DROP-IN REPLACEMENT
|
### DMENU DROP-IN REPLACEMENT
|
||||||
|
|
||||||
If `argv[0]` (calling command) is dmenu, **rofi** will start in dmenu mode.
|
If `argv[0]` (calling command) is dmenu, **rofi** will start in dmenu mode.
|
||||||
This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink **rofi** to dmenu in `$PATH`.
|
This way, it can be used as a drop-in replacement for dmenu. Just copy or
|
||||||
|
symlink **rofi** to dmenu in `$PATH`.
|
||||||
ln -s /usr/bin/rofi /usr/bin/dmenu
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ln -s /usr/bin/rofi /usr/bin/dmenu
|
||||||
|
```
|
||||||
|
|
||||||
### DMENU VS SCRIPT MODE
|
### DMENU VS SCRIPT MODE
|
||||||
|
|
||||||
Script mode is used to extend **rofi**, dmenu mode is used to extend a script.
|
Script mode is used to extend **rofi**, dmenu mode is used to extend a script.
|
||||||
The two do share much of the same input format. Please see the **rofi-script(5)** manpage for more information.
|
The two do share much of the same input format. Please see the
|
||||||
|
**rofi-script(5)** manpage for more information.
|
||||||
|
|
||||||
### DMENU SPECIFIC COMMANDLINE FLAGS
|
### DMENU SPECIFIC COMMANDLINE FLAGS
|
||||||
|
|
||||||
A lot of these options can also be modified by the script using special input. See the **rofi-script(5)** manpage
|
A lot of these options can also be modified by the script using special input.
|
||||||
for more information about this syntax.
|
See the **rofi-script(5)** manpage for more information about this syntax.
|
||||||
|
|
||||||
`-sep` *separator*
|
`-sep` *separator*
|
||||||
|
|
||||||
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator:
|
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a
|
||||||
|
separator:
|
||||||
|
|
||||||
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
|
```bash
|
||||||
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
|
||||||
|
```
|
||||||
|
|
||||||
`-p` *prompt*
|
`-p` *prompt*
|
||||||
|
|
||||||
Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e.
|
Specify the prompt to show in `dmenu` mode. For example, select 'monkey',
|
||||||
|
a,b,c,d, or e.
|
||||||
|
|
||||||
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
|
```bash
|
||||||
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
|
||||||
|
```
|
||||||
|
|
||||||
Default: *dmenu*
|
Default: *dmenu*
|
||||||
|
|
||||||
|
@ -71,7 +79,9 @@ Default: *dmenu*
|
||||||
|
|
||||||
Maximum number of lines the menu may show before scrolling.
|
Maximum number of lines the menu may show before scrolling.
|
||||||
|
|
||||||
rofi -dmenu -l 25
|
```bash
|
||||||
|
rofi -dmenu -l 25
|
||||||
|
```
|
||||||
|
|
||||||
Default: *15*
|
Default: *15*
|
||||||
|
|
||||||
|
@ -81,13 +91,16 @@ Makes `dmenu` searches case-insensitive
|
||||||
|
|
||||||
`-a` *X*
|
`-a` *X*
|
||||||
|
|
||||||
Active row, mark *X* as active. Where *X* is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify:
|
Active row, mark *X* as active. Where *X* is a comma-separated list of
|
||||||
|
python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the
|
||||||
|
last row with -2 preceding it, ranges are left-open and right-close, and so on.
|
||||||
|
You can specify:
|
||||||
|
|
||||||
* A single row: '5'
|
- A single row: '5'
|
||||||
* A range of (last 3) rows: '-3:'
|
- A range of (last 3) rows: '-3:'
|
||||||
* 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
|
- 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
|
||||||
* A set of rows: '2,0,-9'
|
- A set of rows: '2,0,-9'
|
||||||
* Or any combination: '5,-3:,7:11,2,0,-9'
|
- Or any combination: '5,-3:,7:11,2,0,-9'
|
||||||
|
|
||||||
`-u` *X*
|
`-u` *X*
|
||||||
|
|
||||||
|
@ -106,15 +119,16 @@ This mode returns directly when no entries given.
|
||||||
|
|
||||||
`-format` *format*
|
`-format` *format*
|
||||||
|
|
||||||
Allows the output of dmenu to be customized (N is the total number of input entries):
|
Allows the output of dmenu to be customized (N is the total number of input
|
||||||
|
entries):
|
||||||
|
|
||||||
* 's' selected string
|
- 's' selected string
|
||||||
* 'i' index (0 - (N-1))
|
- 'i' index (0 - (N-1))
|
||||||
* 'd' index (1 - N)
|
- 'd' index (1 - N)
|
||||||
* 'q' quote string
|
- 'q' quote string
|
||||||
* 'p' Selected string stripped from Pango markup (Needs to be a valid string)
|
- 'p' Selected string stripped from Pango markup (Needs to be a valid string)
|
||||||
* 'f' filter string (user input)
|
- 'f' filter string (user input)
|
||||||
* 'F' quoted filter string (user input)
|
- 'F' quoted filter string (user input)
|
||||||
|
|
||||||
Default: 's'
|
Default: 's'
|
||||||
|
|
||||||
|
@ -124,8 +138,9 @@ Select first line that matches the given string
|
||||||
|
|
||||||
`-mesg` *string*
|
`-mesg` *string*
|
||||||
|
|
||||||
Add a message line below the filter entry box. Supports Pango markup.
|
Add a message line below the filter entry box. Supports Pango markup. For more
|
||||||
For more information on supported markup, see [here](https://docs.gtk.org/Pango/pango_markup.html)
|
information on supported markup, see
|
||||||
|
[here](https://docs.gtk.org/Pango/pango_markup.html)
|
||||||
|
|
||||||
`-dump`
|
`-dump`
|
||||||
|
|
||||||
|
@ -144,18 +159,21 @@ Hide the input text. This should not be considered secure!
|
||||||
`-markup-rows`
|
`-markup-rows`
|
||||||
|
|
||||||
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
|
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
|
||||||
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html) for details about Pango markup.
|
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html)
|
||||||
|
for details about Pango markup.
|
||||||
|
|
||||||
`-multi-select`
|
`-multi-select`
|
||||||
|
|
||||||
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.
|
Allow multiple lines to be selected. Adds a small selection indicator to the
|
||||||
|
left of each entry.
|
||||||
|
|
||||||
`-sync`
|
`-sync`
|
||||||
|
|
||||||
Force **rofi** mode to first read all data from stdin before showing the selection window. This is original dmenu behavior.
|
Force **rofi** mode to first read all data from stdin before showing the
|
||||||
|
selection window. This is original dmenu behavior.
|
||||||
|
|
||||||
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
|
Note: the default asynchronous mode will also be automatically disabled if used
|
||||||
|
with conflicting options,
|
||||||
such as `-dump`, `-only-match` or `-auto-select`.
|
such as `-dump`, `-only-match` or `-auto-select`.
|
||||||
|
|
||||||
`-window-title` *title*
|
`-window-title` *title*
|
||||||
|
@ -192,16 +210,27 @@ When multi-select is enabled, prefix this string when element is not selected.
|
||||||
|
|
||||||
*default*: "☐ "
|
*default*: "☐ "
|
||||||
|
|
||||||
|
`-ellipsize-mode` (start|middle|end)
|
||||||
|
|
||||||
|
Set ellipsize mode on the listview.
|
||||||
|
|
||||||
|
*default* "end"
|
||||||
|
|
||||||
|
## PARSING ROW OPTIONS
|
||||||
|
|
||||||
|
Extra options for individual rows can be also set. See the **rofi-script(5)**
|
||||||
|
manpage for details; the syntax and supported features are identical.
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
|
||||||
* **0**: Row has been selected accepted by user.
|
- **0**: Row has been selected accepted by user.
|
||||||
* **1**: User cancelled the selection.
|
- **1**: User cancelled the selection.
|
||||||
* **10-28**: Row accepted by custom keybinding.
|
- **10-28**: Row accepted by custom keybinding.
|
||||||
|
|
||||||
|
|
||||||
## SEE ALSO
|
## SEE ALSO
|
||||||
|
|
||||||
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5),
|
||||||
|
rofi-theme-selector(1), ascii(7)
|
||||||
|
|
||||||
## AUTHOR
|
## AUTHOR
|
||||||
|
|
||||||
|
@ -211,7 +240,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.
|
||||||
|
|
|
@ -81,6 +81,21 @@ configuration {
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
.SH Unsetting a binding
|
||||||
|
.PP
|
||||||
|
To unset a binding, pass an empty string.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
.RS
|
||||||
|
|
||||||
|
.nf
|
||||||
|
configuration {
|
||||||
|
kb-clear-line: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi
|
||||||
|
.RE
|
||||||
|
|
||||||
.SH Keyboard Bindings
|
.SH Keyboard Bindings
|
||||||
.SS \fBkb-primary-paste\fP:
|
.SS \fBkb-primary-paste\fP:
|
||||||
.PP
|
.PP
|
||||||
|
@ -283,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
|
||||||
|
@ -357,7 +372,7 @@ Toggle case sensitivity
|
||||||
|
|
||||||
.SS \fBkb-toggle-sort\fP
|
.SS \fBkb-toggle-sort\fP
|
||||||
.PP
|
.PP
|
||||||
Toggle sort
|
Toggle filtered menu sort
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fBDefault\fP: Alt+grave
|
\fBDefault\fP: Alt+grave
|
||||||
|
@ -572,6 +587,20 @@ Select row 10
|
||||||
.PP
|
.PP
|
||||||
\fBDefault\fP: Super+0
|
\fBDefault\fP: Super+0
|
||||||
|
|
||||||
|
.SS \fBkb-entry-history-up\fP
|
||||||
|
.PP
|
||||||
|
Go up in the entry history.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fBDefault\fP: Control+Up
|
||||||
|
|
||||||
|
.SS \fBkb-entry-history-down\fP
|
||||||
|
.PP
|
||||||
|
Go down in the entry history.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fBDefault\fP: Control+Down
|
||||||
|
|
||||||
.SH Mouse Bindings
|
.SH Mouse Bindings
|
||||||
.SS \fBml-row-left\fP
|
.SS \fBml-row-left\fP
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
## NAME
|
## NAME
|
||||||
|
|
||||||
**rofi keys** - Rofi Key and Mouse bindings
|
**rofi keys** - Rofi Key and Mouse bindings
|
||||||
|
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
||||||
|
@ -52,18 +51,29 @@ configuration {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Unsetting a binding
|
||||||
|
|
||||||
|
To unset a binding, pass an empty string.
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-clear-line: "";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## 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**
|
||||||
|
|
||||||
|
@ -72,381 +82,466 @@ 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
|
|
||||||
|
|
||||||
**Default**: Alt+grave
|
Toggle filtered menu sort
|
||||||
|
|
||||||
|
**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**
|
||||||
|
|
||||||
|
Go up in the entry history.
|
||||||
|
|
||||||
|
**Default**: Control+Up
|
||||||
|
|
||||||
|
### **kb-entry-history-down**
|
||||||
|
|
||||||
|
Go down in the entry history.
|
||||||
|
|
||||||
|
**Default**: Control+Down
|
||||||
|
|
||||||
## 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
|
||||||
|
|
||||||
|
@ -456,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.
|
||||||
|
|
|
@ -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,12 @@ 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
|
||||||
|
\fBurgent\fP: Set urgent flag on entry (true/false)
|
||||||
|
.IP \(bu 2
|
||||||
|
\fBactive\fP: Set active flag on entry (true/false)
|
||||||
|
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
@ -182,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\&.
|
||||||
|
@ -199,12 +219,35 @@ 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
|
||||||
|
.PP
|
||||||
|
To specify a script there are the following options:
|
||||||
|
|
||||||
|
.RS
|
||||||
|
.IP \(bu 2
|
||||||
|
Specify an absolute path to the script.
|
||||||
|
.IP \(bu 2
|
||||||
|
The script is executable and located in your $PATH
|
||||||
|
|
||||||
|
.RE
|
||||||
|
|
||||||
|
.PP
|
||||||
|
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\&.
|
||||||
|
|
||||||
|
.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
|
||||||
|
|
|
@ -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,10 +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.
|
|
||||||
|
- **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.
|
multiple entries can be passed using the `\x1f` separator.
|
||||||
|
|
||||||
|
@ -121,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`.
|
||||||
|
|
||||||
|
@ -130,16 +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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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/`.
|
||||||
|
|
||||||
## 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
|
||||||
|
|
||||||
|
@ -149,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.
|
||||||
|
|
|
@ -55,6 +55,8 @@ konsole
|
||||||
alacritty
|
alacritty
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
kitty
|
kitty
|
||||||
|
.IP \(bu 2
|
||||||
|
wezterm
|
||||||
|
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ It tries to start one of the following (in that order):
|
||||||
* konsole
|
* konsole
|
||||||
* alacritty
|
* alacritty
|
||||||
* kitty
|
* kitty
|
||||||
|
* wezterm
|
||||||
|
|
||||||
|
|
||||||
## SEE ALSO
|
## SEE ALSO
|
||||||
|
|
|
@ -6,15 +6,15 @@
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.PP
|
.PP
|
||||||
\fBrofi-theme-selector\fP is a bash/rofi script to preview and apply themes for \fBrofi\fP\&.
|
\fBrofi-theme-selector\fP is a bash/rofi script to preview and apply themes for
|
||||||
It's part of any installation of \fBrofi\fP\&.
|
\fBrofi\fP\&. It's part of any installation of \fBrofi\fP\&.
|
||||||
|
|
||||||
.SH USAGE
|
.SH USAGE
|
||||||
.SS Running rofi-theme-selector
|
.SS Running rofi-theme-selector
|
||||||
.PP
|
.PP
|
||||||
\fBrofi-theme-selector\fP shows a list of all available themes in a \fBrofi\fP window.
|
\fBrofi-theme-selector\fP shows a list of all available themes in a \fBrofi\fP
|
||||||
It lets you preview each theme with the Enter key and apply the theme to your
|
window. It lets you preview each theme with the Enter key and apply the theme
|
||||||
\fBrofi\fP configuration file with Alt+a.
|
to your \fBrofi\fP configuration file with Alt+a.
|
||||||
|
|
||||||
.SH Theme directories
|
.SH Theme directories
|
||||||
.PP
|
.PP
|
||||||
|
@ -31,7 +31,8 @@ $XDG_DATA_HOME/share/rofi/themes
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".
|
${PREFIX} reflects the install location of rofi. In most cases this will be
|
||||||
|
"/usr".
|
||||||
$XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config".
|
$XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config".
|
||||||
$XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share".
|
$XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share".
|
||||||
|
|
||||||
|
|
|
@ -6,27 +6,27 @@
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
||||||
**rofi-theme-selector** is a bash/rofi script to preview and apply themes for **rofi**.
|
**rofi-theme-selector** is a bash/rofi script to preview and apply themes for
|
||||||
It's part of any installation of **rofi**.
|
**rofi**. It's part of any installation of **rofi**.
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
|
|
||||||
### Running rofi-theme-selector
|
### Running rofi-theme-selector
|
||||||
|
|
||||||
**rofi-theme-selector** shows a list of all available themes in a **rofi** window.
|
**rofi-theme-selector** shows a list of all available themes in a **rofi**
|
||||||
It lets you preview each theme with the Enter key and apply the theme to your
|
window. It lets you preview each theme with the Enter key and apply the theme
|
||||||
**rofi** configuration file with Alt+a.
|
to your **rofi** configuration file with Alt+a.
|
||||||
|
|
||||||
|
|
||||||
## Theme directories
|
## Theme directories
|
||||||
|
|
||||||
**rofi-theme-selector** searches the following directories for themes:
|
**rofi-theme-selector** searches the following directories for themes:
|
||||||
|
|
||||||
* ${PREFIX}/share/rofi/themes
|
- ${PREFIX}/share/rofi/themes
|
||||||
* $XDG_CONFIG_HOME/rofi/themes
|
- $XDG_CONFIG_HOME/rofi/themes
|
||||||
* $XDG_DATA_HOME/share/rofi/themes
|
- $XDG_DATA_HOME/share/rofi/themes
|
||||||
|
|
||||||
${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".<br>
|
${PREFIX} reflects the install location of rofi. In most cases this will be
|
||||||
|
"/usr".<br>
|
||||||
$XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config".<br>
|
$XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config".<br>
|
||||||
$XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share".
|
$XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share".
|
||||||
|
|
||||||
|
|
709
doc/rofi-theme.5
709
doc/rofi-theme.5
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
914
doc/rofi.1
914
doc/rofi.1
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -393,12 +393,42 @@ char *helper_string_replace_if_exists(char *string, ...);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param file File name passed to option.
|
* @param file File name passed to option.
|
||||||
* @param ext File extension passed to option.
|
* @param ext NULL terminated array of file extension passed to option.
|
||||||
|
* @param parent_dir The file that was used to import this file, or NULL.
|
||||||
*
|
*
|
||||||
* @returns path to theme or copy of filename if not found.
|
* @returns path to theme or copy of filename if not found.
|
||||||
*/
|
*/
|
||||||
char *helper_get_theme_path(const char *file, const char *ext);
|
char *helper_get_theme_path(const char *file, const char **ext,
|
||||||
|
const char *parent_dir)
|
||||||
|
__attribute__((nonnull(1, 2)));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param name The name of the element to find.
|
||||||
|
* @param state The state of the element.
|
||||||
|
* @param exact If the match should be exact, or parent can be included.
|
||||||
|
*
|
||||||
|
* Find the configuration element. If not exact, the closest specified element
|
||||||
|
* is returned.
|
||||||
|
*
|
||||||
|
* @returns the ThemeWidget if found, otherwise NULL.
|
||||||
|
*/
|
||||||
|
ConfigEntry *rofi_config_find_widget(const char *name, const char *state,
|
||||||
|
gboolean exact);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param widget The widget to find the property on.
|
||||||
|
* @param type The %PropertyType to find.
|
||||||
|
* @param property The property to find.
|
||||||
|
* @param exact If the property should only be found on this widget, or on
|
||||||
|
* parents if not found.
|
||||||
|
*
|
||||||
|
* Find the property on the widget. If not exact, the parents are searched
|
||||||
|
* recursively until match is found.
|
||||||
|
*
|
||||||
|
* @returns the Property if found, otherwise NULL.
|
||||||
|
*/
|
||||||
|
Property *rofi_theme_find_property(ConfigEntry *widget, PropertyType type,
|
||||||
|
const char *property, gboolean exact);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
/**@} */
|
/**@} */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -143,6 +143,8 @@ typedef enum {
|
||||||
SELECT_ELEMENT_8,
|
SELECT_ELEMENT_8,
|
||||||
SELECT_ELEMENT_9,
|
SELECT_ELEMENT_9,
|
||||||
SELECT_ELEMENT_10,
|
SELECT_ELEMENT_10,
|
||||||
|
ENTRY_HISTORY_UP,
|
||||||
|
ENTRY_HISTORY_DOWN,
|
||||||
} KeyBindingAction;
|
} KeyBindingAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -186,6 +188,9 @@ gboolean parse_keys_abe(NkBindings *bindings);
|
||||||
*/
|
*/
|
||||||
void setup_abe(void);
|
void setup_abe(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List all available key bindings to the terminal.
|
||||||
|
*/
|
||||||
void abe_list_all_bindings(gboolean is_term);
|
void abe_list_all_bindings(gboolean is_term);
|
||||||
/**
|
/**
|
||||||
* @param name Don't have the name.
|
* @param name Don't have the name.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -32,7 +32,22 @@
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/** ABI version to check if loaded plugin is compatible. */
|
/** ABI version to check if loaded plugin is compatible. */
|
||||||
#define ABI_VERSION 6u
|
#define ABI_VERSION 7u
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicator what type of mode this is.
|
||||||
|
* For now it can be the classic switcher, or also implement a completer.
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
/** Mode type is not set */
|
||||||
|
MODE_TYPE_UNSET = 0x0,
|
||||||
|
/** A normal mode. */
|
||||||
|
MODE_TYPE_SWITCHER = 0x1,
|
||||||
|
/** A mode that can be used to completer */
|
||||||
|
MODE_TYPE_COMPLETER = 0x2,
|
||||||
|
/** DMenu mode. */
|
||||||
|
MODE_TYPE_DMENU = 0x4,
|
||||||
|
} ModeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param data Pointer to #Mode object.
|
* @param data Pointer to #Mode object.
|
||||||
|
@ -153,6 +168,29 @@ typedef char *(*_mode_preprocess_input)(Mode *sw, const char *input);
|
||||||
*/
|
*/
|
||||||
typedef char *(*_mode_get_message)(const Mode *sw);
|
typedef char *(*_mode_get_message)(const Mode *sw);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of this mode.
|
||||||
|
* Free (free) result after use, after using mode_destroy.
|
||||||
|
*
|
||||||
|
* @returns Instantiate a new instance of this mode.
|
||||||
|
*/
|
||||||
|
typedef Mode *(*_mode_create)(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param sw The #Mode pointer
|
||||||
|
* @param menu_retv The return value
|
||||||
|
* @param input The input string
|
||||||
|
* @param selected_line The selected line
|
||||||
|
* @param path the path that was completed
|
||||||
|
*
|
||||||
|
* Handle the user accepting an entry in completion mode.
|
||||||
|
*
|
||||||
|
* @returns the next action to take
|
||||||
|
*/
|
||||||
|
typedef ModeMode (*_mode_completer_result)(Mode *sw, int menu_retv,
|
||||||
|
char **input,
|
||||||
|
unsigned int selected_line,
|
||||||
|
char **path);
|
||||||
/**
|
/**
|
||||||
* Structure defining a switcher.
|
* Structure defining a switcher.
|
||||||
* It consists of a name, callback and if enabled
|
* It consists of a name, callback and if enabled
|
||||||
|
@ -199,6 +237,17 @@ struct rofi_mode {
|
||||||
* And has data in `ed`
|
* And has data in `ed`
|
||||||
*/
|
*/
|
||||||
_mode_free free;
|
_mode_free free;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create mode.
|
||||||
|
*/
|
||||||
|
_mode_create _create;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this mode is used as completer.
|
||||||
|
*/
|
||||||
|
_mode_completer_result _completer_result;
|
||||||
|
|
||||||
/** Extra fields for script */
|
/** Extra fields for script */
|
||||||
void *ed;
|
void *ed;
|
||||||
|
|
||||||
|
@ -208,6 +257,9 @@ struct rofi_mode {
|
||||||
/** Fallack icon.*/
|
/** Fallack icon.*/
|
||||||
uint32_t fallback_icon_fetch_uid;
|
uint32_t fallback_icon_fetch_uid;
|
||||||
uint32_t fallback_icon_not_found;
|
uint32_t fallback_icon_not_found;
|
||||||
|
|
||||||
|
/** type */
|
||||||
|
ModeType type;
|
||||||
};
|
};
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif // ROFI_MODE_PRIVATE_H
|
#endif // ROFI_MODE_PRIVATE_H
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -248,6 +248,36 @@ char *mode_preprocess_input(Mode *mode, const char *input);
|
||||||
* free).
|
* free).
|
||||||
*/
|
*/
|
||||||
char *mode_get_message(const Mode *mode);
|
char *mode_get_message(const Mode *mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mode The mode to create an instance off.
|
||||||
|
*
|
||||||
|
* @returns a new instance of the mode.
|
||||||
|
*/
|
||||||
|
Mode *mode_create(const Mode *mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param sw The mode to query
|
||||||
|
* @param menu_retv The menu return value.
|
||||||
|
* @param input Pointer to the user input string. [in][out]
|
||||||
|
* @param selected_line the line selected by the user.
|
||||||
|
* @param path get the path to the selected file. [out]
|
||||||
|
*
|
||||||
|
* Acts on the user interaction.
|
||||||
|
*
|
||||||
|
* @returns the next #ModeMode.
|
||||||
|
*/
|
||||||
|
ModeMode mode_completer_result(Mode *sw, int menu_retv, char **input,
|
||||||
|
unsigned int selected_line, char **path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param sw The mode to query.
|
||||||
|
*
|
||||||
|
* Check if mode is a valid completer.
|
||||||
|
*
|
||||||
|
* @returns TRUE if mode can be used as completer.
|
||||||
|
*/
|
||||||
|
gboolean mode_is_completer(const Mode *sw);
|
||||||
/**@}*/
|
/**@}*/
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,6 +22,11 @@ typedef struct {
|
||||||
|
|
||||||
/** non-selectable */
|
/** non-selectable */
|
||||||
gboolean nonselectable;
|
gboolean nonselectable;
|
||||||
|
|
||||||
|
/** urgent */
|
||||||
|
gboolean urgent;
|
||||||
|
/** active */
|
||||||
|
gboolean active;
|
||||||
} DmenuScriptEntry;
|
} DmenuScriptEntry;
|
||||||
/**
|
/**
|
||||||
* @param sw Unused
|
* @param sw Unused
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "modes/dmenu.h"
|
#include "modes/dmenu.h"
|
||||||
#include "modes/drun.h"
|
#include "modes/drun.h"
|
||||||
#include "modes/filebrowser.h"
|
#include "modes/filebrowser.h"
|
||||||
|
#include "modes/recursivebrowser.h"
|
||||||
#include "modes/help-keys.h"
|
#include "modes/help-keys.h"
|
||||||
#include "modes/run.h"
|
#include "modes/run.h"
|
||||||
#include "modes/script.h"
|
#include "modes/script.h"
|
||||||
|
|
58
include/modes/recursivebrowser.h
Normal file
58
include/modes/recursivebrowser.h
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* rofi
|
||||||
|
*
|
||||||
|
* MIT/X11 License
|
||||||
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ROFI_MODE_RECURSIVE_BROWSER_H
|
||||||
|
#define ROFI_MODE_RECURSIVE_BROWSER_H
|
||||||
|
#include "mode.h"
|
||||||
|
/**
|
||||||
|
* @defgroup FileBrowserMode FileBrowser
|
||||||
|
* @ingroup MODES
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/** #Mode object representing the run dialog. */
|
||||||
|
extern Mode recursive_browser_mode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new filebrowser.
|
||||||
|
* @returns a new filebrowser structure.
|
||||||
|
*/
|
||||||
|
Mode *create_new_recursive_browser(void);
|
||||||
|
/**
|
||||||
|
* @param sw Mode object.
|
||||||
|
* @param mretv return value passed in.
|
||||||
|
* @param input The user input string.
|
||||||
|
* @param selected_line The user selected line.
|
||||||
|
* @param path The full path as output.
|
||||||
|
*
|
||||||
|
* @returns the state the user selected.
|
||||||
|
*/
|
||||||
|
ModeMode recursive_browser_mode_completer(Mode *sw, int mretv, char **input,
|
||||||
|
unsigned int selected_line, char **path);
|
||||||
|
/**@}*/
|
||||||
|
#endif // ROFI_MODE_RECURSIVE_BROWSER_H
|
|
@ -66,6 +66,16 @@ uint32_t rofi_icon_fetcher_query_advanced(const char *name, const int wsize,
|
||||||
*/
|
*/
|
||||||
cairo_surface_t *rofi_icon_fetcher_get(const uint32_t uid);
|
cairo_surface_t *rofi_icon_fetcher_get(const uint32_t uid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param uid The unique id representing the matching request.
|
||||||
|
* @param surface [out] The surface found.
|
||||||
|
*
|
||||||
|
* If the surface is used, the user should reference the surface.
|
||||||
|
*
|
||||||
|
* @returns false if a query was done and failed.
|
||||||
|
*/
|
||||||
|
gboolean rofi_icon_fetcher_get_ex(const uint32_t uid,
|
||||||
|
cairo_surface_t **surface);
|
||||||
/**
|
/**
|
||||||
* @param path the image path to check.
|
* @param path the image path to check.
|
||||||
*
|
*
|
||||||
|
|
|
@ -298,6 +298,57 @@ typedef struct Property {
|
||||||
PropertyValue value;
|
PropertyValue value;
|
||||||
} Property;
|
} Property;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Describe the media constraint type.
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
/** Minimum width constraint. */
|
||||||
|
THEME_MEDIA_TYPE_MIN_WIDTH,
|
||||||
|
/** Maximum width constraint. */
|
||||||
|
THEME_MEDIA_TYPE_MAX_WIDTH,
|
||||||
|
/** Minimum height constraint. */
|
||||||
|
THEME_MEDIA_TYPE_MIN_HEIGHT,
|
||||||
|
/** Maximum height constraint. */
|
||||||
|
THEME_MEDIA_TYPE_MAX_HEIGHT,
|
||||||
|
/** Monitor id constraint. */
|
||||||
|
THEME_MEDIA_TYPE_MON_ID,
|
||||||
|
/** Minimum aspect ratio constraint. */
|
||||||
|
THEME_MEDIA_TYPE_MIN_ASPECT_RATIO,
|
||||||
|
/** Maximum aspect ratio constraint. */
|
||||||
|
THEME_MEDIA_TYPE_MAX_ASPECT_RATIO,
|
||||||
|
/** Boolean option for use with env. */
|
||||||
|
THEME_MEDIA_TYPE_BOOLEAN,
|
||||||
|
/** Invalid entry. */
|
||||||
|
THEME_MEDIA_TYPE_INVALID,
|
||||||
|
} ThemeMediaType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Theme Media description.
|
||||||
|
*/
|
||||||
|
typedef struct ThemeMedia {
|
||||||
|
ThemeMediaType type;
|
||||||
|
double value;
|
||||||
|
gboolean boolv;
|
||||||
|
} ThemeMedia;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ThemeWidget.
|
||||||
|
*/
|
||||||
|
typedef struct ThemeWidget {
|
||||||
|
int set;
|
||||||
|
char *name;
|
||||||
|
|
||||||
|
unsigned int num_widgets;
|
||||||
|
struct ThemeWidget **widgets;
|
||||||
|
|
||||||
|
ThemeMedia *media;
|
||||||
|
|
||||||
|
GHashTable *properties;
|
||||||
|
|
||||||
|
struct ThemeWidget *parent;
|
||||||
|
} ThemeWidget;
|
||||||
|
|
||||||
|
typedef ThemeWidget ConfigEntry;
|
||||||
/**
|
/**
|
||||||
* Structure to hold a range.
|
* Structure to hold a range.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -103,6 +103,14 @@ void rofi_quit_main_loop(void);
|
||||||
* @return returns Mode * when found, NULL if not.
|
* @return returns Mode * when found, NULL if not.
|
||||||
*/
|
*/
|
||||||
Mode *rofi_collect_modes_search(const char *name);
|
Mode *rofi_collect_modes_search(const char *name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query the configure file completer.
|
||||||
|
*
|
||||||
|
* @returns the Mode that can be used for file completion or NULL when not
|
||||||
|
* found.
|
||||||
|
*/
|
||||||
|
const Mode *rofi_get_completer(void);
|
||||||
/** Reset terminal */
|
/** Reset terminal */
|
||||||
#define color_reset "\033[0m"
|
#define color_reset "\033[0m"
|
||||||
/** Set terminal text bold */
|
/** Set terminal text bold */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -192,6 +192,8 @@ typedef struct {
|
||||||
|
|
||||||
/** workaround for broken xserver (#300 on xserver, #611) */
|
/** workaround for broken xserver (#300 on xserver, #611) */
|
||||||
gboolean xserver_i300_workaround;
|
gboolean xserver_i300_workaround;
|
||||||
|
/** completer mode */
|
||||||
|
char *completer_mode;
|
||||||
} Settings;
|
} Settings;
|
||||||
|
|
||||||
/** Default number of lines in the list view */
|
/** Default number of lines in the list view */
|
||||||
|
|
113
include/theme.h
113
include/theme.h
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -32,61 +32,6 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <widgets/widget.h>
|
#include <widgets/widget.h>
|
||||||
|
|
||||||
/**
|
|
||||||
* Describe the media constraint type.
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
/** Minimum width constraint. */
|
|
||||||
THEME_MEDIA_TYPE_MIN_WIDTH,
|
|
||||||
/** Maximum width constraint. */
|
|
||||||
THEME_MEDIA_TYPE_MAX_WIDTH,
|
|
||||||
/** Minimum height constraint. */
|
|
||||||
THEME_MEDIA_TYPE_MIN_HEIGHT,
|
|
||||||
/** Maximum height constraint. */
|
|
||||||
THEME_MEDIA_TYPE_MAX_HEIGHT,
|
|
||||||
/** Monitor id constraint. */
|
|
||||||
THEME_MEDIA_TYPE_MON_ID,
|
|
||||||
/** Minimum aspect ratio constraint. */
|
|
||||||
THEME_MEDIA_TYPE_MIN_ASPECT_RATIO,
|
|
||||||
/** Maximum aspect ratio constraint. */
|
|
||||||
THEME_MEDIA_TYPE_MAX_ASPECT_RATIO,
|
|
||||||
/** Boolean option for use with env. */
|
|
||||||
THEME_MEDIA_TYPE_BOOLEAN,
|
|
||||||
/** Invalid entry. */
|
|
||||||
THEME_MEDIA_TYPE_INVALID,
|
|
||||||
} ThemeMediaType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Theme Media description.
|
|
||||||
*/
|
|
||||||
typedef struct ThemeMedia {
|
|
||||||
ThemeMediaType type;
|
|
||||||
double value;
|
|
||||||
gboolean boolv;
|
|
||||||
} ThemeMedia;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ThemeWidget.
|
|
||||||
*/
|
|
||||||
typedef struct ThemeWidget {
|
|
||||||
int set;
|
|
||||||
char *name;
|
|
||||||
|
|
||||||
unsigned int num_widgets;
|
|
||||||
struct ThemeWidget **widgets;
|
|
||||||
|
|
||||||
ThemeMedia *media;
|
|
||||||
|
|
||||||
GHashTable *properties;
|
|
||||||
|
|
||||||
struct ThemeWidget *parent;
|
|
||||||
} ThemeWidget;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display scale.
|
|
||||||
*/
|
|
||||||
typedef guint (*disp_scale_func)(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Global pointer to the current active theme.
|
* Global pointer to the current active theme.
|
||||||
*/
|
*/
|
||||||
|
@ -141,10 +86,13 @@ void rofi_theme_property_free(Property *p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param p The property to free.
|
* @param p The property to free.
|
||||||
|
* @param data User data (unused)
|
||||||
|
*
|
||||||
|
* Make a newly allocted copy of the property.
|
||||||
*
|
*
|
||||||
* @returns a copy of p
|
* @returns a copy of p
|
||||||
*/
|
*/
|
||||||
Property *rofi_theme_property_copy(const Property *p, void *);
|
Property *rofi_theme_property_copy(const Property *p, G_GNUC_UNUSED void *);
|
||||||
/**
|
/**
|
||||||
* @param widget
|
* @param widget
|
||||||
*
|
*
|
||||||
|
@ -367,34 +315,6 @@ void distance_get_linestyle(RofiDistance d, cairo_t *draw);
|
||||||
ThemeWidget *rofi_theme_find_widget(const char *name, const char *state,
|
ThemeWidget *rofi_theme_find_widget(const char *name, const char *state,
|
||||||
gboolean exact);
|
gboolean exact);
|
||||||
|
|
||||||
/**
|
|
||||||
* @param name The name of the element to find.
|
|
||||||
* @param state The state of the element.
|
|
||||||
* @param exact If the match should be exact, or parent can be included.
|
|
||||||
*
|
|
||||||
* Find the configuration element. If not exact, the closest specified element
|
|
||||||
* is returned.
|
|
||||||
*
|
|
||||||
* @returns the ThemeWidget if found, otherwise NULL.
|
|
||||||
*/
|
|
||||||
ThemeWidget *rofi_config_find_widget(const char *name, const char *state,
|
|
||||||
gboolean exact);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param widget The widget to find the property on.
|
|
||||||
* @param type The %PropertyType to find.
|
|
||||||
* @param property The property to find.
|
|
||||||
* @param exact If the property should only be found on this widget, or on
|
|
||||||
* parents if not found.
|
|
||||||
*
|
|
||||||
* Find the property on the widget. If not exact, the parents are searched
|
|
||||||
* recursively until match is found.
|
|
||||||
*
|
|
||||||
* @returns the Property if found, otherwise NULL.
|
|
||||||
*/
|
|
||||||
Property *rofi_theme_find_property(ThemeWidget *widget, PropertyType type,
|
|
||||||
const char *property, gboolean exact);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the current theme.
|
* Reset the current theme.
|
||||||
*/
|
*/
|
||||||
|
@ -402,13 +322,12 @@ void rofi_theme_reset(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param file File name to prepare.
|
* @param file File name to prepare.
|
||||||
* @param parent_file Filename of parent file.
|
|
||||||
*
|
*
|
||||||
* Tries to find full path relative to parent file.
|
* Tries to find full path relative to parent file.
|
||||||
*
|
*
|
||||||
* @returns full path to file.
|
* @returns full path to file.
|
||||||
*/
|
*/
|
||||||
char *rofi_theme_parse_prepare_file(const char *file, const char *parent_file);
|
char *rofi_theme_parse_prepare_file(const char *file);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process conditionals.
|
* Process conditionals.
|
||||||
|
@ -463,12 +382,32 @@ void rofi_theme_free_parsed_files(void);
|
||||||
void rofi_theme_print_parsed_files(int is_term);
|
void rofi_theme_print_parsed_files(int is_term);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param widget The widget handle.
|
||||||
|
* @param property The property to query.
|
||||||
|
*
|
||||||
* Returns a list of allocated RofiDistance objects that should be
|
* Returns a list of allocated RofiDistance objects that should be
|
||||||
* freed.
|
* freed.
|
||||||
|
*
|
||||||
|
* @returns a GList of RofiDistance objects.
|
||||||
*/
|
*/
|
||||||
GList *rofi_theme_get_list_distance(const widget *widget, const char *property);
|
GList *rofi_theme_get_list_distance(const widget *widget, const char *property);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param widget The widget handle.
|
||||||
|
* @param property The property to query.
|
||||||
|
*
|
||||||
|
* Returns a list of allocated strings othat should be
|
||||||
|
* freed.
|
||||||
|
*
|
||||||
|
* @returns a GList of strings.
|
||||||
|
*/
|
||||||
GList *rofi_theme_get_list_strings(const widget *widget, const char *property);
|
GList *rofi_theme_get_list_strings(const widget *widget, const char *property);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display scale function type
|
||||||
|
*/
|
||||||
|
typedef guint (*disp_scale_func)(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param func The function pointer to scale getter.
|
* @param func The function pointer to scale getter.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -111,7 +111,9 @@ struct RofiViewState {
|
||||||
/** filtered rows */
|
/** filtered rows */
|
||||||
textbox *tb_filtered_rows;
|
textbox *tb_filtered_rows;
|
||||||
|
|
||||||
|
/** Extra icon widget that shows the current selected entries text. */
|
||||||
textbox *tb_current_entry;
|
textbox *tb_current_entry;
|
||||||
|
/** Extra icon widget that shows the current selected entries icon. */
|
||||||
icon *icon_current_entry;
|
icon *icon_current_entry;
|
||||||
|
|
||||||
/** Settings of the menu */
|
/** Settings of the menu */
|
||||||
|
@ -186,6 +188,11 @@ typedef struct _view_proxy {
|
||||||
void (*pool_refresh)();
|
void (*pool_refresh)();
|
||||||
} view_proxy;
|
} view_proxy;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char *string;
|
||||||
|
int index;
|
||||||
|
} EntryHistoryIndex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structure holding cached state.
|
* Structure holding cached state.
|
||||||
*/
|
*/
|
||||||
|
@ -198,12 +205,24 @@ struct _rofi_view_cache_state {
|
||||||
GQueue views;
|
GQueue views;
|
||||||
/** timeout for reloading */
|
/** timeout for reloading */
|
||||||
guint refilter_timeout;
|
guint refilter_timeout;
|
||||||
|
/* amount of time refiltering delay got reset */
|
||||||
guint refilter_timeout_count;
|
guint refilter_timeout_count;
|
||||||
|
|
||||||
|
/** if filtering takes longer then this time,
|
||||||
|
* reduce the amount of refilters. */
|
||||||
double max_refilter_time;
|
double max_refilter_time;
|
||||||
|
/** enable the reduced refilter mode. */
|
||||||
gboolean delayed_mode;
|
gboolean delayed_mode;
|
||||||
/** timeout handling */
|
/** timeout handling */
|
||||||
guint user_timeout;
|
guint user_timeout;
|
||||||
|
/** Entry box */
|
||||||
|
gboolean entry_history_enable;
|
||||||
|
/** Array with history entriy input. */
|
||||||
|
EntryHistoryIndex *entry_history;
|
||||||
|
/** Length of the array */
|
||||||
|
gssize entry_history_length;
|
||||||
|
/** The current index being viewed. */
|
||||||
|
gssize entry_history_index;
|
||||||
};
|
};
|
||||||
extern struct _rofi_view_cache_state CacheState;
|
extern struct _rofi_view_cache_state CacheState;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -29,6 +29,8 @@
|
||||||
#define ROFI_VIEW_H
|
#define ROFI_VIEW_H
|
||||||
|
|
||||||
#include "mode.h"
|
#include "mode.h"
|
||||||
|
#include "widgets/widget.h"
|
||||||
|
#include <pango/pango.h>
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
/**
|
/**
|
||||||
* @defgroup View View
|
* @defgroup View View
|
||||||
|
@ -339,11 +341,6 @@ void rofi_capture_screenshot(void);
|
||||||
*/
|
*/
|
||||||
void rofi_view_set_window_title(const char *title);
|
void rofi_view_set_window_title(const char *title);
|
||||||
|
|
||||||
/**
|
|
||||||
* set ellipsize mode to start.
|
|
||||||
*/
|
|
||||||
void rofi_view_ellipsize_start(RofiViewState *state);
|
|
||||||
|
|
||||||
void rofi_view_set_size(RofiViewState *state, gint width, gint height);
|
void rofi_view_set_size(RofiViewState *state, gint width, gint height);
|
||||||
|
|
||||||
void rofi_view_get_size(RofiViewState *state, gint *width, gint *height);
|
void rofi_view_get_size(RofiViewState *state, gint *width, gint *height);
|
||||||
|
@ -355,6 +352,13 @@ void rofi_view_pool_refresh(void);
|
||||||
|
|
||||||
void rofi_view_set_cursor(RofiCursorType type);
|
void rofi_view_set_cursor(RofiCursorType type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Input history
|
||||||
|
*/
|
||||||
|
|
||||||
|
void input_history_save(void);
|
||||||
|
void input_history_initialize(void);
|
||||||
|
|
||||||
struct _view_proxy;
|
struct _view_proxy;
|
||||||
|
|
||||||
/* Implementations */
|
/* Implementations */
|
||||||
|
@ -365,5 +369,37 @@ extern const struct _view_proxy *wayland_view_proxy;
|
||||||
|
|
||||||
void view_init(const struct _view_proxy *view_in);
|
void view_init(const struct _view_proxy *view_in);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@param state The window state handle
|
||||||
|
@param mode The pango ellipsize mode to user
|
||||||
|
* set ellipsize mode to start.
|
||||||
|
*/
|
||||||
|
void rofi_view_ellipsize_listview(RofiViewState *state,
|
||||||
|
PangoEllipsizeMode mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param new_x New XIM window x pos
|
||||||
|
* @param new_y New XIM window y pos
|
||||||
|
*
|
||||||
|
* Updates the XIM window position to new_x and new_y, relative to the
|
||||||
|
* main_window
|
||||||
|
*/
|
||||||
|
gboolean rofi_set_im_window_pos(int new_x, int new_y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param wid to test.
|
||||||
|
* @param action the action done.
|
||||||
|
* @param x [unused]
|
||||||
|
* @param y [unsued]
|
||||||
|
* @param user_data
|
||||||
|
*
|
||||||
|
* textbux widget trigger action function.
|
||||||
|
*
|
||||||
|
* @return the result.
|
||||||
|
*/
|
||||||
|
WidgetTriggerActionResult textbox_button_trigger_action(
|
||||||
|
widget *wid, MouseBindingMouseDefaultAction action, G_GNUC_UNUSED gint x,
|
||||||
|
G_GNUC_UNUSED gint y, G_GNUC_UNUSED void *user_data);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#define ROFI_LISTVIEW_H
|
#define ROFI_LISTVIEW_H
|
||||||
|
|
||||||
#include "widgets/textbox.h"
|
#include "widgets/textbox.h"
|
||||||
|
#include <pango/pango.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup listview listview
|
* @defgroup listview listview
|
||||||
|
@ -231,13 +232,6 @@ void listview_set_scroll_type(listview *lv, ScrollType type);
|
||||||
void listview_set_mouse_activated_cb(listview *lv,
|
void listview_set_mouse_activated_cb(listview *lv,
|
||||||
listview_mouse_activated_cb cb,
|
listview_mouse_activated_cb cb,
|
||||||
void *udata);
|
void *udata);
|
||||||
/**
|
|
||||||
* @param lv Handler to the listview object.
|
|
||||||
* @param num_lines the maximum number of lines to display.
|
|
||||||
*
|
|
||||||
* Set the maximum number of lines to display.
|
|
||||||
*/
|
|
||||||
void listview_set_num_lines(listview *lv, unsigned int num_lines);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param lv Handler to the listview object.
|
* @param lv Handler to the listview object.
|
||||||
|
@ -272,11 +266,12 @@ void listview_toggle_ellipsizing(listview *lv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param lv Handler to the listview object.
|
* @param lv Handler to the listview object.
|
||||||
|
* @param mode The ellipsize mode to set.
|
||||||
*
|
*
|
||||||
* Set ellipsize mode to start.
|
* Set ellipsize mode on the listview.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void listview_set_ellipsize_start(listview *lv);
|
void listview_set_ellipsize(listview *lv, PangoEllipsizeMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param lv Handler to the listview object.
|
* @param lv Handler to the listview object.
|
||||||
|
|
|
@ -75,6 +75,8 @@ typedef struct {
|
||||||
double yalign;
|
double yalign;
|
||||||
double xalign;
|
double xalign;
|
||||||
|
|
||||||
|
int cursor_x_pos;
|
||||||
|
|
||||||
TBFontConfig *tbfc;
|
TBFontConfig *tbfc;
|
||||||
|
|
||||||
PangoEllipsizeMode emode;
|
PangoEllipsizeMode emode;
|
||||||
|
@ -310,6 +312,7 @@ PangoAttrList *textbox_get_pango_attributes(textbox *tb);
|
||||||
* @returns the visible text.
|
* @returns the visible text.
|
||||||
*/
|
*/
|
||||||
const char *textbox_get_visible_text(const textbox *tb);
|
const char *textbox_get_visible_text(const textbox *tb);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param wid The handle to the textbox.
|
* @param wid The handle to the textbox.
|
||||||
* @param height The height we want the desired width for
|
* @param height The height we want the desired width for
|
||||||
|
@ -318,7 +321,7 @@ const char *textbox_get_visible_text(const textbox *tb);
|
||||||
*
|
*
|
||||||
* @returns the desired width of the textbox.
|
* @returns the desired width of the textbox.
|
||||||
*/
|
*/
|
||||||
int textbox_get_desired_width(widget *wid, const int height);
|
int textbox_get_desired_width(widget *wid, G_GNUC_UNUSED const int height);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param tb Handle to the textbox
|
* @param tb Handle to the textbox
|
||||||
|
@ -334,5 +337,26 @@ void textbox_cursor_end(textbox *tb);
|
||||||
* Set the ellipsizing mode used on the string.
|
* Set the ellipsizing mode used on the string.
|
||||||
*/
|
*/
|
||||||
void textbox_set_ellipsize(textbox *tb, PangoEllipsizeMode mode);
|
void textbox_set_ellipsize(textbox *tb, PangoEllipsizeMode mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tb Handle to the textbox
|
||||||
|
*
|
||||||
|
* @returns the position of the cursor (0 if no cursor).
|
||||||
|
*/
|
||||||
|
int textbox_get_cursor_x_pos(const textbox *tb);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tb Handle to the textbox
|
||||||
|
*
|
||||||
|
* @returns gets a newly allocated copy of the content of the entrybox.
|
||||||
|
*/
|
||||||
|
char *textbox_get_text(const textbox *tb);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tb Handle to the textbox
|
||||||
|
*
|
||||||
|
* @returns the position of the cursor.
|
||||||
|
*/
|
||||||
|
int textbox_get_cursor(const textbox *tb);
|
||||||
/**@}*/
|
/**@}*/
|
||||||
#endif // ROFI_TEXTBOX_H
|
#endif // ROFI_TEXTBOX_H
|
||||||
|
|
|
@ -32,23 +32,22 @@
|
||||||
|
|
||||||
/** Macro for initializing the RofiDistance struct. */
|
/** Macro for initializing the RofiDistance struct. */
|
||||||
#define WIDGET_DISTANCE_INIT \
|
#define WIDGET_DISTANCE_INIT \
|
||||||
(RofiDistance){ \
|
(RofiDistance) { \
|
||||||
.base = { \
|
.base = \
|
||||||
.distance = 0, \
|
{ \
|
||||||
.type = ROFI_PU_PX, \
|
.distance = 0, \
|
||||||
.modtype = ROFI_DISTANCE_MODIFIER_NONE, \
|
.type = ROFI_PU_PX, \
|
||||||
.left = NULL, \
|
.modtype = ROFI_DISTANCE_MODIFIER_NONE, \
|
||||||
.right = NULL, \
|
.left = NULL, \
|
||||||
}, \
|
.right = NULL, \
|
||||||
|
}, \
|
||||||
.style = ROFI_HL_SOLID, \
|
.style = ROFI_HL_SOLID, \
|
||||||
}
|
}
|
||||||
/* Macro for initializing the RofiPadding struct. */
|
/** Macro for initializing the RofiPadding struct. */
|
||||||
#define WIDGET_PADDING_INIT \
|
#define WIDGET_PADDING_INIT \
|
||||||
(RofiPadding){ \
|
(RofiPadding) { \
|
||||||
.top = WIDGET_DISTANCE_INIT, \
|
.top = WIDGET_DISTANCE_INIT, .right = WIDGET_DISTANCE_INIT, \
|
||||||
.right = WIDGET_DISTANCE_INIT, \
|
.bottom = WIDGET_DISTANCE_INIT, .left = WIDGET_DISTANCE_INIT, \
|
||||||
.bottom = WIDGET_DISTANCE_INIT, \
|
|
||||||
.left = WIDGET_DISTANCE_INIT, \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -282,8 +282,10 @@ widget *widget_find_mouse_target(widget *wid, WidgetType type, gint x, gint y);
|
||||||
*
|
*
|
||||||
* @returns Whether the action would be handled or not
|
* @returns Whether the action would be handled or not
|
||||||
*/
|
*/
|
||||||
WidgetTriggerActionResult widget_check_action(widget *wid, guint action, gint x,
|
WidgetTriggerActionResult widget_check_action(widget *wid,
|
||||||
gint y);
|
G_GNUC_UNUSED guint action,
|
||||||
|
G_GNUC_UNUSED gint x,
|
||||||
|
G_GNUC_UNUSED gint y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param wid The widget handle
|
* @param wid The widget handle
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <libsn/sn.h>
|
#include <libsn/sn.h>
|
||||||
|
|
||||||
|
#include "xcb.h"
|
||||||
#include <libgwater-xcb.h>
|
#include <libgwater-xcb.h>
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_ewmh.h>
|
#include <xcb/xcb_ewmh.h>
|
||||||
|
@ -45,6 +46,10 @@ struct _xcb_stuff {
|
||||||
GMainLoop *main_loop;
|
GMainLoop *main_loop;
|
||||||
GWaterXcbSource *source;
|
GWaterXcbSource *source;
|
||||||
xcb_connection_t *connection;
|
xcb_connection_t *connection;
|
||||||
|
#ifdef XCB_IMDKIT
|
||||||
|
xcb_xic_t ic;
|
||||||
|
xcb_xim_t *im;
|
||||||
|
#endif
|
||||||
xcb_ewmh_connection_t ewmh;
|
xcb_ewmh_connection_t ewmh;
|
||||||
xcb_screen_t *screen;
|
xcb_screen_t *screen;
|
||||||
int screen_nbr;
|
int screen_nbr;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -29,6 +29,9 @@
|
||||||
#define ROFI_XCB_H
|
#define ROFI_XCB_H
|
||||||
|
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
|
#ifdef XCB_IMDKIT
|
||||||
|
#include <xcb-imdkit/imclient.h>
|
||||||
|
#endif
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,6 +44,11 @@ typedef struct _xcb_stuff xcb_stuff;
|
||||||
*/
|
*/
|
||||||
extern xcb_stuff *xcb;
|
extern xcb_stuff *xcb;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param data String to copy to clipboard.
|
||||||
|
*
|
||||||
|
* copies string to clipboard.
|
||||||
|
*/
|
||||||
void xcb_stuff_set_clipboard(char *data);
|
void xcb_stuff_set_clipboard(char *data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -188,6 +196,7 @@ extern WindowManagerQuirk current_window_manager;
|
||||||
* @returns NULL if window was not found, or unmapped, otherwise returns a
|
* @returns NULL if window was not found, or unmapped, otherwise returns a
|
||||||
* cairo_surface.
|
* cairo_surface.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cairo_surface_t *x11_helper_get_screenshot_surface_window(xcb_window_t window,
|
cairo_surface_t *x11_helper_get_screenshot_surface_window(xcb_window_t window,
|
||||||
int size);
|
int size);
|
||||||
|
|
||||||
|
@ -201,4 +210,18 @@ cairo_surface_t *x11_helper_get_screenshot_surface_window(xcb_window_t window,
|
||||||
void cairo_image_surface_blur(cairo_surface_t *surface, double radius,
|
void cairo_image_surface_blur(cairo_surface_t *surface, double radius,
|
||||||
double deviation);
|
double deviation);
|
||||||
|
|
||||||
|
#ifdef XCB_IMDKIT
|
||||||
|
/**
|
||||||
|
* IME Forwarding
|
||||||
|
*/
|
||||||
|
void x11_event_handler_fowarding(xcb_xim_t *im, xcb_xic_t ic,
|
||||||
|
xcb_key_press_event_t *event, void *user_data);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the currently detected window manager.
|
||||||
|
*
|
||||||
|
* @returns NULL when non found, otherwise a string (free with g_free)
|
||||||
|
*/
|
||||||
|
char *x11_helper_get_window_manager(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -50,6 +50,7 @@
|
||||||
#define LOG_DOMAIN "Parser"
|
#define LOG_DOMAIN "Parser"
|
||||||
int last_state = 0;
|
int last_state = 0;
|
||||||
|
|
||||||
|
const char *rasi_theme_file_extensions[] = {".rasi", ".rasinc", NULL};
|
||||||
/**
|
/**
|
||||||
* Type of Object to parse.
|
* Type of Object to parse.
|
||||||
*/
|
*/
|
||||||
|
@ -122,6 +123,7 @@ static double rofi_theme_parse_convert_hex ( char high, char low)
|
||||||
{ \
|
{ \
|
||||||
if ( errno != EINTR ) \
|
if ( errno != EINTR ) \
|
||||||
{ \
|
{ \
|
||||||
|
fprintf(stderr, "Failed to read input from file: %s\n", strerror(errno)); \
|
||||||
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
|
@ -161,17 +163,19 @@ static double rofi_theme_parse_convert_hex ( char high, char low)
|
||||||
|
|
||||||
ASC [\x00-\x7f]
|
ASC [\x00-\x7f]
|
||||||
ASCN [\x00-\t\v-\x7f]
|
ASCN [\x00-\t\v-\x7f]
|
||||||
ASCNP [\x00-\t\v-\x21\x23-\x7f]
|
ASCNP1 [\x00-\t\v-\x21\x23-\x7f]
|
||||||
|
ASCNP2 [\x00-\t\v-\x26\x28-\x7f]
|
||||||
U [\x80-\xbf]
|
U [\x80-\xbf]
|
||||||
U2 [\xc2-\xdf]
|
U2 [\xc2-\xdf]
|
||||||
U3 [\xe0-\xef]
|
U3 [\xe0-\xef]
|
||||||
U4 [\xf0-\xf4]
|
U4 [\xf0-\xf4]
|
||||||
|
|
||||||
// UANY {ASC}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
|
UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
|
||||||
UANYN {ASCN}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
|
// UANY {ASC}|{UONLY}
|
||||||
// UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
|
UANYN {ASCN}|{UONLY}
|
||||||
|
|
||||||
UANYNP {ASCNP}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
|
UANYNP1 {ASCNP1}|{UONLY}
|
||||||
|
UANYNP2 {ASCNP2}|{UONLY}
|
||||||
|
|
||||||
WHITESPACE [[:blank:]]
|
WHITESPACE [[:blank:]]
|
||||||
WSO [[:blank:]]*
|
WSO [[:blank:]]*
|
||||||
|
@ -179,12 +183,12 @@ WORD [[:alnum:]-]+
|
||||||
WORD_ELEMENT [[:alpha:]][[:alnum:]-]*
|
WORD_ELEMENT [[:alpha:]][[:alnum:]-]*
|
||||||
WORD_ENV [[:alpha:]_][[:alnum:]_]*
|
WORD_ENV [[:alpha:]_][[:alnum:]_]*
|
||||||
COLOR_NAME [[:alpha:]]+
|
COLOR_NAME [[:alpha:]]+
|
||||||
STRING \"{UANYN}*\"
|
STRING \"{UANYN}*\"|\'{UANYN}*\'
|
||||||
STRING_LIST \"{UANYNP}*\"
|
STRING_LIST \"{UANYNP1}*\"|\'{UANYNP2}*\'
|
||||||
CHAR \'({ASCN}|\\\\|\\\'|\\0)\'
|
CHAR \'({ASCN}|\\\\|\\\'|\\0)\'
|
||||||
HEX [[:xdigit:]]
|
HEX [[:xdigit:]]
|
||||||
NUMBER [[:digit:]]
|
NUMBER [[:digit:]]+
|
||||||
PNNUMBER [-+]?[[:digit:]]+
|
UNARYMIN -
|
||||||
PX (px)
|
PX (px)
|
||||||
MM (mm)
|
MM (mm)
|
||||||
EM (em)
|
EM (em)
|
||||||
|
@ -198,13 +202,13 @@ ASTERIX \*
|
||||||
ENV $\{[[:alpha:]_][[:alnum:]_]*\}
|
ENV $\{[[:alpha:]_][[:alnum:]_]*\}
|
||||||
|
|
||||||
MODIFIER_ADD \+
|
MODIFIER_ADD \+
|
||||||
MODIFIER_SUBTRACT -
|
|
||||||
MODIFIER_MULTIPLY \*
|
MODIFIER_MULTIPLY \*
|
||||||
MODIFIER_MIN (min)
|
MODIFIER_MIN (min)
|
||||||
MODIFIER_MAX (max)
|
MODIFIER_MAX (max)
|
||||||
MODIFIER_ROUND (round)
|
MODIFIER_ROUND (round)
|
||||||
MODIFIER_FLOOR (floor)
|
MODIFIER_FLOOR (floor)
|
||||||
MODIFIER_CEIL (ceil)
|
MODIFIER_CEIL (ceil)
|
||||||
|
MODIFIER_MODULO (modulo)
|
||||||
|
|
||||||
/* Position */
|
/* Position */
|
||||||
CENTER (?i:center)
|
CENTER (?i:center)
|
||||||
|
@ -413,8 +417,8 @@ if ( queue == NULL ) {
|
||||||
yytext[yyleng-1] = '\0';
|
yytext[yyleng-1] = '\0';
|
||||||
ParseObject *top = g_queue_peek_head ( file_queue );
|
ParseObject *top = g_queue_peek_head ( file_queue );
|
||||||
g_assert ( top != NULL );
|
g_assert ( top != NULL );
|
||||||
char *file2 = helper_get_theme_path ( &yytext[1], ".rasi" );
|
char *file2 = helper_get_theme_path ( &yytext[1], rasi_theme_file_extensions, top->filename );
|
||||||
char *filename = rofi_theme_parse_prepare_file ( file2, top->filename );
|
char *filename = rofi_theme_parse_prepare_file ( file2 );
|
||||||
g_free ( file2 );
|
g_free ( file2 );
|
||||||
FILE *f = fopen ( filename, "rb" );
|
FILE *f = fopen ( filename, "rb" );
|
||||||
if ( f ) {
|
if ( f ) {
|
||||||
|
@ -509,8 +513,9 @@ if ( queue == NULL ) {
|
||||||
<SECTION>":" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES); return T_PSEP; }
|
<SECTION>":" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES); return T_PSEP; }
|
||||||
<PROPERTIES>";" { BEGIN(GPOINTER_TO_INT ( g_queue_pop_head ( queue ))); return T_PCLOSE;}
|
<PROPERTIES>";" { BEGIN(GPOINTER_TO_INT ( g_queue_pop_head ( queue ))); return T_PCLOSE;}
|
||||||
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT,MEDIA_ENV_VAR_CONTENT,MEDIA_ENV_VAR_DEFAULT>(true|false) { yylval->bval= g_strcmp0(yytext, "true") == 0; return T_BOOLEAN;}
|
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT,MEDIA_ENV_VAR_CONTENT,MEDIA_ENV_VAR_DEFAULT>(true|false) { yylval->bval= g_strcmp0(yytext, "true") == 0; return T_BOOLEAN;}
|
||||||
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT,MEDIA_CONTENT>{PNNUMBER}\.{NUMBER}+ { yylval->fval = g_ascii_strtod(yytext, NULL); return T_DOUBLE;}
|
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT,MEDIA_CONTENT>{NUMBER}\.{NUMBER} { yylval->fval = g_ascii_strtod(yytext, NULL); return T_DOUBLE;}
|
||||||
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT,MEDIA_CONTENT>{PNNUMBER} { yylval->ival = (int)g_ascii_strtoll(yytext, NULL, 10); return T_INT;}
|
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT,MEDIA_CONTENT>{NUMBER} { yylval->ival = (int)g_ascii_strtoll(yytext, NULL, 10); return T_INT;}
|
||||||
|
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT,MEDIA_CONTENT>{UNARYMIN} { return T_MIN; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{STRING} { yytext[yyleng-1] = '\0'; yylval->sval = g_strcompress(&yytext[1]); return T_STRING;}
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{STRING} { yytext[yyleng-1] = '\0'; yylval->sval = g_strcompress(&yytext[1]); return T_STRING;}
|
||||||
<PROPERTIES_ARRAY>{STRING_LIST} { yytext[yyleng-1] = '\0'; yylval->sval = g_strcompress(&yytext[1]); return T_STRING;}
|
<PROPERTIES_ARRAY>{STRING_LIST} { yytext[yyleng-1] = '\0'; yylval->sval = g_strcompress(&yytext[1]); return T_STRING;}
|
||||||
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{CHAR} { yytext[yyleng-1] = '\0'; yylval->cval = g_strcompress(&yytext[1])[0]; return T_CHAR;}
|
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{CHAR} { yytext[yyleng-1] = '\0'; yylval->cval = g_strcompress(&yytext[1])[0]; return T_CHAR;}
|
||||||
|
@ -538,13 +543,13 @@ if ( queue == NULL ) {
|
||||||
|
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{INHERIT} { return T_INHERIT; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{INHERIT} { return T_INHERIT; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_ADD} { return T_MODIFIER_ADD; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_ADD} { return T_MODIFIER_ADD; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_SUBTRACT} { return T_MODIFIER_SUBTRACT; }
|
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_MULTIPLY} { return T_MODIFIER_MULTIPLY; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_MULTIPLY} { return T_MODIFIER_MULTIPLY; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_MIN} { return T_MODIFIER_MIN; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_MIN} { return T_MODIFIER_MIN; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_MAX} { return T_MODIFIER_MAX; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_MAX} { return T_MODIFIER_MAX; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_ROUND} { return T_MODIFIER_ROUND; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_ROUND} { return T_MODIFIER_ROUND; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_FLOOR} { return T_MODIFIER_FLOOR; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_FLOOR} { return T_MODIFIER_FLOOR; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_CEIL} { return T_MODIFIER_CEIL; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_CEIL} { return T_MODIFIER_CEIL; }
|
||||||
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{MODIFIER_MODULO} { return T_MODIFIER_MODULO; }
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{CALC} { return T_CALC; }
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{CALC} { return T_CALC; }
|
||||||
|
|
||||||
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{ENV} {
|
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_ARRAY,PROPERTIES_VAR_DEFAULT>{ENV} {
|
||||||
|
@ -880,8 +885,8 @@ if ( queue == NULL ) {
|
||||||
|
|
||||||
gboolean rofi_theme_parse_file ( const char *file )
|
gboolean rofi_theme_parse_file ( const char *file )
|
||||||
{
|
{
|
||||||
char *file2 = helper_get_theme_path ( file, ".rasi" );
|
char *file2 = helper_get_theme_path ( file, rasi_theme_file_extensions, NULL );
|
||||||
char *filename = rofi_theme_parse_prepare_file ( file2, NULL );
|
char *filename = rofi_theme_parse_prepare_file ( file2 );
|
||||||
g_free ( file2 );
|
g_free ( file2 );
|
||||||
|
|
||||||
yyin = fopen ( filename, "rb" );
|
yyin = fopen ( filename, "rb" );
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
* Copyright 2013-2022 Qball Cow <qball@gmpclient.org>
|
* Copyright 2013-2023 Qball Cow <qball@gmpclient.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
@ -195,7 +195,6 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b )
|
||||||
%token T_UNIT_MM "mm"
|
%token T_UNIT_MM "mm"
|
||||||
%token T_UNIT_EM "em"
|
%token T_UNIT_EM "em"
|
||||||
%token T_UNIT_CH "ch"
|
%token T_UNIT_CH "ch"
|
||||||
%token T_UNIT_PERCENT "%"
|
|
||||||
|
|
||||||
%token T_ANGLE_DEG "Degrees"
|
%token T_ANGLE_DEG "Degrees"
|
||||||
%token T_ANGLE_GRAD "Gradians"
|
%token T_ANGLE_GRAD "Gradians"
|
||||||
|
@ -231,7 +230,6 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b )
|
||||||
%token T_PARENT_LEFT "Parent left ('(')"
|
%token T_PARENT_LEFT "Parent left ('(')"
|
||||||
%token T_PARENT_RIGHT "Parent right (')')"
|
%token T_PARENT_RIGHT "Parent right (')')"
|
||||||
%token T_COMMA "comma separator (',')"
|
%token T_COMMA "comma separator (',')"
|
||||||
%token T_OPTIONAL_COMMA "Optional comma separator (',')"
|
|
||||||
%token T_FORWARD_SLASH "forward slash ('/')"
|
%token T_FORWARD_SLASH "forward slash ('/')"
|
||||||
%token T_PERCENT "Percent sign ('%')"
|
%token T_PERCENT "Percent sign ('%')"
|
||||||
|
|
||||||
|
@ -239,8 +237,8 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b )
|
||||||
%token T_LIST_CLOSE "List close (']')"
|
%token T_LIST_CLOSE "List close (']')"
|
||||||
|
|
||||||
%token T_MODIFIER_ADD "Add ('+')"
|
%token T_MODIFIER_ADD "Add ('+')"
|
||||||
%token T_MODIFIER_SUBTRACT "Subtract ('-')"
|
|
||||||
%token T_MODIFIER_MULTIPLY "Multiply ('*')"
|
%token T_MODIFIER_MULTIPLY "Multiply ('*')"
|
||||||
|
%token T_MODIFIER_MODULO "Modulo ('modulo')"
|
||||||
|
|
||||||
%token T_MODIFIER_MAX "Max ('max')"
|
%token T_MODIFIER_MAX "Max ('max')"
|
||||||
%token T_MODIFIER_MIN "Min ('min')"
|
%token T_MODIFIER_MIN "Min ('min')"
|
||||||
|
@ -257,7 +255,6 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b )
|
||||||
%token T_NSEP "Name separator (' ' or '.')"
|
%token T_NSEP "Name separator (' ' or '.')"
|
||||||
%token T_SSEP "Selector separator (',')"
|
%token T_SSEP "Selector separator (',')"
|
||||||
%token T_NAME_PREFIX "Element section ('# {name} { ... }')"
|
%token T_NAME_PREFIX "Element section ('# {name} { ... }')"
|
||||||
%token T_WHITESPACE "White space"
|
|
||||||
%token T_PDEFAULTS "Default settings section ( '* { ... }')"
|
%token T_PDEFAULTS "Default settings section ( '* { ... }')"
|
||||||
%token T_CONFIGURATION "Configuration block"
|
%token T_CONFIGURATION "Configuration block"
|
||||||
%token T_RESET_THEME "Reset Theme"
|
%token T_RESET_THEME "Reset Theme"
|
||||||
|
@ -266,13 +263,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b )
|
||||||
|
|
||||||
%token T_INHERIT "Inherit"
|
%token T_INHERIT "Inherit"
|
||||||
|
|
||||||
%token T_MEDIA_WIDTH "Width"
|
%token T_MIN "-"
|
||||||
%token T_MEDIA_HEIGHT "Height"
|
|
||||||
|
|
||||||
%token T_MEDIA_MIN "Min"
|
|
||||||
%token T_MEDIA_MONITOR_ID "Monitor-ID"
|
|
||||||
%token T_MEDIA_MAX "Max"
|
|
||||||
%token T_MEDIA_SEP "-"
|
|
||||||
|
|
||||||
|
|
||||||
%token T_VAR_START "var"
|
%token T_VAR_START "var"
|
||||||
|
@ -313,6 +304,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b )
|
||||||
%type <ival> t_property_orientation
|
%type <ival> t_property_orientation
|
||||||
%type <ival> t_property_cursor
|
%type <ival> t_property_cursor
|
||||||
%type <ival> t_name_prefix_optional
|
%type <ival> t_name_prefix_optional
|
||||||
|
%type <fval> t_property_number
|
||||||
%start t_main
|
%start t_main
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
@ -390,21 +382,7 @@ t_entry_list T_CONFIGURATION T_BOPEN t_config_property_list_optional T_BCLOSE {
|
||||||
g_hash_table_destroy ( $4 );
|
g_hash_table_destroy ( $4 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| t_entry_list T_MEDIA T_PARENT_LEFT T_MEDIA_TYPE T_PSEP T_INT T_PARENT_RIGHT T_BOPEN t_entry_list T_BCLOSE {
|
| t_entry_list T_MEDIA T_PARENT_LEFT T_MEDIA_TYPE T_PSEP t_property_number T_PARENT_RIGHT T_BOPEN t_entry_list T_BCLOSE {
|
||||||
gchar *name = g_strdup_printf("@media ( %s: %d )",$4, $6);
|
|
||||||
ThemeWidget *widget = rofi_theme_find_or_create_name ( $1, name );
|
|
||||||
widget->set = TRUE;
|
|
||||||
widget->media = g_slice_new0(ThemeMedia);
|
|
||||||
widget->media->type = rofi_theme_parse_media_type ( $4 );
|
|
||||||
widget->media->value = (double)$6;
|
|
||||||
for ( unsigned int i = 0; i < $9->num_widgets; i++ ) {
|
|
||||||
ThemeWidget *d = $9->widgets[i];
|
|
||||||
rofi_theme_parse_merge_widgets(widget, d);
|
|
||||||
}
|
|
||||||
g_free ( $4 );
|
|
||||||
g_free ( name );
|
|
||||||
}
|
|
||||||
| t_entry_list T_MEDIA T_PARENT_LEFT T_MEDIA_TYPE T_PSEP T_DOUBLE T_PARENT_RIGHT T_BOPEN t_entry_list T_BCLOSE {
|
|
||||||
gchar *name = g_strdup_printf("@media ( %s: %f )",$4, $6);
|
gchar *name = g_strdup_printf("@media ( %s: %f )",$4, $6);
|
||||||
ThemeWidget *widget = rofi_theme_find_or_create_name ( $1, name );
|
ThemeWidget *widget = rofi_theme_find_or_create_name ( $1, name );
|
||||||
widget->set = TRUE;
|
widget->set = TRUE;
|
||||||
|
@ -577,6 +555,14 @@ t_property_element
|
||||||
$$ = rofi_theme_property_create ( P_DOUBLE );
|
$$ = rofi_theme_property_create ( P_DOUBLE );
|
||||||
$$->value.f = $1;
|
$$->value.f = $1;
|
||||||
}
|
}
|
||||||
|
| T_MIN T_INT {
|
||||||
|
$$ = rofi_theme_property_create ( P_INTEGER );
|
||||||
|
$$->value.i = -$2;
|
||||||
|
}
|
||||||
|
| T_MIN T_DOUBLE {
|
||||||
|
$$ = rofi_theme_property_create ( P_DOUBLE );
|
||||||
|
$$->value.f = -$2;
|
||||||
|
}
|
||||||
| T_STRING {
|
| T_STRING {
|
||||||
$$ = rofi_theme_property_create ( P_STRING );
|
$$ = rofi_theme_property_create ( P_STRING );
|
||||||
$$->value.s = $1;
|
$$->value.s = $1;
|
||||||
|
@ -771,8 +757,8 @@ t_property_highlight_style
|
||||||
|
|
||||||
|
|
||||||
t_property_distance_zero
|
t_property_distance_zero
|
||||||
: T_INT t_property_line_style {
|
: t_property_number t_property_line_style {
|
||||||
$$.base.distance = (double) $1;
|
$$.base.distance = $1;
|
||||||
$$.base.type = ROFI_PU_PX;
|
$$.base.type = ROFI_PU_PX;
|
||||||
$$.base.left = NULL;
|
$$.base.left = NULL;
|
||||||
$$.base.right = NULL;
|
$$.base.right = NULL;
|
||||||
|
@ -784,7 +770,7 @@ t_property_distance_zero
|
||||||
|
|
||||||
/** Distance. */
|
/** Distance. */
|
||||||
t_property_distance_unit
|
t_property_distance_unit
|
||||||
: T_INT t_property_unit {
|
: t_property_number t_property_unit {
|
||||||
$$ = g_slice_new0(RofiDistanceUnit);
|
$$ = g_slice_new0(RofiDistanceUnit);
|
||||||
$$->distance = (double)$1;
|
$$->distance = (double)$1;
|
||||||
$$->type = $2;
|
$$->type = $2;
|
||||||
|
@ -792,7 +778,7 @@ t_property_distance_unit
|
||||||
$$->right = NULL;
|
$$->right = NULL;
|
||||||
$$->modtype = ROFI_DISTANCE_MODIFIER_NONE;
|
$$->modtype = ROFI_DISTANCE_MODIFIER_NONE;
|
||||||
}
|
}
|
||||||
| T_INT {
|
| t_property_number {
|
||||||
$$ = g_slice_new0(RofiDistanceUnit);
|
$$ = g_slice_new0(RofiDistanceUnit);
|
||||||
$$->distance = (double)$1;
|
$$->distance = (double)$1;
|
||||||
$$->type = ROFI_PU_PX;
|
$$->type = ROFI_PU_PX;
|
||||||
|
@ -800,14 +786,6 @@ t_property_distance_unit
|
||||||
$$->right = NULL;
|
$$->right = NULL;
|
||||||
$$->modtype = ROFI_DISTANCE_MODIFIER_NONE;
|
$$->modtype = ROFI_DISTANCE_MODIFIER_NONE;
|
||||||
}
|
}
|
||||||
| T_DOUBLE t_property_unit {
|
|
||||||
$$ = g_slice_new0(RofiDistanceUnit);
|
|
||||||
$$->distance = (double)$1;
|
|
||||||
$$->type = $2;
|
|
||||||
$$->left = NULL;
|
|
||||||
$$->right = NULL;
|
|
||||||
$$->modtype = ROFI_DISTANCE_MODIFIER_NONE;
|
|
||||||
}
|
|
||||||
| T_PARENT_LEFT t_property_distance_unit_math3 T_PARENT_RIGHT {
|
| T_PARENT_LEFT t_property_distance_unit_math3 T_PARENT_RIGHT {
|
||||||
$$ = g_slice_new0(RofiDistanceUnit);
|
$$ = g_slice_new0(RofiDistanceUnit);
|
||||||
$$->distance = 0;
|
$$->distance = 0;
|
||||||
|
@ -834,7 +812,7 @@ t_property_distance_unit_math
|
||||||
$$->right = $3;
|
$$->right = $3;
|
||||||
$$->modtype = ROFI_DISTANCE_MODIFIER_DIVIDE;
|
$$->modtype = ROFI_DISTANCE_MODIFIER_DIVIDE;
|
||||||
}
|
}
|
||||||
| t_property_distance_unit_math T_PERCENT t_property_distance_unit {
|
| t_property_distance_unit_math T_MODIFIER_MODULO t_property_distance_unit {
|
||||||
$$ = g_slice_new0(RofiDistanceUnit);
|
$$ = g_slice_new0(RofiDistanceUnit);
|
||||||
$$->left = $1;
|
$$->left = $1;
|
||||||
$$->right = $3;
|
$$->right = $3;
|
||||||
|
@ -853,7 +831,7 @@ t_property_distance_unit_math2
|
||||||
$$->right = $3;
|
$$->right = $3;
|
||||||
$$->modtype = ROFI_DISTANCE_MODIFIER_ADD;
|
$$->modtype = ROFI_DISTANCE_MODIFIER_ADD;
|
||||||
}
|
}
|
||||||
| t_property_distance_unit_math2 T_MODIFIER_SUBTRACT t_property_distance_unit_math {
|
| t_property_distance_unit_math2 T_MIN t_property_distance_unit_math {
|
||||||
$$ = g_slice_new0(RofiDistanceUnit);
|
$$ = g_slice_new0(RofiDistanceUnit);
|
||||||
$$->left = $1;
|
$$->left = $1;
|
||||||
$$->right = $3;
|
$$->right = $3;
|
||||||
|
@ -901,23 +879,14 @@ t_property_distance_unit_math3
|
||||||
|
|
||||||
t_property_distance
|
t_property_distance
|
||||||
/** Integer unit and line style */
|
/** Integer unit and line style */
|
||||||
: T_INT t_property_unit t_property_line_style {
|
: t_property_number t_property_unit t_property_line_style {
|
||||||
$$.base.distance = (double)$1;
|
$$.base.distance = $1;
|
||||||
$$.base.type = $2;
|
$$.base.type = $2;
|
||||||
$$.base.left = NULL;
|
$$.base.left = NULL;
|
||||||
$$.base.right = NULL;
|
$$.base.right = NULL;
|
||||||
$$.base.modtype = ROFI_DISTANCE_MODIFIER_NONE;
|
$$.base.modtype = ROFI_DISTANCE_MODIFIER_NONE;
|
||||||
$$.style = $3;
|
$$.style = $3;
|
||||||
}
|
}
|
||||||
/** Double unit and line style */
|
|
||||||
| T_DOUBLE t_property_unit t_property_line_style {
|
|
||||||
$$.base.distance = (double)$1;
|
|
||||||
$$.base.type = $2;
|
|
||||||
$$.base.modtype = ROFI_DISTANCE_MODIFIER_NONE;
|
|
||||||
$$.base.left = NULL;
|
|
||||||
$$.base.right = NULL;
|
|
||||||
$$.style = $3;
|
|
||||||
}
|
|
||||||
| T_CALC T_PARENT_LEFT t_property_distance_unit_math3 T_PARENT_RIGHT t_property_line_style {
|
| T_CALC T_PARENT_LEFT t_property_distance_unit_math3 T_PARENT_RIGHT t_property_line_style {
|
||||||
$$.base.distance = 0;
|
$$.base.distance = 0;
|
||||||
$$.base.type = ROFI_PU_PX;
|
$$.base.type = ROFI_PU_PX;
|
||||||
|
@ -927,6 +896,11 @@ t_property_distance
|
||||||
$$.style = $5;
|
$$.style = $5;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
t_property_number
|
||||||
|
: T_INT { $$ = (double) $1; }
|
||||||
|
| T_DOUBLE { $$ = $1; }
|
||||||
|
| T_MIN t_property_number { $$ = -(double)$2; }
|
||||||
|
|
||||||
/** distance unit. px, em, % */
|
/** distance unit. px, em, % */
|
||||||
t_property_unit
|
t_property_unit
|
||||||
: T_UNIT_PX { $$ = ROFI_PU_PX; }
|
: T_UNIT_PX { $$ = ROFI_PU_PX; }
|
||||||
|
|
40
meson.build
40
meson.build
|
@ -4,6 +4,7 @@ project('rofi', 'c',
|
||||||
license: [ 'MIT' ],
|
license: [ 'MIT' ],
|
||||||
default_options: [
|
default_options: [
|
||||||
'c_std=c99',
|
'c_std=c99',
|
||||||
|
'warning_level=3'
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,8 +22,7 @@ flags = [
|
||||||
'-Winline',
|
'-Winline',
|
||||||
'-Wunreachable-code',
|
'-Wunreachable-code',
|
||||||
'-Werror=missing-prototypes',
|
'-Werror=missing-prototypes',
|
||||||
'-Wno-inline', # A bit too noisy with Bison…
|
'-Wno-inline' # A bit too noisy with Bison…
|
||||||
'-Wextra'
|
|
||||||
]
|
]
|
||||||
foreach f : flags
|
foreach f : flags
|
||||||
if c_compiler.has_argument(f)
|
if c_compiler.has_argument(f)
|
||||||
|
@ -30,6 +30,12 @@ foreach f : flags
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
if get_option('b_lto')
|
||||||
|
add_project_arguments('-Werror=odr', language: 'c')
|
||||||
|
add_project_arguments('-Werror=lto-type-mismatch', language: 'c')
|
||||||
|
add_project_arguments('-Werror=strict-aliasing', language: 'c')
|
||||||
|
endif
|
||||||
|
|
||||||
plugindir = join_paths(get_option('libdir'), meson.project_name())
|
plugindir = join_paths(get_option('libdir'), meson.project_name())
|
||||||
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
|
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
|
||||||
desktop_install_dir = join_paths(get_option('datadir'), 'applications')
|
desktop_install_dir = join_paths(get_option('datadir'), 'applications')
|
||||||
|
@ -93,15 +99,35 @@ if wayland_enabled
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
header_conf = configuration_data()
|
||||||
|
if get_option('imdkit')
|
||||||
|
imdkit_new = dependency('xcb-imdkit', version: '>= 1.0.3', required: false)
|
||||||
|
imdkit_old = dependency('xcb-imdkit', version: '<= 1.0.2', required: false)
|
||||||
|
if imdkit_new.found()
|
||||||
|
deps += imdkit_new
|
||||||
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
|
||||||
|
header_conf.set('XCB_IMDKIT', true)
|
||||||
|
elif imdkit_old.found()
|
||||||
|
deps+= imdkit_old
|
||||||
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', true)
|
||||||
|
header_conf.set('XCB_IMDKIT', true)
|
||||||
|
else
|
||||||
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
|
||||||
|
header_conf.set('XCB_IMDKIT', false)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
check = dependency('check', version: '>= 0.11.0', required: get_option('check'))
|
check = dependency('check', version: '>= 0.11.0', required: get_option('check'))
|
||||||
|
|
||||||
header_conf = configuration_data()
|
|
||||||
|
|
||||||
header_conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
header_conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
||||||
header_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
header_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||||
header_conf.set_quoted('VERSION', meson.project_version())
|
header_conf.set_quoted('VERSION', meson.project_version())
|
||||||
header_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
header_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||||
header_conf.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/davatorium/rofi/')
|
header_conf.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/davatorium/rofi/')
|
||||||
header_conf.set_quoted('PACKAGE_URL', 'https://reddit.com/r/qtools/')
|
header_conf.set_quoted('PACKAGE_URL', 'https://github.com/davatorium/rofi/discussions')
|
||||||
|
|
||||||
header_conf.set('_GNU_SOURCE', true)
|
header_conf.set('_GNU_SOURCE', true)
|
||||||
|
|
||||||
|
@ -204,6 +230,7 @@ rofi_sources = files(
|
||||||
'source/modes/script.c',
|
'source/modes/script.c',
|
||||||
'source/modes/help-keys.c',
|
'source/modes/help-keys.c',
|
||||||
'source/modes/filebrowser.c',
|
'source/modes/filebrowser.c',
|
||||||
|
'source/modes/recursivebrowser.c',
|
||||||
'include/display.h',
|
'include/display.h',
|
||||||
'include/xcb.h',
|
'include/xcb.h',
|
||||||
'include/rofi.h',
|
'include/rofi.h',
|
||||||
|
@ -334,7 +361,7 @@ install_data(
|
||||||
'themes/dmenu.rasi',
|
'themes/dmenu.rasi',
|
||||||
'themes/docu.rasi',
|
'themes/docu.rasi',
|
||||||
'themes/glue_pro_blue.rasi',
|
'themes/glue_pro_blue.rasi',
|
||||||
'themes/gruvbox-common.rasi',
|
'themes/gruvbox-common.rasinc',
|
||||||
'themes/gruvbox-dark-hard.rasi',
|
'themes/gruvbox-dark-hard.rasi',
|
||||||
'themes/gruvbox-dark-soft.rasi',
|
'themes/gruvbox-dark-soft.rasi',
|
||||||
'themes/gruvbox-dark.rasi',
|
'themes/gruvbox-dark.rasi',
|
||||||
|
@ -349,8 +376,11 @@ install_data(
|
||||||
'themes/solarized.rasi',
|
'themes/solarized.rasi',
|
||||||
'themes/solarized_alternate.rasi',
|
'themes/solarized_alternate.rasi',
|
||||||
'themes/fancy.rasi',
|
'themes/fancy.rasi',
|
||||||
|
'themes/fancy2.rasi',
|
||||||
'themes/iggy.rasi',
|
'themes/iggy.rasi',
|
||||||
|
'themes/material.rasi',
|
||||||
'themes/iggy.jpg',
|
'themes/iggy.jpg',
|
||||||
|
'themes/fullscreen-preview.rasi',
|
||||||
install_dir: themedir
|
install_dir: themedir
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,4 @@ option('window', type: 'boolean', value: true, description: 'Window switcher mod
|
||||||
option('check', type: 'feature', description: 'Build and run libcheck-based tests')
|
option('check', type: 'feature', description: 'Build and run libcheck-based tests')
|
||||||
option('wayland', type: 'feature', value: 'enabled', description: 'Build with wayland support')
|
option('wayland', type: 'feature', value: 'enabled', description: 'Build with wayland support')
|
||||||
option('xcb', type: 'feature', value: 'enabled', description: 'Build with X11/xcb support')
|
option('xcb', type: 'feature', value: 'enabled', description: 'Build with X11/xcb support')
|
||||||
|
option('imdkit', type: 'boolean', value: false, description: 'IMDKit support')
|
||||||
|
|
145
mkdocs/docs/1.7.0/rofi-script.5.markdown
Normal file
145
mkdocs/docs/1.7.0/rofi-script.5.markdown
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
# ROFI-SCRIPT 5 rofi-script
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi script mode** - Rofi format for scriptable modi.
|
||||||
|
|
||||||
|
|
||||||
|
## 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}"
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show fb -modi "fb:file_browser.sh"
|
||||||
|
```
|
||||||
|
|
||||||
|
The name should be unique.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline
|
||||||
|
(`\n`) (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.
|
||||||
|
|
||||||
|
A simple script would be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ x"$@" = x"quit" ]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "reload"
|
||||||
|
echo "quit"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
Rofi sets the following environment variable when executing the script:
|
||||||
|
|
||||||
|
### `ROFI_RETV`
|
||||||
|
|
||||||
|
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 ).
|
||||||
|
|
||||||
|
### `ROFI_INFO`
|
||||||
|
|
||||||
|
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example to set the prompt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "\0prompt\x1fChange prompt\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
multiple entries can be passed using the `\x1f` separator.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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).
|
||||||
|
|
||||||
|
In bash the best way to do this is using `coproc`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
Rasmus Steinke <rasi@xssn.at>
|
||||||
|
|
||||||
|
Quentin 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.
|
1140
mkdocs/docs/1.7.0/rofi-theme.5.markdown
Normal file
1140
mkdocs/docs/1.7.0/rofi-theme.5.markdown
Normal file
File diff suppressed because it is too large
Load diff
1086
mkdocs/docs/1.7.0/rofi.1.markdown
Normal file
1086
mkdocs/docs/1.7.0/rofi.1.markdown
Normal file
File diff suppressed because it is too large
Load diff
145
mkdocs/docs/1.7.1/rofi-script.5.markdown
Normal file
145
mkdocs/docs/1.7.1/rofi-script.5.markdown
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
# ROFI-SCRIPT 5 rofi-script
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi script mode** - Rofi format for scriptable modi.
|
||||||
|
|
||||||
|
|
||||||
|
## 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}"
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show fb -modi "fb:file_browser.sh"
|
||||||
|
```
|
||||||
|
|
||||||
|
The name should be unique.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline
|
||||||
|
(`\n`) (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.
|
||||||
|
|
||||||
|
A simple script would be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ x"$@" = x"quit" ]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "reload"
|
||||||
|
echo "quit"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
Rofi sets the following environment variable when executing the script:
|
||||||
|
|
||||||
|
### `ROFI_RETV`
|
||||||
|
|
||||||
|
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 ).
|
||||||
|
|
||||||
|
### `ROFI_INFO`
|
||||||
|
|
||||||
|
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example to set the prompt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "\0prompt\x1fChange prompt\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
multiple entries can be passed using the `\x1f` separator.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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).
|
||||||
|
|
||||||
|
In bash the best way to do this is using `coproc`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
Rasmus Steinke <rasi@xssn.at>
|
||||||
|
|
||||||
|
Quentin 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.
|
1198
mkdocs/docs/1.7.1/rofi-theme.5.markdown
Normal file
1198
mkdocs/docs/1.7.1/rofi-theme.5.markdown
Normal file
File diff suppressed because it is too large
Load diff
1116
mkdocs/docs/1.7.1/rofi.1.markdown
Normal file
1116
mkdocs/docs/1.7.1/rofi.1.markdown
Normal file
File diff suppressed because it is too large
Load diff
145
mkdocs/docs/1.7.2/rofi-script.5.markdown
Normal file
145
mkdocs/docs/1.7.2/rofi-script.5.markdown
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
# ROFI-SCRIPT 5 rofi-script
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi script mode** - Rofi format for scriptable modi.
|
||||||
|
|
||||||
|
|
||||||
|
## 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}"
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show fb -modi "fb:file_browser.sh"
|
||||||
|
```
|
||||||
|
|
||||||
|
The name should be unique.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline
|
||||||
|
(`\n`) (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.
|
||||||
|
|
||||||
|
A simple script would be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ x"$@" = x"quit" ]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "reload"
|
||||||
|
echo "quit"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
Rofi sets the following environment variable when executing the script:
|
||||||
|
|
||||||
|
### `ROFI_RETV`
|
||||||
|
|
||||||
|
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 ).
|
||||||
|
|
||||||
|
### `ROFI_INFO`
|
||||||
|
|
||||||
|
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example to set the prompt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "\0prompt\x1fChange prompt\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
multiple entries can be passed using the `\x1f` separator.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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).
|
||||||
|
|
||||||
|
In bash the best way to do this is using `coproc`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
Rasmus Steinke <rasi@xssn.at>
|
||||||
|
|
||||||
|
Quentin 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.
|
1198
mkdocs/docs/1.7.2/rofi-theme.5.markdown
Normal file
1198
mkdocs/docs/1.7.2/rofi-theme.5.markdown
Normal file
File diff suppressed because it is too large
Load diff
1116
mkdocs/docs/1.7.2/rofi.1.markdown
Normal file
1116
mkdocs/docs/1.7.2/rofi.1.markdown
Normal file
File diff suppressed because it is too large
Load diff
176
mkdocs/docs/1.7.3/rofi-debugging.5.markdown
Normal file
176
mkdocs/docs/1.7.3/rofi-debugging.5.markdown
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
# ROFI DEBUGGING 5 rofi debugging
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
Debugging rofi.
|
||||||
|
|
||||||
|
When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test
|
||||||
|
to help pin-point the problem.
|
||||||
|
|
||||||
|
First try disabling your custom configuration: `-no-config`
|
||||||
|
|
||||||
|
This disables the parsing of the configuration files. This runs rofi in *stock* mode.
|
||||||
|
|
||||||
|
If you run custom C plugins, you can disable the plugins using: `-no-plugins`
|
||||||
|
|
||||||
|
|
||||||
|
## Get the relevant information for an issue
|
||||||
|
|
||||||
|
Please pastebin the output of the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rofi -help
|
||||||
|
rofi -dump-config
|
||||||
|
rofi -dump-theme
|
||||||
|
```
|
||||||
|
|
||||||
|
`rofi -help` provides us with the configuration files parsed, the exact version, monitor layout
|
||||||
|
and more useful information.
|
||||||
|
|
||||||
|
The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi`
|
||||||
|
interpretation of your configuration and theme.
|
||||||
|
|
||||||
|
Please check the output for identifiable information and remove this.
|
||||||
|
|
||||||
|
|
||||||
|
## Timing traces
|
||||||
|
|
||||||
|
To get a timing trace, enable the **Timings** debug domain.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
G_MESSAGES_DEBUG=Timings rofi -show drun
|
||||||
|
```
|
||||||
|
|
||||||
|
It will show a trace with (useful) timing information at relevant points during the execution.
|
||||||
|
This will help debugging when rofi is slow to start.
|
||||||
|
|
||||||
|
Example trace:
|
||||||
|
|
||||||
|
```
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done.
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Debug domains
|
||||||
|
|
||||||
|
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
|
||||||
|
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G\_MESSAGES\_DEBUG
|
||||||
|
environment variable. At the time of creation of this page, the following debug domains exist:
|
||||||
|
|
||||||
|
* all: Show debug information from all domains.
|
||||||
|
* X11Helper: The X11 Helper functions.
|
||||||
|
* View: The main window view functions.
|
||||||
|
* Widgets.Box: The Box widget.
|
||||||
|
* Modes.DMenu: The dmenu mode.
|
||||||
|
* Modes.Run: The run mode.
|
||||||
|
* Modes.DRun: The desktop file run mode.
|
||||||
|
* Modes.Window: The window mode.
|
||||||
|
* Modes.Script: The script mode.
|
||||||
|
* Modes.Combi: The script mode.
|
||||||
|
* Modes.Ssh: The ssh mode.
|
||||||
|
* Rofi: The main application.
|
||||||
|
* Timings: Get timing output.
|
||||||
|
* Theme: Theme engine debug output. (warning lots of output).
|
||||||
|
* Widgets.Icon: The Icon widget.
|
||||||
|
* Widgets.Box: The box widget.
|
||||||
|
* Widgets.Container: The container widget.
|
||||||
|
* Widgets.Window: The window widget.
|
||||||
|
* Helpers.IconFetcher: Information about icon lookup.
|
||||||
|
|
||||||
|
For full list see `man rofi`.
|
||||||
|
|
||||||
|
Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output from the Desktop file run dialog.
|
||||||
|
|
||||||
|
To redirect the debug output to a file (`~/rofi.log`) add:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show drun -log ~/rofi.log
|
||||||
|
```
|
||||||
|
|
||||||
|
Specifying the logfile automatically enabled all log domains.
|
||||||
|
This can be useful when rofi is launched from a window manager.
|
||||||
|
|
||||||
|
|
||||||
|
## Creating a backtrace.
|
||||||
|
|
||||||
|
First make sure you compile **rofi** with debug symbols:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make CFLAGS="-O0 -g3" clean rofi
|
||||||
|
```
|
||||||
|
|
||||||
|
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
|
||||||
|
mouse. So if it crashes in GDB you are stuck.
|
||||||
|
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
|
||||||
|
can then load the core in GDB.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gdb rofi core
|
||||||
|
```
|
||||||
|
|
||||||
|
Then type inside gdb:
|
||||||
|
|
||||||
|
```
|
||||||
|
thread apply all bt
|
||||||
|
```
|
||||||
|
|
||||||
|
The output trace is useful when reporting crashes.
|
||||||
|
|
||||||
|
Some distribution have `systemd-coredump`, this way you can easily get a backtrace via `coredumpctl`.
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
**rofi-sensible-terminal(1)**, **dmenu(1)**, **rofi-debugging(5)**, **rofi-theme(5)**, **rofi-script(5)**, **rofi-keys(5)**,**rofi-theme-selector(1)**
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
* Qball Cow <qball@blame.services>
|
227
mkdocs/docs/1.7.3/rofi-dmenu.5.markdown
Normal file
227
mkdocs/docs/1.7.3/rofi-dmenu.5.markdown
Normal file
|
@ -0,0 +1,227 @@
|
||||||
|
# ROFI-DMENU 5 rofi-dmenu
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi dmenu mode** - Rofi dmenu emulation
|
||||||
|
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
|
||||||
|
To integrate **rofi** into scripts as simple selection dialogs,
|
||||||
|
**rofi** supports emulating **dmenu(1)** (A dynamic menu for X11).
|
||||||
|
|
||||||
|
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
|
||||||
|
|
||||||
|
**rofi** does not aim to be 100% compatible with `dmenu`. There are simply too many flavors of `dmenu`.
|
||||||
|
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
|
||||||
|
Besides, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
|
||||||
|
|
||||||
|
|
||||||
|
## BASIC CONCEPT
|
||||||
|
|
||||||
|
In `dmenu` mode, **rofi** reads data from standard in, splits them into separate entries and displays them.
|
||||||
|
If the user selects an row, this is printed out to standard out, allow the script to process it further.
|
||||||
|
|
||||||
|
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
|
||||||
|
**rofi** and the output of rofi into the next.
|
||||||
|
|
||||||
|
## USAGE
|
||||||
|
|
||||||
|
By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation mode.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls | rofi -dmenu
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU DROP-IN REPLACEMENT
|
||||||
|
|
||||||
|
If `argv[0]` (calling command) is dmenu, **rofi** will start in dmenu mode.
|
||||||
|
This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink **rofi** to dmenu in `$PATH`.
|
||||||
|
|
||||||
|
ln -s /usr/bin/rofi /usr/bin/dmenu
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU VS SCRIPT MODE
|
||||||
|
|
||||||
|
Script mode is used to extend **rofi**, dmenu mode is used to extend a script.
|
||||||
|
The two do share much of the same input format. Please see the **rofi-script(5)** manpage for more information.
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU SPECIFIC COMMANDLINE FLAGS
|
||||||
|
|
||||||
|
A lot of these options can also be modified by the script using special input. See the **rofi-script(5)** manpage
|
||||||
|
for more information about this syntax.
|
||||||
|
|
||||||
|
`-sep` *separator*
|
||||||
|
|
||||||
|
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator:
|
||||||
|
|
||||||
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
|
||||||
|
|
||||||
|
`-p` *prompt*
|
||||||
|
|
||||||
|
Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e.
|
||||||
|
|
||||||
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
|
||||||
|
|
||||||
|
Default: *dmenu*
|
||||||
|
|
||||||
|
`-l` *number of lines to show*
|
||||||
|
|
||||||
|
Maximum number of lines the menu may show before scrolling.
|
||||||
|
|
||||||
|
rofi -dmenu -l 25
|
||||||
|
|
||||||
|
Default: *15*
|
||||||
|
|
||||||
|
`-i`
|
||||||
|
|
||||||
|
Makes `dmenu` searches case-insensitive
|
||||||
|
|
||||||
|
`-a` *X*
|
||||||
|
|
||||||
|
Active row, mark *X* as active. Where *X* is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify:
|
||||||
|
|
||||||
|
* A single row: '5'
|
||||||
|
* A range of (last 3) rows: '-3:'
|
||||||
|
* 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
|
||||||
|
* A set of rows: '2,0,-9'
|
||||||
|
* Or any combination: '5,-3:,7:11,2,0,-9'
|
||||||
|
|
||||||
|
`-u` *X*
|
||||||
|
|
||||||
|
Urgent row, mark *X* as urgent. See `-a` option for details.
|
||||||
|
|
||||||
|
`-only-match`
|
||||||
|
|
||||||
|
Only return a selected item, do not allow custom entry.
|
||||||
|
This mode always returns an entry. It will not return if no matching entry is
|
||||||
|
selected.
|
||||||
|
|
||||||
|
`-no-custom`
|
||||||
|
|
||||||
|
Only return a selected item, do not allow custom entry.
|
||||||
|
This mode returns directly when no entries given.
|
||||||
|
|
||||||
|
`-format` *format*
|
||||||
|
|
||||||
|
Allows the output of dmenu to be customized (N is the total number of input entries):
|
||||||
|
|
||||||
|
* 's' selected string
|
||||||
|
* 'i' index (0 - (N-1))
|
||||||
|
* 'd' index (1 - N)
|
||||||
|
* 'q' quote string
|
||||||
|
* 'p' Selected string stripped from Pango markup (Needs to be a valid string)
|
||||||
|
* 'f' filter string (user input)
|
||||||
|
* 'F' quoted filter string (user input)
|
||||||
|
|
||||||
|
Default: 's'
|
||||||
|
|
||||||
|
`-select` *string*
|
||||||
|
|
||||||
|
Select first line that matches the given string
|
||||||
|
|
||||||
|
`-mesg` *string*
|
||||||
|
|
||||||
|
Add a message line below the filter entry box. Supports Pango markup.
|
||||||
|
For more information on supported markup, see [here](https://docs.gtk.org/Pango/pango_markup.html)
|
||||||
|
|
||||||
|
`-dump`
|
||||||
|
|
||||||
|
Dump the filtered list to stdout and quit.
|
||||||
|
This can be used to get the list as **rofi** would filter it.
|
||||||
|
Use together with `-filter` command.
|
||||||
|
|
||||||
|
`-input` *file*
|
||||||
|
|
||||||
|
Reads from *file* instead of stdin.
|
||||||
|
|
||||||
|
`-password`
|
||||||
|
|
||||||
|
Hide the input text. This should not be considered secure!
|
||||||
|
|
||||||
|
`-markup-rows`
|
||||||
|
|
||||||
|
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
|
||||||
|
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html) for details about Pango markup.
|
||||||
|
|
||||||
|
|
||||||
|
`-multi-select`
|
||||||
|
|
||||||
|
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.
|
||||||
|
|
||||||
|
`-sync`
|
||||||
|
|
||||||
|
Force **rofi** mode to first read all data from stdin before showing the selection window. This is original dmenu behavior.
|
||||||
|
|
||||||
|
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
|
||||||
|
such as `-dump`, `-only-match` or `-auto-select`.
|
||||||
|
|
||||||
|
`-window-title` *title*
|
||||||
|
|
||||||
|
Set name used for the window title. Will be shown as Rofi - *title*
|
||||||
|
|
||||||
|
`-w` *windowid*
|
||||||
|
|
||||||
|
Position **rofi** over the window with the given X11 window ID.
|
||||||
|
|
||||||
|
`-keep-right`
|
||||||
|
|
||||||
|
Set ellipsize mode to start. So, the end of the string is visible.
|
||||||
|
|
||||||
|
`-display-columns`
|
||||||
|
|
||||||
|
A comma seperated list of columns to show.
|
||||||
|
|
||||||
|
`-display-column-separator`
|
||||||
|
|
||||||
|
The column separator. This is a regex.
|
||||||
|
|
||||||
|
*default*: '\t'
|
||||||
|
|
||||||
|
`-ballot-selected-str` *string*
|
||||||
|
|
||||||
|
When multi-select is enabled, prefix this string when element is selected.
|
||||||
|
|
||||||
|
*default*: "☑ "
|
||||||
|
|
||||||
|
`-ballot-unselected-str` *string*
|
||||||
|
|
||||||
|
When multi-select is enabled, prefix this string when element is not selected.
|
||||||
|
|
||||||
|
*default*: "☐ "
|
||||||
|
|
||||||
|
`-ellipsize-mode` (start|middle|end)
|
||||||
|
|
||||||
|
Set ellipsize mode on the listview.
|
||||||
|
|
||||||
|
*default* "end"
|
||||||
|
|
||||||
|
## PARSING ROW OPTIONS
|
||||||
|
|
||||||
|
Extra options for individual rows can be also set. See the **rofi-script(5)** manpage for details; the syntax and supported features are identical.
|
||||||
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
|
* **0**: Row has been selected accepted by user.
|
||||||
|
* **1**: User cancelled the selection.
|
||||||
|
* **10-28**: Row accepted by custom keybinding.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
471
mkdocs/docs/1.7.3/rofi-keys.5.markdown
Normal file
471
mkdocs/docs/1.7.3/rofi-keys.5.markdown
Normal file
|
@ -0,0 +1,471 @@
|
||||||
|
# ROFI-KEYS 5 rofi-keys
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi keys** - Rofi Key and Mouse bindings
|
||||||
|
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
|
||||||
|
**rofi** supports overriding of any of it key and mouse binding.
|
||||||
|
|
||||||
|
## Setting binding
|
||||||
|
|
||||||
|
Bindings can be done on the commandline (-{bindingname}):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rofi -show run -kb-accept-entry 'Control+Shift+space'
|
||||||
|
```
|
||||||
|
|
||||||
|
or via the configuration file:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+space";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The key can be set by its name (see above) or its keycode:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+[65]";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
An easy way to look up keycode is xev(1).
|
||||||
|
|
||||||
|
Multiple keys can be specified for an action as a comma separated list:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+space,Return";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
By Default **rofi** reacts on pressing, to act on the release of all keys
|
||||||
|
prepend the binding with `!`:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "!Control+Shift+space,Return";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Unsetting a binding
|
||||||
|
|
||||||
|
To unset a binding, pass an empty string.
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-clear-line: "";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Keyboard Bindings
|
||||||
|
|
||||||
|
### **kb-primary-paste**:
|
||||||
|
Paste primary selection
|
||||||
|
|
||||||
|
**Default**: Control+V,Shift+Insert
|
||||||
|
|
||||||
|
### **kb-secondary-paste**
|
||||||
|
Paste clipboard
|
||||||
|
|
||||||
|
**Default**: Control+v,Insert
|
||||||
|
|
||||||
|
### **kb-secondary-copy**
|
||||||
|
|
||||||
|
Copy current selection to clipboard
|
||||||
|
|
||||||
|
**Default**: Control+c
|
||||||
|
|
||||||
|
### **kb-clear-line**
|
||||||
|
Clear input line
|
||||||
|
|
||||||
|
**Default**: Control+w
|
||||||
|
|
||||||
|
### **kb-move-front**
|
||||||
|
Beginning of line
|
||||||
|
|
||||||
|
**Default**: Control+a
|
||||||
|
|
||||||
|
### **kb-move-end**
|
||||||
|
End of line
|
||||||
|
|
||||||
|
**Default**: Control+e
|
||||||
|
|
||||||
|
### **kb-move-word-back**
|
||||||
|
Move back one word
|
||||||
|
|
||||||
|
**Default**: Alt+b,Control+Left
|
||||||
|
|
||||||
|
### **kb-move-word-forward**
|
||||||
|
Move forward one word
|
||||||
|
|
||||||
|
**Default**: Alt+f,Control+Right
|
||||||
|
|
||||||
|
### **kb-move-char-back**
|
||||||
|
Move back one char
|
||||||
|
|
||||||
|
**Default**: Left,Control+b
|
||||||
|
|
||||||
|
### **kb-move-char-forward**
|
||||||
|
Move forward one char
|
||||||
|
|
||||||
|
**Default**: Right,Control+f
|
||||||
|
|
||||||
|
### **kb-remove-word-back**
|
||||||
|
Delete previous word
|
||||||
|
|
||||||
|
**Default**: Control+Alt+h,Control+BackSpace
|
||||||
|
|
||||||
|
### **kb-remove-word-forward**
|
||||||
|
Delete next word
|
||||||
|
|
||||||
|
**Default**: Control+Alt+d
|
||||||
|
|
||||||
|
### **kb-remove-char-forward**
|
||||||
|
Delete next char
|
||||||
|
|
||||||
|
**Default**: Delete,Control+d
|
||||||
|
|
||||||
|
### **kb-remove-char-back**
|
||||||
|
Delete previous char
|
||||||
|
|
||||||
|
**Default**: BackSpace,Shift+BackSpace,Control+h
|
||||||
|
|
||||||
|
### **kb-remove-to-eol**
|
||||||
|
Delete till the end of line
|
||||||
|
|
||||||
|
**Default**: Control+k
|
||||||
|
|
||||||
|
### **kb-remove-to-sol**
|
||||||
|
Delete till the start of line
|
||||||
|
|
||||||
|
**Default**: Control+u
|
||||||
|
|
||||||
|
### **kb-accept-entry**
|
||||||
|
Accept entry
|
||||||
|
|
||||||
|
**Default**: Control+j,Control+m,Return,KP_Enter
|
||||||
|
|
||||||
|
### **kb-accept-custom**
|
||||||
|
Use entered text as command (in ssh/run modes)
|
||||||
|
|
||||||
|
**Default**: Control+Return
|
||||||
|
|
||||||
|
### **kb-accept-custom-alt**
|
||||||
|
Use entered text as command (in ssh/run modes)
|
||||||
|
|
||||||
|
**Default**: Control+Shift+Return
|
||||||
|
|
||||||
|
### **kb-accept-alt**
|
||||||
|
Use alternate accept command.
|
||||||
|
|
||||||
|
**Default**: Shift+Return
|
||||||
|
|
||||||
|
### **kb-delete-entry**
|
||||||
|
Delete entry from history
|
||||||
|
|
||||||
|
**Default**: Shift+Delete
|
||||||
|
|
||||||
|
### **kb-mode-next**
|
||||||
|
Switch to the next mode.
|
||||||
|
|
||||||
|
**Default**: Shift+Right,Control+Tab
|
||||||
|
|
||||||
|
### **kb-mode-previous**
|
||||||
|
Switch to the previous mode.
|
||||||
|
|
||||||
|
**Default**: Shift+Left,Control+ISO_Left_Tab
|
||||||
|
|
||||||
|
### **kb-mode-complete**
|
||||||
|
Start completion for mode.
|
||||||
|
|
||||||
|
**Default**: Control+l
|
||||||
|
|
||||||
|
### **kb-row-left**
|
||||||
|
Go to the previous column
|
||||||
|
|
||||||
|
**Default**: Control+Page_Up
|
||||||
|
|
||||||
|
### **kb-row-right**
|
||||||
|
Go to the next column
|
||||||
|
|
||||||
|
**Default**: Control+Page_Down
|
||||||
|
|
||||||
|
### **kb-row-up**
|
||||||
|
Select previous entry
|
||||||
|
|
||||||
|
**Default**: Up,Control+p
|
||||||
|
|
||||||
|
### **kb-row-down**
|
||||||
|
Select next entry
|
||||||
|
|
||||||
|
**Default**: Down,Control+n
|
||||||
|
|
||||||
|
### **kb-row-tab**
|
||||||
|
Go to next row, if one left, accept it, if no left next mode.
|
||||||
|
|
||||||
|
**Default**:
|
||||||
|
|
||||||
|
### **kb-element-next**
|
||||||
|
Go to next row.
|
||||||
|
|
||||||
|
**Default**: Tab
|
||||||
|
|
||||||
|
### **kb-element-prev**
|
||||||
|
Go to previous row.
|
||||||
|
|
||||||
|
**Default**: ISO_Left_Tab
|
||||||
|
|
||||||
|
### **kb-page-prev**
|
||||||
|
Go to the previous page
|
||||||
|
|
||||||
|
**Default**: Page_Up
|
||||||
|
|
||||||
|
### **kb-page-next**
|
||||||
|
Go to the next page
|
||||||
|
|
||||||
|
**Default**: Page_Down
|
||||||
|
|
||||||
|
### **kb-row-first**
|
||||||
|
Go to the first entry
|
||||||
|
|
||||||
|
**Default**: Home,KP_Home
|
||||||
|
|
||||||
|
### **kb-row-last**
|
||||||
|
Go to the last entry
|
||||||
|
|
||||||
|
**Default**: End,KP_End
|
||||||
|
|
||||||
|
### **kb-row-select**
|
||||||
|
Set selected item as input text
|
||||||
|
|
||||||
|
**Default**: Control+space
|
||||||
|
|
||||||
|
### **kb-screenshot**
|
||||||
|
Take a screenshot of the rofi window
|
||||||
|
|
||||||
|
**Default**: Alt+S
|
||||||
|
|
||||||
|
### **kb-ellipsize**
|
||||||
|
Toggle between ellipsize modes for displayed data
|
||||||
|
|
||||||
|
**Default**: Alt+period
|
||||||
|
|
||||||
|
### **kb-toggle-case-sensitivity**
|
||||||
|
Toggle case sensitivity
|
||||||
|
|
||||||
|
**Default**: grave,dead_grave
|
||||||
|
|
||||||
|
### **kb-toggle-sort**
|
||||||
|
Toggle sort
|
||||||
|
|
||||||
|
**Default**: Alt+grave
|
||||||
|
|
||||||
|
### **kb-cancel**
|
||||||
|
Quit rofi
|
||||||
|
|
||||||
|
**Default**: Escape,Control+g,Control+bracketleft
|
||||||
|
|
||||||
|
### **kb-custom-1**
|
||||||
|
Custom keybinding 1
|
||||||
|
|
||||||
|
**Default**: Alt+1
|
||||||
|
|
||||||
|
### **kb-custom-2**
|
||||||
|
Custom keybinding 2
|
||||||
|
|
||||||
|
**Default**: Alt+2
|
||||||
|
|
||||||
|
### **kb-custom-3**
|
||||||
|
Custom keybinding 3
|
||||||
|
|
||||||
|
**Default**: Alt+3
|
||||||
|
|
||||||
|
### **kb-custom-4**
|
||||||
|
Custom keybinding 4
|
||||||
|
|
||||||
|
**Default**: Alt+4
|
||||||
|
|
||||||
|
### **kb-custom-5**
|
||||||
|
Custom Keybinding 5
|
||||||
|
|
||||||
|
**Default**: Alt+5
|
||||||
|
|
||||||
|
### **kb-custom-6**
|
||||||
|
Custom keybinding 6
|
||||||
|
|
||||||
|
**Default**: Alt+6
|
||||||
|
|
||||||
|
### **kb-custom-7**
|
||||||
|
Custom Keybinding 7
|
||||||
|
|
||||||
|
**Default**: Alt+7
|
||||||
|
|
||||||
|
### **kb-custom-8**
|
||||||
|
Custom keybinding 8
|
||||||
|
|
||||||
|
**Default**: Alt+8
|
||||||
|
|
||||||
|
### **kb-custom-9**
|
||||||
|
Custom keybinding 9
|
||||||
|
|
||||||
|
**Default**: Alt+9
|
||||||
|
|
||||||
|
### **kb-custom-10**
|
||||||
|
Custom keybinding 10
|
||||||
|
|
||||||
|
**Default**: Alt+0
|
||||||
|
|
||||||
|
### **kb-custom-11**
|
||||||
|
Custom keybinding 11
|
||||||
|
|
||||||
|
**Default**: Alt+exclam
|
||||||
|
|
||||||
|
### **kb-custom-12**
|
||||||
|
Custom keybinding 12
|
||||||
|
|
||||||
|
**Default**: Alt+at
|
||||||
|
|
||||||
|
### **kb-custom-13**
|
||||||
|
Custom keybinding 13
|
||||||
|
|
||||||
|
**Default**: Alt+numbersign
|
||||||
|
|
||||||
|
### **kb-custom-14**
|
||||||
|
Custom keybinding 14
|
||||||
|
|
||||||
|
**Default**: Alt+dollar
|
||||||
|
|
||||||
|
### **kb-custom-15**
|
||||||
|
Custom keybinding 15
|
||||||
|
|
||||||
|
**Default**: Alt+percent
|
||||||
|
|
||||||
|
### **kb-custom-16**
|
||||||
|
Custom keybinding 16
|
||||||
|
|
||||||
|
**Default**: Alt+dead_circumflex
|
||||||
|
|
||||||
|
### **kb-custom-17**
|
||||||
|
Custom keybinding 17
|
||||||
|
|
||||||
|
**Default**: Alt+ampersand
|
||||||
|
|
||||||
|
### **kb-custom-18**
|
||||||
|
Custom keybinding 18
|
||||||
|
|
||||||
|
**Default**: Alt+asterisk
|
||||||
|
|
||||||
|
### **kb-custom-19**
|
||||||
|
Custom Keybinding 19
|
||||||
|
|
||||||
|
**Default**: Alt+parenleft
|
||||||
|
|
||||||
|
### **kb-select-1**
|
||||||
|
Select row 1
|
||||||
|
|
||||||
|
**Default**: Super+1
|
||||||
|
|
||||||
|
### **kb-select-2**
|
||||||
|
Select row 2
|
||||||
|
|
||||||
|
**Default**: Super+2
|
||||||
|
|
||||||
|
### **kb-select-3**
|
||||||
|
Select row 3
|
||||||
|
|
||||||
|
**Default**: Super+3
|
||||||
|
|
||||||
|
### **kb-select-4**
|
||||||
|
Select row 4
|
||||||
|
|
||||||
|
**Default**: Super+4
|
||||||
|
|
||||||
|
### **kb-select-5**
|
||||||
|
Select row 5
|
||||||
|
|
||||||
|
**Default**: Super+5
|
||||||
|
|
||||||
|
### **kb-select-6**
|
||||||
|
Select row 6
|
||||||
|
|
||||||
|
**Default**: Super+6
|
||||||
|
|
||||||
|
### **kb-select-7**
|
||||||
|
Select row 7
|
||||||
|
|
||||||
|
**Default**: Super+7
|
||||||
|
|
||||||
|
### **kb-select-8**
|
||||||
|
Select row 8
|
||||||
|
|
||||||
|
**Default**: Super+8
|
||||||
|
|
||||||
|
### **kb-select-9**
|
||||||
|
Select row 9
|
||||||
|
|
||||||
|
**Default**: Super+9
|
||||||
|
|
||||||
|
### **kb-select-10**
|
||||||
|
Select row 10
|
||||||
|
|
||||||
|
**Default**: Super+0
|
||||||
|
|
||||||
|
## Mouse Bindings
|
||||||
|
|
||||||
|
### **ml-row-left**
|
||||||
|
Go to the previous column
|
||||||
|
|
||||||
|
**Default**: ScrollLeft
|
||||||
|
|
||||||
|
### **ml-row-right**
|
||||||
|
Go to the next column
|
||||||
|
|
||||||
|
**Default**: ScrollRight
|
||||||
|
|
||||||
|
### **ml-row-up**
|
||||||
|
Select previous entry
|
||||||
|
|
||||||
|
**Default**: ScrollUp
|
||||||
|
|
||||||
|
### **ml-row-down**
|
||||||
|
Select next entry
|
||||||
|
|
||||||
|
**Default**: ScrollDown
|
||||||
|
|
||||||
|
### **me-select-entry**
|
||||||
|
Select hovered row
|
||||||
|
|
||||||
|
**Default**: MousePrimary
|
||||||
|
|
||||||
|
### **me-accept-entry**
|
||||||
|
Accept hovered row
|
||||||
|
|
||||||
|
**Default**: MouseDPrimary
|
||||||
|
|
||||||
|
### **me-accept-custom**
|
||||||
|
Accept hovered row with custom action
|
||||||
|
|
||||||
|
**Default**: Control+MouseDPrimary
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
155
mkdocs/docs/1.7.3/rofi-script.5.markdown
Normal file
155
mkdocs/docs/1.7.3/rofi-script.5.markdown
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
# ROFI-SCRIPT 5 rofi-script
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**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}"
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show fb -modes "fb:file_browser.sh"
|
||||||
|
```
|
||||||
|
|
||||||
|
The name should be unique.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Rofi calls the executable without arguments on startup. This should generate a
|
||||||
|
list of options, separated by a newline (`\n`) (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.
|
||||||
|
|
||||||
|
A simple script would be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ x"$@" = x"quit" ]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "reload"
|
||||||
|
echo "quit"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
Rofi sets the following environment variable when executing the script:
|
||||||
|
|
||||||
|
### `ROFI_RETV`
|
||||||
|
|
||||||
|
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 ).
|
||||||
|
|
||||||
|
### `ROFI_INFO`
|
||||||
|
|
||||||
|
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
|
||||||
|
|
||||||
|
### `ROFI_DATA`
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
For example to set the prompt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "\0prompt\x1fChange prompt\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
multiple entries can be passed using the `\x1f` separator.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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).
|
||||||
|
|
||||||
|
In bash the best way to do this is using `coproc`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
1443
mkdocs/docs/1.7.3/rofi-theme.5.markdown
Normal file
1443
mkdocs/docs/1.7.3/rofi-theme.5.markdown
Normal file
File diff suppressed because it is too large
Load diff
1030
mkdocs/docs/1.7.3/rofi.1.markdown
Normal file
1030
mkdocs/docs/1.7.3/rofi.1.markdown
Normal file
File diff suppressed because it is too large
Load diff
176
mkdocs/docs/1.7.4/rofi-debugging.5.markdown
Normal file
176
mkdocs/docs/1.7.4/rofi-debugging.5.markdown
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
# ROFI DEBUGGING 5 rofi debugging
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
Debugging rofi.
|
||||||
|
|
||||||
|
When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test
|
||||||
|
to help pin-point the problem.
|
||||||
|
|
||||||
|
First try disabling your custom configuration: `-no-config`
|
||||||
|
|
||||||
|
This disables the parsing of the configuration files. This runs rofi in *stock* mode.
|
||||||
|
|
||||||
|
If you run custom C plugins, you can disable the plugins using: `-no-plugins`
|
||||||
|
|
||||||
|
|
||||||
|
## Get the relevant information for an issue
|
||||||
|
|
||||||
|
Please pastebin the output of the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rofi -help
|
||||||
|
rofi -dump-config
|
||||||
|
rofi -dump-theme
|
||||||
|
```
|
||||||
|
|
||||||
|
`rofi -help` provides us with the configuration files parsed, the exact version, monitor layout
|
||||||
|
and more useful information.
|
||||||
|
|
||||||
|
The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi`
|
||||||
|
interpretation of your configuration and theme.
|
||||||
|
|
||||||
|
Please check the output for identifiable information and remove this.
|
||||||
|
|
||||||
|
|
||||||
|
## Timing traces
|
||||||
|
|
||||||
|
To get a timing trace, enable the **Timings** debug domain.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
G_MESSAGES_DEBUG=Timings rofi -show drun
|
||||||
|
```
|
||||||
|
|
||||||
|
It will show a trace with (useful) timing information at relevant points during the execution.
|
||||||
|
This will help debugging when rofi is slow to start.
|
||||||
|
|
||||||
|
Example trace:
|
||||||
|
|
||||||
|
```
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done.
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Debug domains
|
||||||
|
|
||||||
|
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
|
||||||
|
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G\_MESSAGES\_DEBUG
|
||||||
|
environment variable. At the time of creation of this page, the following debug domains exist:
|
||||||
|
|
||||||
|
* all: Show debug information from all domains.
|
||||||
|
* X11Helper: The X11 Helper functions.
|
||||||
|
* View: The main window view functions.
|
||||||
|
* Widgets.Box: The Box widget.
|
||||||
|
* Modes.DMenu: The dmenu mode.
|
||||||
|
* Modes.Run: The run mode.
|
||||||
|
* Modes.DRun: The desktop file run mode.
|
||||||
|
* Modes.Window: The window mode.
|
||||||
|
* Modes.Script: The script mode.
|
||||||
|
* Modes.Combi: The script mode.
|
||||||
|
* Modes.Ssh: The ssh mode.
|
||||||
|
* Rofi: The main application.
|
||||||
|
* Timings: Get timing output.
|
||||||
|
* Theme: Theme engine debug output. (warning lots of output).
|
||||||
|
* Widgets.Icon: The Icon widget.
|
||||||
|
* Widgets.Box: The box widget.
|
||||||
|
* Widgets.Container: The container widget.
|
||||||
|
* Widgets.Window: The window widget.
|
||||||
|
* Helpers.IconFetcher: Information about icon lookup.
|
||||||
|
|
||||||
|
For full list see `man rofi`.
|
||||||
|
|
||||||
|
Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output from the Desktop file run dialog.
|
||||||
|
|
||||||
|
To redirect the debug output to a file (`~/rofi.log`) add:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show drun -log ~/rofi.log
|
||||||
|
```
|
||||||
|
|
||||||
|
Specifying the logfile automatically enabled all log domains.
|
||||||
|
This can be useful when rofi is launched from a window manager.
|
||||||
|
|
||||||
|
|
||||||
|
## Creating a backtrace.
|
||||||
|
|
||||||
|
First make sure you compile **rofi** with debug symbols:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make CFLAGS="-O0 -g3" clean rofi
|
||||||
|
```
|
||||||
|
|
||||||
|
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
|
||||||
|
mouse. So if it crashes in GDB you are stuck.
|
||||||
|
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
|
||||||
|
can then load the core in GDB.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gdb rofi core
|
||||||
|
```
|
||||||
|
|
||||||
|
Then type inside gdb:
|
||||||
|
|
||||||
|
```
|
||||||
|
thread apply all bt
|
||||||
|
```
|
||||||
|
|
||||||
|
The output trace is useful when reporting crashes.
|
||||||
|
|
||||||
|
Some distribution have `systemd-coredump`, this way you can easily get a backtrace via `coredumpctl`.
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
**rofi-sensible-terminal(1)**, **dmenu(1)**, **rofi-debugging(5)**, **rofi-theme(5)**, **rofi-script(5)**, **rofi-keys(5)**,**rofi-theme-selector(1)**
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
* Qball Cow <qball@blame.services>
|
217
mkdocs/docs/1.7.4/rofi-dmenu.5.markdown
Normal file
217
mkdocs/docs/1.7.4/rofi-dmenu.5.markdown
Normal file
|
@ -0,0 +1,217 @@
|
||||||
|
# ROFI-DMENU 5 rofi-dmenu
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi dmenu mode** - Rofi dmenu emulation
|
||||||
|
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
|
||||||
|
To integrate **rofi** into scripts as simple selection dialogs,
|
||||||
|
**rofi** supports emulating **dmenu(1)** (A dynamic menu for X11).
|
||||||
|
|
||||||
|
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
|
||||||
|
|
||||||
|
**rofi** does not aim to be 100% compatible with `dmenu`. There are simply too many flavors of `dmenu`.
|
||||||
|
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
|
||||||
|
Besides, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
|
||||||
|
|
||||||
|
|
||||||
|
## BASIC CONCEPT
|
||||||
|
|
||||||
|
In `dmenu` mode, **rofi** reads data from standard in, splits them into separate entries and displays them.
|
||||||
|
If the user selects an row, this is printed out to standard out, allow the script to process it further.
|
||||||
|
|
||||||
|
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
|
||||||
|
**rofi** and the output of rofi into the next.
|
||||||
|
|
||||||
|
## USAGE
|
||||||
|
|
||||||
|
By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation mode.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls | rofi -dmenu
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU DROP-IN REPLACEMENT
|
||||||
|
|
||||||
|
If `argv[0]` (calling command) is dmenu, **rofi** will start in dmenu mode.
|
||||||
|
This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink **rofi** to dmenu in `$PATH`.
|
||||||
|
|
||||||
|
ln -s /usr/bin/rofi /usr/bin/dmenu
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU VS SCRIPT MODE
|
||||||
|
|
||||||
|
Script mode is used to extend **rofi**, dmenu mode is used to extend a script.
|
||||||
|
The two do share much of the same input format. Please see the **rofi-script(5)** manpage for more information.
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU SPECIFIC COMMANDLINE FLAGS
|
||||||
|
|
||||||
|
A lot of these options can also be modified by the script using special input. See the **rofi-script(5)** manpage
|
||||||
|
for more information about this syntax.
|
||||||
|
|
||||||
|
`-sep` *separator*
|
||||||
|
|
||||||
|
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator:
|
||||||
|
|
||||||
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
|
||||||
|
|
||||||
|
`-p` *prompt*
|
||||||
|
|
||||||
|
Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e.
|
||||||
|
|
||||||
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
|
||||||
|
|
||||||
|
Default: *dmenu*
|
||||||
|
|
||||||
|
`-l` *number of lines to show*
|
||||||
|
|
||||||
|
Maximum number of lines the menu may show before scrolling.
|
||||||
|
|
||||||
|
rofi -dmenu -l 25
|
||||||
|
|
||||||
|
Default: *15*
|
||||||
|
|
||||||
|
`-i`
|
||||||
|
|
||||||
|
Makes `dmenu` searches case-insensitive
|
||||||
|
|
||||||
|
`-a` *X*
|
||||||
|
|
||||||
|
Active row, mark *X* as active. Where *X* is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify:
|
||||||
|
|
||||||
|
* A single row: '5'
|
||||||
|
* A range of (last 3) rows: '-3:'
|
||||||
|
* 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
|
||||||
|
* A set of rows: '2,0,-9'
|
||||||
|
* Or any combination: '5,-3:,7:11,2,0,-9'
|
||||||
|
|
||||||
|
`-u` *X*
|
||||||
|
|
||||||
|
Urgent row, mark *X* as urgent. See `-a` option for details.
|
||||||
|
|
||||||
|
`-only-match`
|
||||||
|
|
||||||
|
Only return a selected item, do not allow custom entry.
|
||||||
|
This mode always returns an entry. It will not return if no matching entry is
|
||||||
|
selected.
|
||||||
|
|
||||||
|
`-no-custom`
|
||||||
|
|
||||||
|
Only return a selected item, do not allow custom entry.
|
||||||
|
This mode returns directly when no entries given.
|
||||||
|
|
||||||
|
`-format` *format*
|
||||||
|
|
||||||
|
Allows the output of dmenu to be customized (N is the total number of input entries):
|
||||||
|
|
||||||
|
* 's' selected string
|
||||||
|
* 'i' index (0 - (N-1))
|
||||||
|
* 'd' index (1 - N)
|
||||||
|
* 'q' quote string
|
||||||
|
* 'p' Selected string stripped from Pango markup (Needs to be a valid string)
|
||||||
|
* 'f' filter string (user input)
|
||||||
|
* 'F' quoted filter string (user input)
|
||||||
|
|
||||||
|
Default: 's'
|
||||||
|
|
||||||
|
`-select` *string*
|
||||||
|
|
||||||
|
Select first line that matches the given string
|
||||||
|
|
||||||
|
`-mesg` *string*
|
||||||
|
|
||||||
|
Add a message line below the filter entry box. Supports Pango markup.
|
||||||
|
For more information on supported markup, see [here](https://docs.gtk.org/Pango/pango_markup.html)
|
||||||
|
|
||||||
|
`-dump`
|
||||||
|
|
||||||
|
Dump the filtered list to stdout and quit.
|
||||||
|
This can be used to get the list as **rofi** would filter it.
|
||||||
|
Use together with `-filter` command.
|
||||||
|
|
||||||
|
`-input` *file*
|
||||||
|
|
||||||
|
Reads from *file* instead of stdin.
|
||||||
|
|
||||||
|
`-password`
|
||||||
|
|
||||||
|
Hide the input text. This should not be considered secure!
|
||||||
|
|
||||||
|
`-markup-rows`
|
||||||
|
|
||||||
|
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
|
||||||
|
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html) for details about Pango markup.
|
||||||
|
|
||||||
|
|
||||||
|
`-multi-select`
|
||||||
|
|
||||||
|
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.
|
||||||
|
|
||||||
|
`-sync`
|
||||||
|
|
||||||
|
Force **rofi** mode to first read all data from stdin before showing the selection window. This is original dmenu behavior.
|
||||||
|
|
||||||
|
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
|
||||||
|
such as `-dump`, `-only-match` or `-auto-select`.
|
||||||
|
|
||||||
|
`-window-title` *title*
|
||||||
|
|
||||||
|
Set name used for the window title. Will be shown as Rofi - *title*
|
||||||
|
|
||||||
|
`-w` *windowid*
|
||||||
|
|
||||||
|
Position **rofi** over the window with the given X11 window ID.
|
||||||
|
|
||||||
|
`-keep-right`
|
||||||
|
|
||||||
|
Set ellipsize mode to start. So, the end of the string is visible.
|
||||||
|
|
||||||
|
`-display-columns`
|
||||||
|
|
||||||
|
A comma seperated list of columns to show.
|
||||||
|
|
||||||
|
`-display-column-separator`
|
||||||
|
|
||||||
|
The column separator. This is a regex.
|
||||||
|
|
||||||
|
*default*: '\t'
|
||||||
|
|
||||||
|
`-ballot-selected-str` *string*
|
||||||
|
|
||||||
|
When multi-select is enabled, prefix this string when element is selected.
|
||||||
|
|
||||||
|
*default*: "☑ "
|
||||||
|
|
||||||
|
`-ballot-unselected-str` *string*
|
||||||
|
|
||||||
|
When multi-select is enabled, prefix this string when element is not selected.
|
||||||
|
|
||||||
|
*default*: "☐ "
|
||||||
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
|
* **0**: Row has been selected accepted by user.
|
||||||
|
* **1**: User cancelled the selection.
|
||||||
|
* **10-28**: Row accepted by custom keybinding.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
456
mkdocs/docs/1.7.4/rofi-keys.5.markdown
Normal file
456
mkdocs/docs/1.7.4/rofi-keys.5.markdown
Normal file
|
@ -0,0 +1,456 @@
|
||||||
|
# ROFI-KEYS 5 rofi-keys
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi keys** - Rofi Key and Mouse bindings
|
||||||
|
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
|
||||||
|
**rofi** supports overriding of any of it key and mouse binding.
|
||||||
|
|
||||||
|
## Setting binding
|
||||||
|
|
||||||
|
Bindings can be done on the commandline (-{bindingname}):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rofi -show run -kb-accept-entry 'Control+Shift+space'
|
||||||
|
```
|
||||||
|
|
||||||
|
or via the configuration file:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+space";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The key can be set by its name (see above) or its keycode:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+[65]";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
An easy way to look up keycode is xev(1).
|
||||||
|
|
||||||
|
Multiple keys can be specified for an action as a comma separated list:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+space,Return";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
By Default **rofi** reacts on pressing, to act on the release of all keys
|
||||||
|
prepend the binding with `!`:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "!Control+Shift+space,Return";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Keyboard Bindings
|
||||||
|
|
||||||
|
### **kb-primary-paste**:
|
||||||
|
Paste primary selection
|
||||||
|
|
||||||
|
**Default**: Control+V,Shift+Insert
|
||||||
|
|
||||||
|
### **kb-secondary-paste**
|
||||||
|
Paste clipboard
|
||||||
|
|
||||||
|
**Default**: Control+v,Insert
|
||||||
|
|
||||||
|
### **kb-clear-line**
|
||||||
|
Clear input line
|
||||||
|
|
||||||
|
**Default**: Control+w
|
||||||
|
|
||||||
|
### **kb-move-front**
|
||||||
|
Beginning of line
|
||||||
|
|
||||||
|
**Default**: Control+a
|
||||||
|
|
||||||
|
### **kb-move-end**
|
||||||
|
End of line
|
||||||
|
|
||||||
|
**Default**: Control+e
|
||||||
|
|
||||||
|
### **kb-move-word-back**
|
||||||
|
Move back one word
|
||||||
|
|
||||||
|
**Default**: Alt+b,Control+Left
|
||||||
|
|
||||||
|
### **kb-move-word-forward**
|
||||||
|
Move forward one word
|
||||||
|
|
||||||
|
**Default**: Alt+f,Control+Right
|
||||||
|
|
||||||
|
### **kb-move-char-back**
|
||||||
|
Move back one char
|
||||||
|
|
||||||
|
**Default**: Left,Control+b
|
||||||
|
|
||||||
|
### **kb-move-char-forward**
|
||||||
|
Move forward one char
|
||||||
|
|
||||||
|
**Default**: Right,Control+f
|
||||||
|
|
||||||
|
### **kb-remove-word-back**
|
||||||
|
Delete previous word
|
||||||
|
|
||||||
|
**Default**: Control+Alt+h,Control+BackSpace
|
||||||
|
|
||||||
|
### **kb-remove-word-forward**
|
||||||
|
Delete next word
|
||||||
|
|
||||||
|
**Default**: Control+Alt+d
|
||||||
|
|
||||||
|
### **kb-remove-char-forward**
|
||||||
|
Delete next char
|
||||||
|
|
||||||
|
**Default**: Delete,Control+d
|
||||||
|
|
||||||
|
### **kb-remove-char-back**
|
||||||
|
Delete previous char
|
||||||
|
|
||||||
|
**Default**: BackSpace,Shift+BackSpace,Control+h
|
||||||
|
|
||||||
|
### **kb-remove-to-eol**
|
||||||
|
Delete till the end of line
|
||||||
|
|
||||||
|
**Default**: Control+k
|
||||||
|
|
||||||
|
### **kb-remove-to-sol**
|
||||||
|
Delete till the start of line
|
||||||
|
|
||||||
|
**Default**: Control+u
|
||||||
|
|
||||||
|
### **kb-accept-entry**
|
||||||
|
Accept entry
|
||||||
|
|
||||||
|
**Default**: Control+j,Control+m,Return,KP_Enter
|
||||||
|
|
||||||
|
### **kb-accept-custom**
|
||||||
|
Use entered text as command (in ssh/run modes)
|
||||||
|
|
||||||
|
**Default**: Control+Return
|
||||||
|
|
||||||
|
### **kb-accept-custom-alt**
|
||||||
|
Use entered text as command (in ssh/run modes)
|
||||||
|
|
||||||
|
**Default**: Control+Shift+Return
|
||||||
|
|
||||||
|
### **kb-accept-alt**
|
||||||
|
Use alternate accept command.
|
||||||
|
|
||||||
|
**Default**: Shift+Return
|
||||||
|
|
||||||
|
### **kb-delete-entry**
|
||||||
|
Delete entry from history
|
||||||
|
|
||||||
|
**Default**: Shift+Delete
|
||||||
|
|
||||||
|
### **kb-mode-next**
|
||||||
|
Switch to the next mode.
|
||||||
|
|
||||||
|
**Default**: Shift+Right,Control+Tab
|
||||||
|
|
||||||
|
### **kb-mode-previous**
|
||||||
|
Switch to the previous mode.
|
||||||
|
|
||||||
|
**Default**: Shift+Left,Control+ISO_Left_Tab
|
||||||
|
|
||||||
|
### **kb-mode-complete**
|
||||||
|
Start completion for mode.
|
||||||
|
|
||||||
|
**Default**: Control+l
|
||||||
|
|
||||||
|
### **kb-row-left**
|
||||||
|
Go to the previous column
|
||||||
|
|
||||||
|
**Default**: Control+Page_Up
|
||||||
|
|
||||||
|
### **kb-row-right**
|
||||||
|
Go to the next column
|
||||||
|
|
||||||
|
**Default**: Control+Page_Down
|
||||||
|
|
||||||
|
### **kb-row-up**
|
||||||
|
Select previous entry
|
||||||
|
|
||||||
|
**Default**: Up,Control+p
|
||||||
|
|
||||||
|
### **kb-row-down**
|
||||||
|
Select next entry
|
||||||
|
|
||||||
|
**Default**: Down,Control+n
|
||||||
|
|
||||||
|
### **kb-row-tab**
|
||||||
|
Go to next row, if one left, accept it, if no left next mode.
|
||||||
|
|
||||||
|
**Default**:
|
||||||
|
|
||||||
|
### **kb-element-next**
|
||||||
|
Go to next row.
|
||||||
|
|
||||||
|
**Default**: Tab
|
||||||
|
|
||||||
|
### **kb-element-prev**
|
||||||
|
Go to previous row.
|
||||||
|
|
||||||
|
**Default**: ISO_Left_Tab
|
||||||
|
|
||||||
|
### **kb-page-prev**
|
||||||
|
Go to the previous page
|
||||||
|
|
||||||
|
**Default**: Page_Up
|
||||||
|
|
||||||
|
### **kb-page-next**
|
||||||
|
Go to the next page
|
||||||
|
|
||||||
|
**Default**: Page_Down
|
||||||
|
|
||||||
|
### **kb-row-first**
|
||||||
|
Go to the first entry
|
||||||
|
|
||||||
|
**Default**: Home,KP_Home
|
||||||
|
|
||||||
|
### **kb-row-last**
|
||||||
|
Go to the last entry
|
||||||
|
|
||||||
|
**Default**: End,KP_End
|
||||||
|
|
||||||
|
### **kb-row-select**
|
||||||
|
Set selected item as input text
|
||||||
|
|
||||||
|
**Default**: Control+space
|
||||||
|
|
||||||
|
### **kb-screenshot**
|
||||||
|
Take a screenshot of the rofi window
|
||||||
|
|
||||||
|
**Default**: Alt+S
|
||||||
|
|
||||||
|
### **kb-ellipsize**
|
||||||
|
Toggle between ellipsize modes for displayed data
|
||||||
|
|
||||||
|
**Default**: Alt+period
|
||||||
|
|
||||||
|
### **kb-toggle-case-sensitivity**
|
||||||
|
Toggle case sensitivity
|
||||||
|
|
||||||
|
**Default**: grave,dead_grave
|
||||||
|
|
||||||
|
### **kb-toggle-sort**
|
||||||
|
Toggle sort
|
||||||
|
|
||||||
|
**Default**: Alt+grave
|
||||||
|
|
||||||
|
### **kb-cancel**
|
||||||
|
Quit rofi
|
||||||
|
|
||||||
|
**Default**: Escape,Control+g,Control+bracketleft
|
||||||
|
|
||||||
|
### **kb-custom-1**
|
||||||
|
Custom keybinding 1
|
||||||
|
|
||||||
|
**Default**: Alt+1
|
||||||
|
|
||||||
|
### **kb-custom-2**
|
||||||
|
Custom keybinding 2
|
||||||
|
|
||||||
|
**Default**: Alt+2
|
||||||
|
|
||||||
|
### **kb-custom-3**
|
||||||
|
Custom keybinding 3
|
||||||
|
|
||||||
|
**Default**: Alt+3
|
||||||
|
|
||||||
|
### **kb-custom-4**
|
||||||
|
Custom keybinding 4
|
||||||
|
|
||||||
|
**Default**: Alt+4
|
||||||
|
|
||||||
|
### **kb-custom-5**
|
||||||
|
Custom Keybinding 5
|
||||||
|
|
||||||
|
**Default**: Alt+5
|
||||||
|
|
||||||
|
### **kb-custom-6**
|
||||||
|
Custom keybinding 6
|
||||||
|
|
||||||
|
**Default**: Alt+6
|
||||||
|
|
||||||
|
### **kb-custom-7**
|
||||||
|
Custom Keybinding 7
|
||||||
|
|
||||||
|
**Default**: Alt+7
|
||||||
|
|
||||||
|
### **kb-custom-8**
|
||||||
|
Custom keybinding 8
|
||||||
|
|
||||||
|
**Default**: Alt+8
|
||||||
|
|
||||||
|
### **kb-custom-9**
|
||||||
|
Custom keybinding 9
|
||||||
|
|
||||||
|
**Default**: Alt+9
|
||||||
|
|
||||||
|
### **kb-custom-10**
|
||||||
|
Custom keybinding 10
|
||||||
|
|
||||||
|
**Default**: Alt+0
|
||||||
|
|
||||||
|
### **kb-custom-11**
|
||||||
|
Custom keybinding 11
|
||||||
|
|
||||||
|
**Default**: Alt+exclam
|
||||||
|
|
||||||
|
### **kb-custom-12**
|
||||||
|
Custom keybinding 12
|
||||||
|
|
||||||
|
**Default**: Alt+at
|
||||||
|
|
||||||
|
### **kb-custom-13**
|
||||||
|
Custom keybinding 13
|
||||||
|
|
||||||
|
**Default**: Alt+numbersign
|
||||||
|
|
||||||
|
### **kb-custom-14**
|
||||||
|
Custom keybinding 14
|
||||||
|
|
||||||
|
**Default**: Alt+dollar
|
||||||
|
|
||||||
|
### **kb-custom-15**
|
||||||
|
Custom keybinding 15
|
||||||
|
|
||||||
|
**Default**: Alt+percent
|
||||||
|
|
||||||
|
### **kb-custom-16**
|
||||||
|
Custom keybinding 16
|
||||||
|
|
||||||
|
**Default**: Alt+dead_circumflex
|
||||||
|
|
||||||
|
### **kb-custom-17**
|
||||||
|
Custom keybinding 17
|
||||||
|
|
||||||
|
**Default**: Alt+ampersand
|
||||||
|
|
||||||
|
### **kb-custom-18**
|
||||||
|
Custom keybinding 18
|
||||||
|
|
||||||
|
**Default**: Alt+asterisk
|
||||||
|
|
||||||
|
### **kb-custom-19**
|
||||||
|
Custom Keybinding 19
|
||||||
|
|
||||||
|
**Default**: Alt+parenleft
|
||||||
|
|
||||||
|
### **kb-select-1**
|
||||||
|
Select row 1
|
||||||
|
|
||||||
|
**Default**: Super+1
|
||||||
|
|
||||||
|
### **kb-select-2**
|
||||||
|
Select row 2
|
||||||
|
|
||||||
|
**Default**: Super+2
|
||||||
|
|
||||||
|
### **kb-select-3**
|
||||||
|
Select row 3
|
||||||
|
|
||||||
|
**Default**: Super+3
|
||||||
|
|
||||||
|
### **kb-select-4**
|
||||||
|
Select row 4
|
||||||
|
|
||||||
|
**Default**: Super+4
|
||||||
|
|
||||||
|
### **kb-select-5**
|
||||||
|
Select row 5
|
||||||
|
|
||||||
|
**Default**: Super+5
|
||||||
|
|
||||||
|
### **kb-select-6**
|
||||||
|
Select row 6
|
||||||
|
|
||||||
|
**Default**: Super+6
|
||||||
|
|
||||||
|
### **kb-select-7**
|
||||||
|
Select row 7
|
||||||
|
|
||||||
|
**Default**: Super+7
|
||||||
|
|
||||||
|
### **kb-select-8**
|
||||||
|
Select row 8
|
||||||
|
|
||||||
|
**Default**: Super+8
|
||||||
|
|
||||||
|
### **kb-select-9**
|
||||||
|
Select row 9
|
||||||
|
|
||||||
|
**Default**: Super+9
|
||||||
|
|
||||||
|
### **kb-select-10**
|
||||||
|
Select row 10
|
||||||
|
|
||||||
|
**Default**: Super+0
|
||||||
|
|
||||||
|
## Mouse Bindings
|
||||||
|
|
||||||
|
### **ml-row-left**
|
||||||
|
Go to the previous column
|
||||||
|
|
||||||
|
**Default**: ScrollLeft
|
||||||
|
|
||||||
|
### **ml-row-right**
|
||||||
|
Go to the next column
|
||||||
|
|
||||||
|
**Default**: ScrollRight
|
||||||
|
|
||||||
|
### **ml-row-up**
|
||||||
|
Select previous entry
|
||||||
|
|
||||||
|
**Default**: ScrollUp
|
||||||
|
|
||||||
|
### **ml-row-down**
|
||||||
|
Select next entry
|
||||||
|
|
||||||
|
**Default**: ScrollDown
|
||||||
|
|
||||||
|
### **me-select-entry**
|
||||||
|
Select hovered row
|
||||||
|
|
||||||
|
**Default**: MousePrimary
|
||||||
|
|
||||||
|
### **me-accept-entry**
|
||||||
|
Accept hovered row
|
||||||
|
|
||||||
|
**Default**: MouseDPrimary
|
||||||
|
|
||||||
|
### **me-accept-custom**
|
||||||
|
Accept hovered row with custom action
|
||||||
|
|
||||||
|
**Default**: Control+MouseDPrimary
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
155
mkdocs/docs/1.7.4/rofi-script.5.markdown
Normal file
155
mkdocs/docs/1.7.4/rofi-script.5.markdown
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
# ROFI-SCRIPT 5 rofi-script
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**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}"
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show fb -modes "fb:file_browser.sh"
|
||||||
|
```
|
||||||
|
|
||||||
|
The name should be unique.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Rofi calls the executable without arguments on startup. This should generate a
|
||||||
|
list of options, separated by a newline (`\n`) (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.
|
||||||
|
|
||||||
|
A simple script would be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ x"$@" = x"quit" ]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "reload"
|
||||||
|
echo "quit"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
Rofi sets the following environment variable when executing the script:
|
||||||
|
|
||||||
|
### `ROFI_RETV`
|
||||||
|
|
||||||
|
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 ).
|
||||||
|
|
||||||
|
### `ROFI_INFO`
|
||||||
|
|
||||||
|
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
|
||||||
|
|
||||||
|
### `ROFI_DATA`
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
For example to set the prompt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "\0prompt\x1fChange prompt\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
multiple entries can be passed using the `\x1f` separator.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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).
|
||||||
|
|
||||||
|
In bash the best way to do this is using `coproc`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
1421
mkdocs/docs/1.7.4/rofi-theme.5.markdown
Normal file
1421
mkdocs/docs/1.7.4/rofi-theme.5.markdown
Normal file
File diff suppressed because it is too large
Load diff
1005
mkdocs/docs/1.7.4/rofi.1.markdown
Normal file
1005
mkdocs/docs/1.7.4/rofi.1.markdown
Normal file
File diff suppressed because it is too large
Load diff
176
mkdocs/docs/1.7.5/rofi-debugging.5.markdown
Normal file
176
mkdocs/docs/1.7.5/rofi-debugging.5.markdown
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
# ROFI DEBUGGING 5 rofi debugging
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
Debugging rofi.
|
||||||
|
|
||||||
|
When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test
|
||||||
|
to help pin-point the problem.
|
||||||
|
|
||||||
|
First try disabling your custom configuration: `-no-config`
|
||||||
|
|
||||||
|
This disables the parsing of the configuration files. This runs rofi in *stock* mode.
|
||||||
|
|
||||||
|
If you run custom C plugins, you can disable the plugins using: `-no-plugins`
|
||||||
|
|
||||||
|
|
||||||
|
## Get the relevant information for an issue
|
||||||
|
|
||||||
|
Please pastebin the output of the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rofi -help
|
||||||
|
rofi -dump-config
|
||||||
|
rofi -dump-theme
|
||||||
|
```
|
||||||
|
|
||||||
|
`rofi -help` provides us with the configuration files parsed, the exact version, monitor layout
|
||||||
|
and more useful information.
|
||||||
|
|
||||||
|
The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi`
|
||||||
|
interpretation of your configuration and theme.
|
||||||
|
|
||||||
|
Please check the output for identifiable information and remove this.
|
||||||
|
|
||||||
|
|
||||||
|
## Timing traces
|
||||||
|
|
||||||
|
To get a timing trace, enable the **Timings** debug domain.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
G_MESSAGES_DEBUG=Timings rofi -show drun
|
||||||
|
```
|
||||||
|
|
||||||
|
It will show a trace with (useful) timing information at relevant points during the execution.
|
||||||
|
This will help debugging when rofi is slow to start.
|
||||||
|
|
||||||
|
Example trace:
|
||||||
|
|
||||||
|
```
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs)
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done.
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background
|
||||||
|
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Debug domains
|
||||||
|
|
||||||
|
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
|
||||||
|
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G\_MESSAGES\_DEBUG
|
||||||
|
environment variable. At the time of creation of this page, the following debug domains exist:
|
||||||
|
|
||||||
|
* all: Show debug information from all domains.
|
||||||
|
* X11Helper: The X11 Helper functions.
|
||||||
|
* View: The main window view functions.
|
||||||
|
* Widgets.Box: The Box widget.
|
||||||
|
* Modes.DMenu: The dmenu mode.
|
||||||
|
* Modes.Run: The run mode.
|
||||||
|
* Modes.DRun: The desktop file run mode.
|
||||||
|
* Modes.Window: The window mode.
|
||||||
|
* Modes.Script: The script mode.
|
||||||
|
* Modes.Combi: The script mode.
|
||||||
|
* Modes.Ssh: The ssh mode.
|
||||||
|
* Rofi: The main application.
|
||||||
|
* Timings: Get timing output.
|
||||||
|
* Theme: Theme engine debug output. (warning lots of output).
|
||||||
|
* Widgets.Icon: The Icon widget.
|
||||||
|
* Widgets.Box: The box widget.
|
||||||
|
* Widgets.Container: The container widget.
|
||||||
|
* Widgets.Window: The window widget.
|
||||||
|
* Helpers.IconFetcher: Information about icon lookup.
|
||||||
|
|
||||||
|
For full list see `man rofi`.
|
||||||
|
|
||||||
|
Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output from the Desktop file run dialog.
|
||||||
|
|
||||||
|
To redirect the debug output to a file (`~/rofi.log`) add:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show drun -log ~/rofi.log
|
||||||
|
```
|
||||||
|
|
||||||
|
Specifying the logfile automatically enabled all log domains.
|
||||||
|
This can be useful when rofi is launched from a window manager.
|
||||||
|
|
||||||
|
|
||||||
|
## Creating a backtrace.
|
||||||
|
|
||||||
|
First make sure you compile **rofi** with debug symbols:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make CFLAGS="-O0 -g3" clean rofi
|
||||||
|
```
|
||||||
|
|
||||||
|
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
|
||||||
|
mouse. So if it crashes in GDB you are stuck.
|
||||||
|
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
|
||||||
|
can then load the core in GDB.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gdb rofi core
|
||||||
|
```
|
||||||
|
|
||||||
|
Then type inside gdb:
|
||||||
|
|
||||||
|
```
|
||||||
|
thread apply all bt
|
||||||
|
```
|
||||||
|
|
||||||
|
The output trace is useful when reporting crashes.
|
||||||
|
|
||||||
|
Some distribution have `systemd-coredump`, this way you can easily get a backtrace via `coredumpctl`.
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
**rofi-sensible-terminal(1)**, **dmenu(1)**, **rofi-debugging(5)**, **rofi-theme(5)**, **rofi-script(5)**, **rofi-keys(5)**,**rofi-theme-selector(1)**
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
* Qball Cow <qball@blame.services>
|
217
mkdocs/docs/1.7.5/rofi-dmenu.5.markdown
Normal file
217
mkdocs/docs/1.7.5/rofi-dmenu.5.markdown
Normal file
|
@ -0,0 +1,217 @@
|
||||||
|
# ROFI-DMENU 5 rofi-dmenu
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi dmenu mode** - Rofi dmenu emulation
|
||||||
|
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
|
||||||
|
To integrate **rofi** into scripts as simple selection dialogs,
|
||||||
|
**rofi** supports emulating **dmenu(1)** (A dynamic menu for X11).
|
||||||
|
|
||||||
|
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
|
||||||
|
|
||||||
|
**rofi** does not aim to be 100% compatible with `dmenu`. There are simply too many flavors of `dmenu`.
|
||||||
|
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
|
||||||
|
Besides, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
|
||||||
|
|
||||||
|
|
||||||
|
## BASIC CONCEPT
|
||||||
|
|
||||||
|
In `dmenu` mode, **rofi** reads data from standard in, splits them into separate entries and displays them.
|
||||||
|
If the user selects a row, this is printed out to standard out, allowing the script to process it further.
|
||||||
|
|
||||||
|
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
|
||||||
|
**rofi** and the output of rofi into the next.
|
||||||
|
|
||||||
|
## USAGE
|
||||||
|
|
||||||
|
By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation mode.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls | rofi -dmenu
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU DROP-IN REPLACEMENT
|
||||||
|
|
||||||
|
If `argv[0]` (calling command) is dmenu, **rofi** will start in dmenu mode.
|
||||||
|
This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink **rofi** to dmenu in `$PATH`.
|
||||||
|
|
||||||
|
ln -s /usr/bin/rofi /usr/bin/dmenu
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU VS SCRIPT MODE
|
||||||
|
|
||||||
|
Script mode is used to extend **rofi**, dmenu mode is used to extend a script.
|
||||||
|
The two do share much of the same input format. Please see the **rofi-script(5)** manpage for more information.
|
||||||
|
|
||||||
|
|
||||||
|
### DMENU SPECIFIC COMMANDLINE FLAGS
|
||||||
|
|
||||||
|
A lot of these options can also be modified by the script using special input. See the **rofi-script(5)** manpage
|
||||||
|
for more information about this syntax.
|
||||||
|
|
||||||
|
`-sep` *separator*
|
||||||
|
|
||||||
|
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator:
|
||||||
|
|
||||||
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
|
||||||
|
|
||||||
|
`-p` *prompt*
|
||||||
|
|
||||||
|
Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e.
|
||||||
|
|
||||||
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
|
||||||
|
|
||||||
|
Default: *dmenu*
|
||||||
|
|
||||||
|
`-l` *number of lines to show*
|
||||||
|
|
||||||
|
Maximum number of lines the menu may show before scrolling.
|
||||||
|
|
||||||
|
rofi -dmenu -l 25
|
||||||
|
|
||||||
|
Default: *15*
|
||||||
|
|
||||||
|
`-i`
|
||||||
|
|
||||||
|
Makes `dmenu` searches case-insensitive
|
||||||
|
|
||||||
|
`-a` *X*
|
||||||
|
|
||||||
|
Active row, mark *X* as active. Where *X* is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify:
|
||||||
|
|
||||||
|
* A single row: '5'
|
||||||
|
* A range of (last 3) rows: '-3:'
|
||||||
|
* 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
|
||||||
|
* A set of rows: '2,0,-9'
|
||||||
|
* Or any combination: '5,-3:,7:11,2,0,-9'
|
||||||
|
|
||||||
|
`-u` *X*
|
||||||
|
|
||||||
|
Urgent row, mark *X* as urgent. See `-a` option for details.
|
||||||
|
|
||||||
|
`-only-match`
|
||||||
|
|
||||||
|
Only return a selected item, do not allow custom entry.
|
||||||
|
This mode always returns an entry. It will not return if no matching entry is
|
||||||
|
selected.
|
||||||
|
|
||||||
|
`-no-custom`
|
||||||
|
|
||||||
|
Only return a selected item, do not allow custom entry.
|
||||||
|
This mode returns directly when no entries given.
|
||||||
|
|
||||||
|
`-format` *format*
|
||||||
|
|
||||||
|
Allows the output of dmenu to be customized (N is the total number of input entries):
|
||||||
|
|
||||||
|
* 's' selected string
|
||||||
|
* 'i' index (0 - (N-1))
|
||||||
|
* 'd' index (1 - N)
|
||||||
|
* 'q' quote string
|
||||||
|
* 'p' Selected string stripped from Pango markup (Needs to be a valid string)
|
||||||
|
* 'f' filter string (user input)
|
||||||
|
* 'F' quoted filter string (user input)
|
||||||
|
|
||||||
|
Default: 's'
|
||||||
|
|
||||||
|
`-select` *string*
|
||||||
|
|
||||||
|
Select first line that matches the given string
|
||||||
|
|
||||||
|
`-mesg` *string*
|
||||||
|
|
||||||
|
Add a message line below the filter entry box. Supports Pango markup.
|
||||||
|
For more information on supported markup, see [here](https://docs.gtk.org/Pango/pango_markup.html)
|
||||||
|
|
||||||
|
`-dump`
|
||||||
|
|
||||||
|
Dump the filtered list to stdout and quit.
|
||||||
|
This can be used to get the list as **rofi** would filter it.
|
||||||
|
Use together with `-filter` command.
|
||||||
|
|
||||||
|
`-input` *file*
|
||||||
|
|
||||||
|
Reads from *file* instead of stdin.
|
||||||
|
|
||||||
|
`-password`
|
||||||
|
|
||||||
|
Hide the input text. This should not be considered secure!
|
||||||
|
|
||||||
|
`-markup-rows`
|
||||||
|
|
||||||
|
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
|
||||||
|
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html) for details about Pango markup.
|
||||||
|
|
||||||
|
|
||||||
|
`-multi-select`
|
||||||
|
|
||||||
|
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.
|
||||||
|
|
||||||
|
`-sync`
|
||||||
|
|
||||||
|
Force **rofi** mode to first read all data from stdin before showing the selection window. This is original dmenu behavior.
|
||||||
|
|
||||||
|
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
|
||||||
|
such as `-dump`, `-only-match` or `-auto-select`.
|
||||||
|
|
||||||
|
`-window-title` *title*
|
||||||
|
|
||||||
|
Set name used for the window title. Will be shown as Rofi - *title*
|
||||||
|
|
||||||
|
`-w` *windowid*
|
||||||
|
|
||||||
|
Position **rofi** over the window with the given X11 window ID.
|
||||||
|
|
||||||
|
`-keep-right`
|
||||||
|
|
||||||
|
Set ellipsize mode to start. So, the end of the string is visible.
|
||||||
|
|
||||||
|
`-display-columns`
|
||||||
|
|
||||||
|
A comma seperated list of columns to show.
|
||||||
|
|
||||||
|
`-display-column-separator`
|
||||||
|
|
||||||
|
The column separator. This is a regex.
|
||||||
|
|
||||||
|
*default*: '\t'
|
||||||
|
|
||||||
|
`-ballot-selected-str` *string*
|
||||||
|
|
||||||
|
When multi-select is enabled, prefix this string when element is selected.
|
||||||
|
|
||||||
|
*default*: "☑ "
|
||||||
|
|
||||||
|
`-ballot-unselected-str` *string*
|
||||||
|
|
||||||
|
When multi-select is enabled, prefix this string when element is not selected.
|
||||||
|
|
||||||
|
*default*: "☐ "
|
||||||
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
|
* **0**: Row has been selected accepted by user.
|
||||||
|
* **1**: User cancelled the selection.
|
||||||
|
* **10-28**: Row accepted by custom keybinding.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
456
mkdocs/docs/1.7.5/rofi-keys.5.markdown
Normal file
456
mkdocs/docs/1.7.5/rofi-keys.5.markdown
Normal file
|
@ -0,0 +1,456 @@
|
||||||
|
# ROFI-KEYS 5 rofi-keys
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**rofi keys** - Rofi Key and Mouse bindings
|
||||||
|
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
|
||||||
|
**rofi** supports overriding of any of it key and mouse binding.
|
||||||
|
|
||||||
|
## Setting binding
|
||||||
|
|
||||||
|
Bindings can be done on the commandline (-{bindingname}):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rofi -show run -kb-accept-entry 'Control+Shift+space'
|
||||||
|
```
|
||||||
|
|
||||||
|
or via the configuration file:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+space";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The key can be set by its name (see above) or its keycode:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+[65]";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
An easy way to look up keycode is xev(1).
|
||||||
|
|
||||||
|
Multiple keys can be specified for an action as a comma separated list:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "Control+Shift+space,Return";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
By Default **rofi** reacts on pressing, to act on the release of all keys
|
||||||
|
prepend the binding with `!`:
|
||||||
|
|
||||||
|
```css
|
||||||
|
configuration {
|
||||||
|
kb-accept-entry: "!Control+Shift+space,Return";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Keyboard Bindings
|
||||||
|
|
||||||
|
### **kb-primary-paste**:
|
||||||
|
Paste primary selection
|
||||||
|
|
||||||
|
**Default**: Control+V,Shift+Insert
|
||||||
|
|
||||||
|
### **kb-secondary-paste**
|
||||||
|
Paste clipboard
|
||||||
|
|
||||||
|
**Default**: Control+v,Insert
|
||||||
|
|
||||||
|
### **kb-clear-line**
|
||||||
|
Clear input line
|
||||||
|
|
||||||
|
**Default**: Control+w
|
||||||
|
|
||||||
|
### **kb-move-front**
|
||||||
|
Beginning of line
|
||||||
|
|
||||||
|
**Default**: Control+a
|
||||||
|
|
||||||
|
### **kb-move-end**
|
||||||
|
End of line
|
||||||
|
|
||||||
|
**Default**: Control+e
|
||||||
|
|
||||||
|
### **kb-move-word-back**
|
||||||
|
Move back one word
|
||||||
|
|
||||||
|
**Default**: Alt+b,Control+Left
|
||||||
|
|
||||||
|
### **kb-move-word-forward**
|
||||||
|
Move forward one word
|
||||||
|
|
||||||
|
**Default**: Alt+f,Control+Right
|
||||||
|
|
||||||
|
### **kb-move-char-back**
|
||||||
|
Move back one char
|
||||||
|
|
||||||
|
**Default**: Left,Control+b
|
||||||
|
|
||||||
|
### **kb-move-char-forward**
|
||||||
|
Move forward one char
|
||||||
|
|
||||||
|
**Default**: Right,Control+f
|
||||||
|
|
||||||
|
### **kb-remove-word-back**
|
||||||
|
Delete previous word
|
||||||
|
|
||||||
|
**Default**: Control+Alt+h,Control+BackSpace
|
||||||
|
|
||||||
|
### **kb-remove-word-forward**
|
||||||
|
Delete next word
|
||||||
|
|
||||||
|
**Default**: Control+Alt+d
|
||||||
|
|
||||||
|
### **kb-remove-char-forward**
|
||||||
|
Delete next char
|
||||||
|
|
||||||
|
**Default**: Delete,Control+d
|
||||||
|
|
||||||
|
### **kb-remove-char-back**
|
||||||
|
Delete previous char
|
||||||
|
|
||||||
|
**Default**: BackSpace,Shift+BackSpace,Control+h
|
||||||
|
|
||||||
|
### **kb-remove-to-eol**
|
||||||
|
Delete till the end of line
|
||||||
|
|
||||||
|
**Default**: Control+k
|
||||||
|
|
||||||
|
### **kb-remove-to-sol**
|
||||||
|
Delete till the start of line
|
||||||
|
|
||||||
|
**Default**: Control+u
|
||||||
|
|
||||||
|
### **kb-accept-entry**
|
||||||
|
Accept entry
|
||||||
|
|
||||||
|
**Default**: Control+j,Control+m,Return,KP_Enter
|
||||||
|
|
||||||
|
### **kb-accept-custom**
|
||||||
|
Use entered text as command (in ssh/run modes)
|
||||||
|
|
||||||
|
**Default**: Control+Return
|
||||||
|
|
||||||
|
### **kb-accept-custom-alt**
|
||||||
|
Use entered text as command (in ssh/run modes)
|
||||||
|
|
||||||
|
**Default**: Control+Shift+Return
|
||||||
|
|
||||||
|
### **kb-accept-alt**
|
||||||
|
Use alternate accept command.
|
||||||
|
|
||||||
|
**Default**: Shift+Return
|
||||||
|
|
||||||
|
### **kb-delete-entry**
|
||||||
|
Delete entry from history
|
||||||
|
|
||||||
|
**Default**: Shift+Delete
|
||||||
|
|
||||||
|
### **kb-mode-next**
|
||||||
|
Switch to the next mode.
|
||||||
|
|
||||||
|
**Default**: Shift+Right,Control+Tab
|
||||||
|
|
||||||
|
### **kb-mode-previous**
|
||||||
|
Switch to the previous mode.
|
||||||
|
|
||||||
|
**Default**: Shift+Left,Control+ISO_Left_Tab
|
||||||
|
|
||||||
|
### **kb-mode-complete**
|
||||||
|
Start completion for mode.
|
||||||
|
|
||||||
|
**Default**: Control+l
|
||||||
|
|
||||||
|
### **kb-row-left**
|
||||||
|
Go to the previous column
|
||||||
|
|
||||||
|
**Default**: Control+Page_Up
|
||||||
|
|
||||||
|
### **kb-row-right**
|
||||||
|
Go to the next column
|
||||||
|
|
||||||
|
**Default**: Control+Page_Down
|
||||||
|
|
||||||
|
### **kb-row-up**
|
||||||
|
Select previous entry
|
||||||
|
|
||||||
|
**Default**: Up,Control+p
|
||||||
|
|
||||||
|
### **kb-row-down**
|
||||||
|
Select next entry
|
||||||
|
|
||||||
|
**Default**: Down,Control+n
|
||||||
|
|
||||||
|
### **kb-row-tab**
|
||||||
|
Go to next row, if one left, accept it, if no left next mode.
|
||||||
|
|
||||||
|
**Default**:
|
||||||
|
|
||||||
|
### **kb-element-next**
|
||||||
|
Go to next row.
|
||||||
|
|
||||||
|
**Default**: Tab
|
||||||
|
|
||||||
|
### **kb-element-prev**
|
||||||
|
Go to previous row.
|
||||||
|
|
||||||
|
**Default**: ISO_Left_Tab
|
||||||
|
|
||||||
|
### **kb-page-prev**
|
||||||
|
Go to the previous page
|
||||||
|
|
||||||
|
**Default**: Page_Up
|
||||||
|
|
||||||
|
### **kb-page-next**
|
||||||
|
Go to the next page
|
||||||
|
|
||||||
|
**Default**: Page_Down
|
||||||
|
|
||||||
|
### **kb-row-first**
|
||||||
|
Go to the first entry
|
||||||
|
|
||||||
|
**Default**: Home,KP_Home
|
||||||
|
|
||||||
|
### **kb-row-last**
|
||||||
|
Go to the last entry
|
||||||
|
|
||||||
|
**Default**: End,KP_End
|
||||||
|
|
||||||
|
### **kb-row-select**
|
||||||
|
Set selected item as input text
|
||||||
|
|
||||||
|
**Default**: Control+space
|
||||||
|
|
||||||
|
### **kb-screenshot**
|
||||||
|
Take a screenshot of the rofi window
|
||||||
|
|
||||||
|
**Default**: Alt+S
|
||||||
|
|
||||||
|
### **kb-ellipsize**
|
||||||
|
Toggle between ellipsize modes for displayed data
|
||||||
|
|
||||||
|
**Default**: Alt+period
|
||||||
|
|
||||||
|
### **kb-toggle-case-sensitivity**
|
||||||
|
Toggle case sensitivity
|
||||||
|
|
||||||
|
**Default**: grave,dead_grave
|
||||||
|
|
||||||
|
### **kb-toggle-sort**
|
||||||
|
Toggle sort
|
||||||
|
|
||||||
|
**Default**: Alt+grave
|
||||||
|
|
||||||
|
### **kb-cancel**
|
||||||
|
Quit rofi
|
||||||
|
|
||||||
|
**Default**: Escape,Control+g,Control+bracketleft
|
||||||
|
|
||||||
|
### **kb-custom-1**
|
||||||
|
Custom keybinding 1
|
||||||
|
|
||||||
|
**Default**: Alt+1
|
||||||
|
|
||||||
|
### **kb-custom-2**
|
||||||
|
Custom keybinding 2
|
||||||
|
|
||||||
|
**Default**: Alt+2
|
||||||
|
|
||||||
|
### **kb-custom-3**
|
||||||
|
Custom keybinding 3
|
||||||
|
|
||||||
|
**Default**: Alt+3
|
||||||
|
|
||||||
|
### **kb-custom-4**
|
||||||
|
Custom keybinding 4
|
||||||
|
|
||||||
|
**Default**: Alt+4
|
||||||
|
|
||||||
|
### **kb-custom-5**
|
||||||
|
Custom Keybinding 5
|
||||||
|
|
||||||
|
**Default**: Alt+5
|
||||||
|
|
||||||
|
### **kb-custom-6**
|
||||||
|
Custom keybinding 6
|
||||||
|
|
||||||
|
**Default**: Alt+6
|
||||||
|
|
||||||
|
### **kb-custom-7**
|
||||||
|
Custom Keybinding 7
|
||||||
|
|
||||||
|
**Default**: Alt+7
|
||||||
|
|
||||||
|
### **kb-custom-8**
|
||||||
|
Custom keybinding 8
|
||||||
|
|
||||||
|
**Default**: Alt+8
|
||||||
|
|
||||||
|
### **kb-custom-9**
|
||||||
|
Custom keybinding 9
|
||||||
|
|
||||||
|
**Default**: Alt+9
|
||||||
|
|
||||||
|
### **kb-custom-10**
|
||||||
|
Custom keybinding 10
|
||||||
|
|
||||||
|
**Default**: Alt+0
|
||||||
|
|
||||||
|
### **kb-custom-11**
|
||||||
|
Custom keybinding 11
|
||||||
|
|
||||||
|
**Default**: Alt+exclam
|
||||||
|
|
||||||
|
### **kb-custom-12**
|
||||||
|
Custom keybinding 12
|
||||||
|
|
||||||
|
**Default**: Alt+at
|
||||||
|
|
||||||
|
### **kb-custom-13**
|
||||||
|
Custom keybinding 13
|
||||||
|
|
||||||
|
**Default**: Alt+numbersign
|
||||||
|
|
||||||
|
### **kb-custom-14**
|
||||||
|
Custom keybinding 14
|
||||||
|
|
||||||
|
**Default**: Alt+dollar
|
||||||
|
|
||||||
|
### **kb-custom-15**
|
||||||
|
Custom keybinding 15
|
||||||
|
|
||||||
|
**Default**: Alt+percent
|
||||||
|
|
||||||
|
### **kb-custom-16**
|
||||||
|
Custom keybinding 16
|
||||||
|
|
||||||
|
**Default**: Alt+dead_circumflex
|
||||||
|
|
||||||
|
### **kb-custom-17**
|
||||||
|
Custom keybinding 17
|
||||||
|
|
||||||
|
**Default**: Alt+ampersand
|
||||||
|
|
||||||
|
### **kb-custom-18**
|
||||||
|
Custom keybinding 18
|
||||||
|
|
||||||
|
**Default**: Alt+asterisk
|
||||||
|
|
||||||
|
### **kb-custom-19**
|
||||||
|
Custom Keybinding 19
|
||||||
|
|
||||||
|
**Default**: Alt+parenleft
|
||||||
|
|
||||||
|
### **kb-select-1**
|
||||||
|
Select row 1
|
||||||
|
|
||||||
|
**Default**: Super+1
|
||||||
|
|
||||||
|
### **kb-select-2**
|
||||||
|
Select row 2
|
||||||
|
|
||||||
|
**Default**: Super+2
|
||||||
|
|
||||||
|
### **kb-select-3**
|
||||||
|
Select row 3
|
||||||
|
|
||||||
|
**Default**: Super+3
|
||||||
|
|
||||||
|
### **kb-select-4**
|
||||||
|
Select row 4
|
||||||
|
|
||||||
|
**Default**: Super+4
|
||||||
|
|
||||||
|
### **kb-select-5**
|
||||||
|
Select row 5
|
||||||
|
|
||||||
|
**Default**: Super+5
|
||||||
|
|
||||||
|
### **kb-select-6**
|
||||||
|
Select row 6
|
||||||
|
|
||||||
|
**Default**: Super+6
|
||||||
|
|
||||||
|
### **kb-select-7**
|
||||||
|
Select row 7
|
||||||
|
|
||||||
|
**Default**: Super+7
|
||||||
|
|
||||||
|
### **kb-select-8**
|
||||||
|
Select row 8
|
||||||
|
|
||||||
|
**Default**: Super+8
|
||||||
|
|
||||||
|
### **kb-select-9**
|
||||||
|
Select row 9
|
||||||
|
|
||||||
|
**Default**: Super+9
|
||||||
|
|
||||||
|
### **kb-select-10**
|
||||||
|
Select row 10
|
||||||
|
|
||||||
|
**Default**: Super+0
|
||||||
|
|
||||||
|
## Mouse Bindings
|
||||||
|
|
||||||
|
### **ml-row-left**
|
||||||
|
Go to the previous column
|
||||||
|
|
||||||
|
**Default**: ScrollLeft
|
||||||
|
|
||||||
|
### **ml-row-right**
|
||||||
|
Go to the next column
|
||||||
|
|
||||||
|
**Default**: ScrollRight
|
||||||
|
|
||||||
|
### **ml-row-up**
|
||||||
|
Select previous entry
|
||||||
|
|
||||||
|
**Default**: ScrollUp
|
||||||
|
|
||||||
|
### **ml-row-down**
|
||||||
|
Select next entry
|
||||||
|
|
||||||
|
**Default**: ScrollDown
|
||||||
|
|
||||||
|
### **me-select-entry**
|
||||||
|
Select hovered row
|
||||||
|
|
||||||
|
**Default**: MousePrimary
|
||||||
|
|
||||||
|
### **me-accept-entry**
|
||||||
|
Accept hovered row
|
||||||
|
|
||||||
|
**Default**: MouseDPrimary
|
||||||
|
|
||||||
|
### **me-accept-custom**
|
||||||
|
Accept hovered row with custom action
|
||||||
|
|
||||||
|
**Default**: Control+MouseDPrimary
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
155
mkdocs/docs/1.7.5/rofi-script.5.markdown
Normal file
155
mkdocs/docs/1.7.5/rofi-script.5.markdown
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
# ROFI-SCRIPT 5 rofi-script
|
||||||
|
|
||||||
|
## NAME
|
||||||
|
|
||||||
|
**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}"
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
rofi -show fb -modes "fb:file_browser.sh"
|
||||||
|
```
|
||||||
|
|
||||||
|
The name should be unique.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Rofi calls the executable without arguments on startup. This should generate a
|
||||||
|
list of options, separated by a newline (`\n`) (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.
|
||||||
|
|
||||||
|
A simple script would be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ x"$@" = x"quit" ]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "reload"
|
||||||
|
echo "quit"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
Rofi sets the following environment variable when executing the script:
|
||||||
|
|
||||||
|
### `ROFI_RETV`
|
||||||
|
|
||||||
|
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 ).
|
||||||
|
|
||||||
|
### `ROFI_INFO`
|
||||||
|
|
||||||
|
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
|
||||||
|
|
||||||
|
### `ROFI_DATA`
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
For example to set the prompt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "\0prompt\x1fChange prompt\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
multiple entries can be passed using the `\x1f` separator.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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).
|
||||||
|
|
||||||
|
In bash the best way to do this is using `coproc`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
## SEE ALSO
|
||||||
|
|
||||||
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
|
||||||
|
|
||||||
|
## AUTHOR
|
||||||
|
|
||||||
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
||||||
|
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.
|
1421
mkdocs/docs/1.7.5/rofi-theme.5.markdown
Normal file
1421
mkdocs/docs/1.7.5/rofi-theme.5.markdown
Normal file
File diff suppressed because it is too large
Load diff
1005
mkdocs/docs/1.7.5/rofi.1.markdown
Normal file
1005
mkdocs/docs/1.7.5/rofi.1.markdown
Normal file
File diff suppressed because it is too large
Load diff
1
mkdocs/docs/CONFIG.md
Symbolic link
1
mkdocs/docs/CONFIG.md
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../CONFIG.md
|
1
mkdocs/docs/COPYING.md
Symbolic link
1
mkdocs/docs/COPYING.md
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../COPYING
|
1
mkdocs/docs/INSTALL.md
Symbolic link
1
mkdocs/docs/INSTALL.md
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../INSTALL.md
|
1
mkdocs/docs/current/rofi-debugging.5.markdown
Symbolic link
1
mkdocs/docs/current/rofi-debugging.5.markdown
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../doc/rofi-debugging.5.markdown
|
1
mkdocs/docs/current/rofi-dmenu.5.markdown
Symbolic link
1
mkdocs/docs/current/rofi-dmenu.5.markdown
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../doc/rofi-dmenu.5.markdown
|
1
mkdocs/docs/current/rofi-keys.5.markdown
Symbolic link
1
mkdocs/docs/current/rofi-keys.5.markdown
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../doc/rofi-keys.5.markdown
|
1
mkdocs/docs/current/rofi-script.5.markdown
Symbolic link
1
mkdocs/docs/current/rofi-script.5.markdown
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../doc/rofi-script.5.markdown
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue