Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/next' into wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
lbonn committed Feb 16, 2024
2 parents 9dbbf70 + 3a5f95d commit 070c830
Show file tree
Hide file tree
Showing 33 changed files with 681 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ body:
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
required: false
81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Documentation Bug Report
description: Report a problem in Rofi Documentation
labels: [Documentation]
title: "[Doc] "
body:

- type: markdown
attributes:
value: |
First read the
[guidelines](https://github.com/DaveDavenport/rofi/blob/next/.github/CONTRIBUTING.md)!
This is not optional for any report. People must be able to understand
the full context of the report when reading it, at any time.
If you feel like you “it is simple and requires no explanation”, please
consider you’re wrong and still fill the full report. Any report
missing required informations will be labeled as “Incomplete Report -
Please follow the guidelines” and will be closed. If you ask a
question, enter dummy information in required fields to get passed the
checks or in general completely ignore the guidelines, the issue will
be closed and locked as spam.
If you are unsure, please use the
[discussion](https://github.com/davatorium/rofi/discussions) forum
first. It is easy to upgrade a question to an issue in github.
**Please do not submit reports related to wayland, see
[here](https://github.com/DaveDavenport/rofi/wiki/Wayland) for more
information.**
- type: input
attributes:
label: "Rofi version (rofi -v)"
placeholder: "Version: 1.7.5"
validations:
required: true
- type: input
attributes:
label: "URL"
description: "Please provide a link to the relevant documentation."
placeholder: "link to page on https://davatorium.github.io/rofi/ or file on https://github.com/davatorium/rofi/"
validations:
required: true

- type: textarea
attributes:
label: "Explain the issue with the documentation, please be verbose."
placeholder: |
* What am I trying to achieve
..
* What instructions are unclear, wrong or missing
..
* Suggestions for improving the current documentation
..
validations:
required: true
- type: textarea
attributes:
label: "Optional fixed text"
description: "Suggested new and or improved text for documentation."
validations:
required: false
- type: checkboxes
id: wayland
attributes:
label: Using wayland display server protocol
description: I have checked and confirm that my issue is not related to running rofi using wayland as display server protocol. See [here](https://github.com/DaveDavenport/rofi/wiki/Wayland) for more information.
options:
- label: "No, my documentation issue is not about running rofi using 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: false



1 change: 1 addition & 0 deletions Examples/test_script_mode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ else
echo -en "\0message\x1fSpecial <b>bold</b>message\n"

echo -en "aap\0icon\x1ffolder\n"
echo -en "blob\0icon\x1ffolder\x1fdisplay\x1fblub\n"
echo "noot"
echo "mies"
echo -en "-------------\0nonselectable\x1ftrue\n"
Expand Down
6 changes: 6 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ For wayland support:

## Install from a release

When downloading from the github release page, make sure to grab the archive
`rofi-{version}.tar.[g|x]z`. The auto-attached files `source code (zip|tar.gz)`
by github do not contain a valid release. It misses a setup build system and
includes irrelevant files.

### Autotools

Create a build directory and enter it:
Expand Down Expand Up @@ -272,6 +277,7 @@ https://aur.archlinux.org/packages/rofi-lbonn-wayland-git/
https://packages.fedoraproject.org/pkgs/rofi-wayland/rofi-wayland/

### Gentoo

`gui-apps/rofi-wayland` exists in the [GURU](https://wiki.gentoo.org/wiki/Project:GURU/Information_for_End_Users) overlay.

https://gitweb.gentoo.org/repo/proj/guru.git/tree/gui-apps/rofi-wayland
Expand Down
11 changes: 9 additions & 2 deletions doc/rofi-script.5
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ a widget.

.RE

.PP
The \fBtheme\fP property cannot change the interface while running, it is only
usable for small changes in, for example background color, of widgets that get
updated during display like the row color of the listview.

.SH Parsing row options
.PP
Extra options for individual rows can be set. The extra option can be specified
Expand All @@ -174,12 +179,14 @@ The following options are supported:
.IP \(bu 2
\fBicon\fP: Set the icon for that row.
.IP \(bu 2
\fBmeta\fP: Specify invisible search terms.
\fBdisplay\fP: Replace the displayed string. (Original string will still be used for filtering)
.IP \(bu 2
\fBmeta\fP: Specify invisible search terms used for filtering.
.IP \(bu 2
\fBnonselectable\fP: If true the row cannot activated.
.IP \(bu 2
\fBinfo\fP: Info that, on selection, gets placed in the \fB\fCROFI_INFO\fR
environment variable. This entry does not get searched.
environment variable. This entry does not get searched for filtering.
.IP \(bu 2
\fBurgent\fP: Set urgent flag on entry (true/false)
.IP \(bu 2
Expand Down
10 changes: 8 additions & 2 deletions doc/rofi-script.5.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ The following extra options exists:
- **theme**: Small theme snippet to f.e. change the background color of
a widget.

The **theme** property cannot change the interface while running, it is only
usable for small changes in, for example background color, of widgets that get
updated during display like the row color of the listview.

## Parsing row options

Extra options for individual rows can be set. The extra option can be specified
Expand All @@ -133,12 +137,14 @@ The following options are supported:

- **icon**: Set the icon for that row.

- **meta**: Specify invisible search terms.
- **display**: Replace the displayed string. (Original string will still be used for filtering)

- **meta**: Specify invisible search terms used for filtering.

- **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.
environment variable. This entry does not get searched for filtering.

- **urgent**: Set urgent flag on entry (true/false)

Expand Down
16 changes: 14 additions & 2 deletions doc/rofi-theme.5
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,8 @@ It supports the following keys as constraint:
.IP \(bu 2
\fB\fCmonitor-id\fR: The monitor id, see rofi -help for id's.
.IP \(bu 2
\fB\fCenabled\fR: Boolean option to enable. Supports environment variable.
\fB\fCenabled\fR: Boolean option to enable. Supports environment variable
or DMENU to detect if in dmenu mode.

.RE

Expand All @@ -2229,7 +2230,18 @@ added.
.RS

.nf
@media ( enabled: env(DO_LIGHT, false ) {
@media ( enabled: env(DO_LIGHT, false )) {

}

.fi
.RE

.PP
.RS

.nf
@media ( enabled: DMENU) {

}

Expand Down
11 changes: 9 additions & 2 deletions doc/rofi-theme.5.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,8 @@ It supports the following keys as constraint:
- `min-aspect-ratio` load when aspect ratio is over value.
- `max-aspect-ratio`: load when aspect ratio is under value.
- `monitor-id`: The monitor id, see rofi -help for id's.
- `enabled`: Boolean option to enable. Supports environment variable.
- `enabled`: Boolean option to enable. Supports environment variable
or DMENU to detect if in dmenu mode.

@media takes an integer number or a fraction, for integer number `px` can be
added.
Expand All @@ -1509,7 +1510,13 @@ added.
```

```css
@media ( enabled: env(DO_LIGHT, false ) {
@media ( enabled: env(DO_LIGHT, false )) {

}
```

```css
@media ( enabled: DMENU) {

}
```
Expand Down
11 changes: 11 additions & 0 deletions doc/rofi.1
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ The format string for the \fB\fCdrun\fR dialog:
\fBcategories\fP: the application's categories
.IP \(bu 2
\fBcomment\fP: the application comment
.IP \(bu 2
\fBurl\fP: The url in case of a link type desktop file

.RE

Expand Down Expand Up @@ -1372,6 +1374,15 @@ replaced at runtime:

.RE

.PP
It processes the string as follows: \fB\fC{key}\fR
is replaced by its value, if \fB\fC{key}\fR is not set it is removed. If the \fB\fC{key}\fR
is in between \fB\fC[]\fR all the text between \fB\fC[]\fR is removed if \fB\fC{key}\fR is not set.
Otherwise key is replaced and the \fB\fC[]\fR are removed.

.PP
For example: \fB\fC{ssh-client} [-p {port}] {host}\fR

.SH THEMING
.PP
Please see \fBrofi\-theme(5)\fP manpage for more information on theming.
Expand Down
8 changes: 8 additions & 0 deletions doc/rofi.1.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ The format string for the `drun` dialog:
- **exec**: the application's executable
- **categories**: the application's categories
- **comment**: the application comment
- **url**: The url in case of a link type desktop file

Pango markup can be used to formatting the output.

Expand Down Expand Up @@ -886,6 +887,13 @@ replaced at runtime:
- `{cmd}`: the command to execute
- `{window}`: the window ID of the selected window (in `window-command`)

It processes the string as follows: `{key}`
is replaced by its value, if `{key}` is not set it is removed. If the `{key}`
is in between `[]` all the text between `[]` is removed if `{key}` is not set.
Otherwise key is replaced and the `[]` are removed.

For example: `{ssh-client} [-p {port}] {host}`

## THEMING

Please see **rofi-theme(5)** manpage for more information on theming.
Expand Down
4 changes: 4 additions & 0 deletions include/modes/dmenuscriptshared.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
typedef struct {
/** Entry content. (visible part) */
char *entry;

/** Display */
char *display;

/** Icon name to display. */
char *icon_name;
/** Async icon fetch handler. */
Expand Down
1 change: 1 addition & 0 deletions include/rofi-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ typedef struct rofi_int_matcher_t {
*/
typedef struct _thread_state {
void (*callback)(struct _thread_state *t, gpointer data);
int priority;
} thread_state;

extern GThreadPool *tpool;
Expand Down
2 changes: 1 addition & 1 deletion include/xcb-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct _xcb_stuff {
} xkb;
xcb_timestamp_t last_timestamp;
NkBindingsSeat *bindings_seat;
gboolean mouse_seen;
uint32_t mouse_seen;
xcb_window_t focus_revert;
char *clipboard;
};
Expand Down
4 changes: 4 additions & 0 deletions lexer/theme-lexer.l
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

#define LOG_DOMAIN "Parser"
int last_state = 0;
extern int rofi_is_in_dmenu_mode;

const char *rasi_theme_file_extensions[] = {".rasi", ".rasinc", NULL};
/**
Expand Down Expand Up @@ -298,6 +299,8 @@ CONFIGURATION (?i:configuration)
MEDIA_TYPES (monitor-id|(min|max)-(width|height|aspect-ratio)|enabled)
DMENU (?i:dmenu)
%x INCLUDE
%x PROPERTIES
%x PROPERTIES_ENV
Expand Down Expand Up @@ -513,6 +516,7 @@ if ( queue == NULL ) {
<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,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;}
<MEDIA_CONTENT>{DMENU} { yylval->bval = rofi_is_in_dmenu_mode; return T_BOOLEAN;}
<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>{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; }
Expand Down
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ config_h = configure_file(output: 'config.h', configuration: header_conf)

nk_options = [
'bindings=true',
'xdg-theme=true',
'git-work-tree=@0@'.format(meson.source_root()),
]
nk = subproject('libnkutils', default_options: nk_options)
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/guides/DynamicThemes/dynamic_themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ These will be merged into the theme on load:
Now if we run it:

```bash
REVIEW=true rofi -theme fullscreen-preview.rasi -show filebrowser
PREVIEW=true rofi -theme fullscreen-preview.rasi -show filebrowser
```

It looks like this:
Expand Down
Loading

0 comments on commit 070c830

Please sign in to comment.